1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.UserGroupRole;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="UserGroupRoleUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       UserGroupRolePersistence
35   * @see       UserGroupRolePersistenceImpl
36   * @generated
37   */
38  public class UserGroupRoleUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(UserGroupRole)
48       */
49      public static void clearCache(UserGroupRole userGroupRole) {
50          getPersistence().clearCache(userGroupRole);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) 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 UserGroupRole remove(UserGroupRole userGroupRole)
81          throws SystemException {
82          return getPersistence().remove(userGroupRole);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static UserGroupRole update(UserGroupRole userGroupRole,
89          boolean merge) throws SystemException {
90          return getPersistence().update(userGroupRole, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.UserGroupRole userGroupRole) {
95          getPersistence().cacheResult(userGroupRole);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles) {
100         getPersistence().cacheResult(userGroupRoles);
101     }
102 
103     public static com.liferay.portal.model.UserGroupRole create(
104         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
105         return getPersistence().create(userGroupRolePK);
106     }
107 
108     public static com.liferay.portal.model.UserGroupRole remove(
109         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
110         throws com.liferay.portal.NoSuchUserGroupRoleException,
111             com.liferay.portal.SystemException {
112         return getPersistence().remove(userGroupRolePK);
113     }
114 
115     /**
116      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
117      */
118     public static com.liferay.portal.model.UserGroupRole update(
119         com.liferay.portal.model.UserGroupRole userGroupRole)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().update(userGroupRole);
122     }
123 
124     public static com.liferay.portal.model.UserGroupRole updateImpl(
125         com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().updateImpl(userGroupRole, merge);
128     }
129 
130     public static com.liferay.portal.model.UserGroupRole findByPrimaryKey(
131         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
132         throws com.liferay.portal.NoSuchUserGroupRoleException,
133             com.liferay.portal.SystemException {
134         return getPersistence().findByPrimaryKey(userGroupRolePK);
135     }
136 
137     public static com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
138         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
139         throws com.liferay.portal.SystemException {
140         return getPersistence().fetchByPrimaryKey(userGroupRolePK);
141     }
142 
143     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
144         long userId) throws com.liferay.portal.SystemException {
145         return getPersistence().findByUserId(userId);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
149         long userId, int start, int end)
150         throws com.liferay.portal.SystemException {
151         return getPersistence().findByUserId(userId, start, end);
152     }
153 
154     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
155         long userId, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.SystemException {
158         return getPersistence()
159                    .findByUserId(userId, start, end, orderByComparator);
160     }
161 
162     public static com.liferay.portal.model.UserGroupRole findByUserId_First(
163         long userId,
164         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165         throws com.liferay.portal.NoSuchUserGroupRoleException,
166             com.liferay.portal.SystemException {
167         return getPersistence().findByUserId_First(userId, orderByComparator);
168     }
169 
170     public static com.liferay.portal.model.UserGroupRole findByUserId_Last(
171         long userId,
172         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173         throws com.liferay.portal.NoSuchUserGroupRoleException,
174             com.liferay.portal.SystemException {
175         return getPersistence().findByUserId_Last(userId, orderByComparator);
176     }
177 
178     public static com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
179         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
180         long userId,
181         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182         throws com.liferay.portal.NoSuchUserGroupRoleException,
183             com.liferay.portal.SystemException {
184         return getPersistence()
185                    .findByUserId_PrevAndNext(userGroupRolePK, userId,
186             orderByComparator);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
190         long groupId) throws com.liferay.portal.SystemException {
191         return getPersistence().findByGroupId(groupId);
192     }
193 
194     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
195         long groupId, int start, int end)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().findByGroupId(groupId, start, end);
198     }
199 
200     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
201         long groupId, int start, int end,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.SystemException {
204         return getPersistence()
205                    .findByGroupId(groupId, start, end, orderByComparator);
206     }
207 
208     public static com.liferay.portal.model.UserGroupRole findByGroupId_First(
209         long groupId,
210         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211         throws com.liferay.portal.NoSuchUserGroupRoleException,
212             com.liferay.portal.SystemException {
213         return getPersistence().findByGroupId_First(groupId, orderByComparator);
214     }
215 
216     public static com.liferay.portal.model.UserGroupRole findByGroupId_Last(
217         long groupId,
218         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219         throws com.liferay.portal.NoSuchUserGroupRoleException,
220             com.liferay.portal.SystemException {
221         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
222     }
223 
224     public static com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
225         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
226         long groupId,
227         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228         throws com.liferay.portal.NoSuchUserGroupRoleException,
229             com.liferay.portal.SystemException {
230         return getPersistence()
231                    .findByGroupId_PrevAndNext(userGroupRolePK, groupId,
232             orderByComparator);
233     }
234 
235     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
236         long roleId) throws com.liferay.portal.SystemException {
237         return getPersistence().findByRoleId(roleId);
238     }
239 
240     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
241         long roleId, int start, int end)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().findByRoleId(roleId, start, end);
244     }
245 
246     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
247         long roleId, int start, int end,
248         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249         throws com.liferay.portal.SystemException {
250         return getPersistence()
251                    .findByRoleId(roleId, start, end, orderByComparator);
252     }
253 
254     public static com.liferay.portal.model.UserGroupRole findByRoleId_First(
255         long roleId,
256         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
257         throws com.liferay.portal.NoSuchUserGroupRoleException,
258             com.liferay.portal.SystemException {
259         return getPersistence().findByRoleId_First(roleId, orderByComparator);
260     }
261 
262     public static com.liferay.portal.model.UserGroupRole findByRoleId_Last(
263         long roleId,
264         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265         throws com.liferay.portal.NoSuchUserGroupRoleException,
266             com.liferay.portal.SystemException {
267         return getPersistence().findByRoleId_Last(roleId, orderByComparator);
268     }
269 
270     public static com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
271         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
272         long roleId,
273         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
274         throws com.liferay.portal.NoSuchUserGroupRoleException,
275             com.liferay.portal.SystemException {
276         return getPersistence()
277                    .findByRoleId_PrevAndNext(userGroupRolePK, roleId,
278             orderByComparator);
279     }
280 
281     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
282         long userId, long groupId) throws com.liferay.portal.SystemException {
283         return getPersistence().findByU_G(userId, groupId);
284     }
285 
286     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
287         long userId, long groupId, int start, int end)
288         throws com.liferay.portal.SystemException {
289         return getPersistence().findByU_G(userId, groupId, start, end);
290     }
291 
292     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
293         long userId, long groupId, int start, int end,
294         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
295         throws com.liferay.portal.SystemException {
296         return getPersistence()
297                    .findByU_G(userId, groupId, start, end, orderByComparator);
298     }
299 
300     public static com.liferay.portal.model.UserGroupRole findByU_G_First(
301         long userId, long groupId,
302         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
303         throws com.liferay.portal.NoSuchUserGroupRoleException,
304             com.liferay.portal.SystemException {
305         return getPersistence()
306                    .findByU_G_First(userId, groupId, orderByComparator);
307     }
308 
309     public static com.liferay.portal.model.UserGroupRole findByU_G_Last(
310         long userId, long groupId,
311         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
312         throws com.liferay.portal.NoSuchUserGroupRoleException,
313             com.liferay.portal.SystemException {
314         return getPersistence()
315                    .findByU_G_Last(userId, groupId, orderByComparator);
316     }
317 
318     public static com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
319         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
320         long userId, long groupId,
321         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
322         throws com.liferay.portal.NoSuchUserGroupRoleException,
323             com.liferay.portal.SystemException {
324         return getPersistence()
325                    .findByU_G_PrevAndNext(userGroupRolePK, userId, groupId,
326             orderByComparator);
327     }
328 
329     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
330         long groupId, long roleId) throws com.liferay.portal.SystemException {
331         return getPersistence().findByG_R(groupId, roleId);
332     }
333 
334     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
335         long groupId, long roleId, int start, int end)
336         throws com.liferay.portal.SystemException {
337         return getPersistence().findByG_R(groupId, roleId, start, end);
338     }
339 
340     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
341         long groupId, long roleId, int start, int end,
342         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
343         throws com.liferay.portal.SystemException {
344         return getPersistence()
345                    .findByG_R(groupId, roleId, start, end, orderByComparator);
346     }
347 
348     public static com.liferay.portal.model.UserGroupRole findByG_R_First(
349         long groupId, long roleId,
350         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
351         throws com.liferay.portal.NoSuchUserGroupRoleException,
352             com.liferay.portal.SystemException {
353         return getPersistence()
354                    .findByG_R_First(groupId, roleId, orderByComparator);
355     }
356 
357     public static com.liferay.portal.model.UserGroupRole findByG_R_Last(
358         long groupId, long roleId,
359         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
360         throws com.liferay.portal.NoSuchUserGroupRoleException,
361             com.liferay.portal.SystemException {
362         return getPersistence()
363                    .findByG_R_Last(groupId, roleId, orderByComparator);
364     }
365 
366     public static com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
367         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
368         long groupId, long roleId,
369         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
370         throws com.liferay.portal.NoSuchUserGroupRoleException,
371             com.liferay.portal.SystemException {
372         return getPersistence()
373                    .findByG_R_PrevAndNext(userGroupRolePK, groupId, roleId,
374             orderByComparator);
375     }
376 
377     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll()
378         throws com.liferay.portal.SystemException {
379         return getPersistence().findAll();
380     }
381 
382     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
383         int start, int end) throws com.liferay.portal.SystemException {
384         return getPersistence().findAll(start, end);
385     }
386 
387     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
388         int start, int end,
389         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
390         throws com.liferay.portal.SystemException {
391         return getPersistence().findAll(start, end, orderByComparator);
392     }
393 
394     public static void removeByUserId(long userId)
395         throws com.liferay.portal.SystemException {
396         getPersistence().removeByUserId(userId);
397     }
398 
399     public static void removeByGroupId(long groupId)
400         throws com.liferay.portal.SystemException {
401         getPersistence().removeByGroupId(groupId);
402     }
403 
404     public static void removeByRoleId(long roleId)
405         throws com.liferay.portal.SystemException {
406         getPersistence().removeByRoleId(roleId);
407     }
408 
409     public static void removeByU_G(long userId, long groupId)
410         throws com.liferay.portal.SystemException {
411         getPersistence().removeByU_G(userId, groupId);
412     }
413 
414     public static void removeByG_R(long groupId, long roleId)
415         throws com.liferay.portal.SystemException {
416         getPersistence().removeByG_R(groupId, roleId);
417     }
418 
419     public static void removeAll() throws com.liferay.portal.SystemException {
420         getPersistence().removeAll();
421     }
422 
423     public static int countByUserId(long userId)
424         throws com.liferay.portal.SystemException {
425         return getPersistence().countByUserId(userId);
426     }
427 
428     public static int countByGroupId(long groupId)
429         throws com.liferay.portal.SystemException {
430         return getPersistence().countByGroupId(groupId);
431     }
432 
433     public static int countByRoleId(long roleId)
434         throws com.liferay.portal.SystemException {
435         return getPersistence().countByRoleId(roleId);
436     }
437 
438     public static int countByU_G(long userId, long groupId)
439         throws com.liferay.portal.SystemException {
440         return getPersistence().countByU_G(userId, groupId);
441     }
442 
443     public static int countByG_R(long groupId, long roleId)
444         throws com.liferay.portal.SystemException {
445         return getPersistence().countByG_R(groupId, roleId);
446     }
447 
448     public static int countAll() throws com.liferay.portal.SystemException {
449         return getPersistence().countAll();
450     }
451 
452     public static UserGroupRolePersistence getPersistence() {
453         if (_persistence == null) {
454             _persistence = (UserGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupRolePersistence.class.getName());
455 
456             ReferenceRegistry.registerReference(UserGroupRoleUtil.class,
457                 "_persistence");
458         }
459 
460         return _persistence;
461     }
462 
463     public void setPersistence(UserGroupRolePersistence persistence) {
464         _persistence = persistence;
465 
466         ReferenceRegistry.registerReference(UserGroupRoleUtil.class,
467             "_persistence");
468     }
469 
470     private static UserGroupRolePersistence _persistence;
471 }