1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  import com.liferay.portal.model.UserIdMapper;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="UserIdMapperUtil.java.html"><b><i>View Source</i></b></a>
26   *
27   * <p>
28   * ServiceBuilder generated this class. Modifications in this class will be
29   * overwritten the next time is generated.
30   * </p>
31   *
32   * @author    Brian Wing Shun Chan
33   * @see       UserIdMapperPersistence
34   * @see       UserIdMapperPersistenceImpl
35   * @generated
36   */
37  public class UserIdMapperUtil {
38      /**
39       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
40       */
41      public static void clearCache() {
42          getPersistence().clearCache();
43      }
44  
45      /**
46       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(UserIdMapper)
47       */
48      public static void clearCache(UserIdMapper userIdMapper) {
49          getPersistence().clearCache(userIdMapper);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<UserIdMapper> findWithDynamicQuery(
64          DynamicQuery dynamicQuery) throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<UserIdMapper> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static UserIdMapper remove(UserIdMapper userIdMapper)
81          throws SystemException {
82          return getPersistence().remove(userIdMapper);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static UserIdMapper update(UserIdMapper userIdMapper, boolean merge)
89          throws SystemException {
90          return getPersistence().update(userIdMapper, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.UserIdMapper userIdMapper) {
95          getPersistence().cacheResult(userIdMapper);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.UserIdMapper> userIdMappers) {
100         getPersistence().cacheResult(userIdMappers);
101     }
102 
103     public static com.liferay.portal.model.UserIdMapper create(
104         long userIdMapperId) {
105         return getPersistence().create(userIdMapperId);
106     }
107 
108     public static com.liferay.portal.model.UserIdMapper remove(
109         long userIdMapperId)
110         throws com.liferay.portal.NoSuchUserIdMapperException,
111             com.liferay.portal.kernel.exception.SystemException {
112         return getPersistence().remove(userIdMapperId);
113     }
114 
115     public static com.liferay.portal.model.UserIdMapper updateImpl(
116         com.liferay.portal.model.UserIdMapper userIdMapper, boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getPersistence().updateImpl(userIdMapper, merge);
119     }
120 
121     public static com.liferay.portal.model.UserIdMapper findByPrimaryKey(
122         long userIdMapperId)
123         throws com.liferay.portal.NoSuchUserIdMapperException,
124             com.liferay.portal.kernel.exception.SystemException {
125         return getPersistence().findByPrimaryKey(userIdMapperId);
126     }
127 
128     public static com.liferay.portal.model.UserIdMapper fetchByPrimaryKey(
129         long userIdMapperId)
130         throws com.liferay.portal.kernel.exception.SystemException {
131         return getPersistence().fetchByPrimaryKey(userIdMapperId);
132     }
133 
134     public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId(
135         long userId) throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findByUserId(userId);
137     }
138 
139     public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId(
140         long userId, int start, int end)
141         throws com.liferay.portal.kernel.exception.SystemException {
142         return getPersistence().findByUserId(userId, start, end);
143     }
144 
145     public static java.util.List<com.liferay.portal.model.UserIdMapper> findByUserId(
146         long userId, int start, int end,
147         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
148         throws com.liferay.portal.kernel.exception.SystemException {
149         return getPersistence()
150                    .findByUserId(userId, start, end, orderByComparator);
151     }
152 
153     public static com.liferay.portal.model.UserIdMapper findByUserId_First(
154         long userId,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.NoSuchUserIdMapperException,
157             com.liferay.portal.kernel.exception.SystemException {
158         return getPersistence().findByUserId_First(userId, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.UserIdMapper findByUserId_Last(
162         long userId,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchUserIdMapperException,
165             com.liferay.portal.kernel.exception.SystemException {
166         return getPersistence().findByUserId_Last(userId, orderByComparator);
167     }
168 
169     public static com.liferay.portal.model.UserIdMapper[] findByUserId_PrevAndNext(
170         long userIdMapperId, long userId,
171         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172         throws com.liferay.portal.NoSuchUserIdMapperException,
173             com.liferay.portal.kernel.exception.SystemException {
174         return getPersistence()
175                    .findByUserId_PrevAndNext(userIdMapperId, userId,
176             orderByComparator);
177     }
178 
179     public static com.liferay.portal.model.UserIdMapper findByU_T(long userId,
180         java.lang.String type)
181         throws com.liferay.portal.NoSuchUserIdMapperException,
182             com.liferay.portal.kernel.exception.SystemException {
183         return getPersistence().findByU_T(userId, type);
184     }
185 
186     public static com.liferay.portal.model.UserIdMapper fetchByU_T(
187         long userId, java.lang.String type)
188         throws com.liferay.portal.kernel.exception.SystemException {
189         return getPersistence().fetchByU_T(userId, type);
190     }
191 
192     public static com.liferay.portal.model.UserIdMapper fetchByU_T(
193         long userId, java.lang.String type, boolean retrieveFromCache)
194         throws com.liferay.portal.kernel.exception.SystemException {
195         return getPersistence().fetchByU_T(userId, type, retrieveFromCache);
196     }
197 
198     public static com.liferay.portal.model.UserIdMapper findByT_E(
199         java.lang.String type, java.lang.String externalUserId)
200         throws com.liferay.portal.NoSuchUserIdMapperException,
201             com.liferay.portal.kernel.exception.SystemException {
202         return getPersistence().findByT_E(type, externalUserId);
203     }
204 
205     public static com.liferay.portal.model.UserIdMapper fetchByT_E(
206         java.lang.String type, java.lang.String externalUserId)
207         throws com.liferay.portal.kernel.exception.SystemException {
208         return getPersistence().fetchByT_E(type, externalUserId);
209     }
210 
211     public static com.liferay.portal.model.UserIdMapper fetchByT_E(
212         java.lang.String type, java.lang.String externalUserId,
213         boolean retrieveFromCache)
214         throws com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence()
216                    .fetchByT_E(type, externalUserId, retrieveFromCache);
217     }
218 
219     public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll()
220         throws com.liferay.portal.kernel.exception.SystemException {
221         return getPersistence().findAll();
222     }
223 
224     public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll(
225         int start, int end)
226         throws com.liferay.portal.kernel.exception.SystemException {
227         return getPersistence().findAll(start, end);
228     }
229 
230     public static java.util.List<com.liferay.portal.model.UserIdMapper> findAll(
231         int start, int end,
232         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
233         throws com.liferay.portal.kernel.exception.SystemException {
234         return getPersistence().findAll(start, end, orderByComparator);
235     }
236 
237     public static void removeByUserId(long userId)
238         throws com.liferay.portal.kernel.exception.SystemException {
239         getPersistence().removeByUserId(userId);
240     }
241 
242     public static void removeByU_T(long userId, java.lang.String type)
243         throws com.liferay.portal.NoSuchUserIdMapperException,
244             com.liferay.portal.kernel.exception.SystemException {
245         getPersistence().removeByU_T(userId, type);
246     }
247 
248     public static void removeByT_E(java.lang.String type,
249         java.lang.String externalUserId)
250         throws com.liferay.portal.NoSuchUserIdMapperException,
251             com.liferay.portal.kernel.exception.SystemException {
252         getPersistence().removeByT_E(type, externalUserId);
253     }
254 
255     public static void removeAll()
256         throws com.liferay.portal.kernel.exception.SystemException {
257         getPersistence().removeAll();
258     }
259 
260     public static int countByUserId(long userId)
261         throws com.liferay.portal.kernel.exception.SystemException {
262         return getPersistence().countByUserId(userId);
263     }
264 
265     public static int countByU_T(long userId, java.lang.String type)
266         throws com.liferay.portal.kernel.exception.SystemException {
267         return getPersistence().countByU_T(userId, type);
268     }
269 
270     public static int countByT_E(java.lang.String type,
271         java.lang.String externalUserId)
272         throws com.liferay.portal.kernel.exception.SystemException {
273         return getPersistence().countByT_E(type, externalUserId);
274     }
275 
276     public static int countAll()
277         throws com.liferay.portal.kernel.exception.SystemException {
278         return getPersistence().countAll();
279     }
280 
281     public static UserIdMapperPersistence getPersistence() {
282         if (_persistence == null) {
283             _persistence = (UserIdMapperPersistence)PortalBeanLocatorUtil.locate(UserIdMapperPersistence.class.getName());
284         }
285 
286         return _persistence;
287     }
288 
289     public void setPersistence(UserIdMapperPersistence persistence) {
290         _persistence = persistence;
291     }
292 
293     private static UserIdMapperPersistence _persistence;
294 }