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.UserGroupGroupRole;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="UserGroupGroupRoleUtil.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       UserGroupGroupRolePersistence
35   * @see       UserGroupGroupRolePersistenceImpl
36   * @generated
37   */
38  public class UserGroupGroupRoleUtil {
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(UserGroupGroupRole)
48       */
49      public static void clearCache(UserGroupGroupRole userGroupGroupRole) {
50          getPersistence().clearCache(userGroupGroupRole);
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 UserGroupGroupRole remove(
81          UserGroupGroupRole userGroupGroupRole) throws SystemException {
82          return getPersistence().remove(userGroupGroupRole);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static UserGroupGroupRole update(
89          UserGroupGroupRole userGroupGroupRole, boolean merge)
90          throws SystemException {
91          return getPersistence().update(userGroupGroupRole, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) {
96          getPersistence().cacheResult(userGroupGroupRole);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portal.model.UserGroupGroupRole> userGroupGroupRoles) {
101         getPersistence().cacheResult(userGroupGroupRoles);
102     }
103 
104     public static com.liferay.portal.model.UserGroupGroupRole create(
105         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
106         return getPersistence().create(userGroupGroupRolePK);
107     }
108 
109     public static com.liferay.portal.model.UserGroupGroupRole remove(
110         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
111         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
112             com.liferay.portal.SystemException {
113         return getPersistence().remove(userGroupGroupRolePK);
114     }
115 
116     /**
117      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
118      */
119     public static com.liferay.portal.model.UserGroupGroupRole update(
120         com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().update(userGroupGroupRole);
123     }
124 
125     public static com.liferay.portal.model.UserGroupGroupRole updateImpl(
126         com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getPersistence().updateImpl(userGroupGroupRole, merge);
129     }
130 
131     public static com.liferay.portal.model.UserGroupGroupRole findByPrimaryKey(
132         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
133         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
134             com.liferay.portal.SystemException {
135         return getPersistence().findByPrimaryKey(userGroupGroupRolePK);
136     }
137 
138     public static com.liferay.portal.model.UserGroupGroupRole fetchByPrimaryKey(
139         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
140         throws com.liferay.portal.SystemException {
141         return getPersistence().fetchByPrimaryKey(userGroupGroupRolePK);
142     }
143 
144     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
145         long userGroupId) throws com.liferay.portal.SystemException {
146         return getPersistence().findByUserGroupId(userGroupId);
147     }
148 
149     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
150         long userGroupId, int start, int end)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByUserGroupId(userGroupId, start, end);
153     }
154 
155     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
156         long userGroupId, int start, int end,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.SystemException {
159         return getPersistence()
160                    .findByUserGroupId(userGroupId, start, end, orderByComparator);
161     }
162 
163     public static com.liferay.portal.model.UserGroupGroupRole findByUserGroupId_First(
164         long userGroupId,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
167             com.liferay.portal.SystemException {
168         return getPersistence()
169                    .findByUserGroupId_First(userGroupId, orderByComparator);
170     }
171 
172     public static com.liferay.portal.model.UserGroupGroupRole findByUserGroupId_Last(
173         long userGroupId,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
176             com.liferay.portal.SystemException {
177         return getPersistence()
178                    .findByUserGroupId_Last(userGroupId, orderByComparator);
179     }
180 
181     public static com.liferay.portal.model.UserGroupGroupRole[] findByUserGroupId_PrevAndNext(
182         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
183         long userGroupId,
184         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
185         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
186             com.liferay.portal.SystemException {
187         return getPersistence()
188                    .findByUserGroupId_PrevAndNext(userGroupGroupRolePK,
189             userGroupId, orderByComparator);
190     }
191 
192     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
193         long groupId) throws com.liferay.portal.SystemException {
194         return getPersistence().findByGroupId(groupId);
195     }
196 
197     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
198         long groupId, int start, int end)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().findByGroupId(groupId, start, end);
201     }
202 
203     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
204         long groupId, int start, int end,
205         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206         throws com.liferay.portal.SystemException {
207         return getPersistence()
208                    .findByGroupId(groupId, start, end, orderByComparator);
209     }
210 
211     public static com.liferay.portal.model.UserGroupGroupRole findByGroupId_First(
212         long groupId,
213         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
215             com.liferay.portal.SystemException {
216         return getPersistence().findByGroupId_First(groupId, orderByComparator);
217     }
218 
219     public static com.liferay.portal.model.UserGroupGroupRole findByGroupId_Last(
220         long groupId,
221         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
223             com.liferay.portal.SystemException {
224         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
225     }
226 
227     public static com.liferay.portal.model.UserGroupGroupRole[] findByGroupId_PrevAndNext(
228         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
229         long groupId,
230         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
231         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
232             com.liferay.portal.SystemException {
233         return getPersistence()
234                    .findByGroupId_PrevAndNext(userGroupGroupRolePK, groupId,
235             orderByComparator);
236     }
237 
238     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
239         long roleId) throws com.liferay.portal.SystemException {
240         return getPersistence().findByRoleId(roleId);
241     }
242 
243     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
244         long roleId, int start, int end)
245         throws com.liferay.portal.SystemException {
246         return getPersistence().findByRoleId(roleId, start, end);
247     }
248 
249     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
250         long roleId, int start, int end,
251         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252         throws com.liferay.portal.SystemException {
253         return getPersistence()
254                    .findByRoleId(roleId, start, end, orderByComparator);
255     }
256 
257     public static com.liferay.portal.model.UserGroupGroupRole findByRoleId_First(
258         long roleId,
259         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
260         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
261             com.liferay.portal.SystemException {
262         return getPersistence().findByRoleId_First(roleId, orderByComparator);
263     }
264 
265     public static com.liferay.portal.model.UserGroupGroupRole findByRoleId_Last(
266         long roleId,
267         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
268         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
269             com.liferay.portal.SystemException {
270         return getPersistence().findByRoleId_Last(roleId, orderByComparator);
271     }
272 
273     public static com.liferay.portal.model.UserGroupGroupRole[] findByRoleId_PrevAndNext(
274         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
275         long roleId,
276         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
277         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
278             com.liferay.portal.SystemException {
279         return getPersistence()
280                    .findByRoleId_PrevAndNext(userGroupGroupRolePK, roleId,
281             orderByComparator);
282     }
283 
284     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
285         long userGroupId, long groupId)
286         throws com.liferay.portal.SystemException {
287         return getPersistence().findByU_G(userGroupId, groupId);
288     }
289 
290     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
291         long userGroupId, long groupId, int start, int end)
292         throws com.liferay.portal.SystemException {
293         return getPersistence().findByU_G(userGroupId, groupId, start, end);
294     }
295 
296     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
297         long userGroupId, long groupId, int start, int end,
298         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
299         throws com.liferay.portal.SystemException {
300         return getPersistence()
301                    .findByU_G(userGroupId, groupId, start, end,
302             orderByComparator);
303     }
304 
305     public static com.liferay.portal.model.UserGroupGroupRole findByU_G_First(
306         long userGroupId, long groupId,
307         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
308         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
309             com.liferay.portal.SystemException {
310         return getPersistence()
311                    .findByU_G_First(userGroupId, groupId, orderByComparator);
312     }
313 
314     public static com.liferay.portal.model.UserGroupGroupRole findByU_G_Last(
315         long userGroupId, long groupId,
316         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
317         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
318             com.liferay.portal.SystemException {
319         return getPersistence()
320                    .findByU_G_Last(userGroupId, groupId, orderByComparator);
321     }
322 
323     public static com.liferay.portal.model.UserGroupGroupRole[] findByU_G_PrevAndNext(
324         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
325         long userGroupId, long groupId,
326         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
327         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
328             com.liferay.portal.SystemException {
329         return getPersistence()
330                    .findByU_G_PrevAndNext(userGroupGroupRolePK, userGroupId,
331             groupId, orderByComparator);
332     }
333 
334     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
335         long groupId, long roleId) throws com.liferay.portal.SystemException {
336         return getPersistence().findByG_R(groupId, roleId);
337     }
338 
339     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
340         long groupId, long roleId, int start, int end)
341         throws com.liferay.portal.SystemException {
342         return getPersistence().findByG_R(groupId, roleId, start, end);
343     }
344 
345     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
346         long groupId, long roleId, int start, int end,
347         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
348         throws com.liferay.portal.SystemException {
349         return getPersistence()
350                    .findByG_R(groupId, roleId, start, end, orderByComparator);
351     }
352 
353     public static com.liferay.portal.model.UserGroupGroupRole findByG_R_First(
354         long groupId, long roleId,
355         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
356         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
357             com.liferay.portal.SystemException {
358         return getPersistence()
359                    .findByG_R_First(groupId, roleId, orderByComparator);
360     }
361 
362     public static com.liferay.portal.model.UserGroupGroupRole findByG_R_Last(
363         long groupId, long roleId,
364         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
365         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
366             com.liferay.portal.SystemException {
367         return getPersistence()
368                    .findByG_R_Last(groupId, roleId, orderByComparator);
369     }
370 
371     public static com.liferay.portal.model.UserGroupGroupRole[] findByG_R_PrevAndNext(
372         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
373         long groupId, long roleId,
374         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
375         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
376             com.liferay.portal.SystemException {
377         return getPersistence()
378                    .findByG_R_PrevAndNext(userGroupGroupRolePK, groupId,
379             roleId, orderByComparator);
380     }
381 
382     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll()
383         throws com.liferay.portal.SystemException {
384         return getPersistence().findAll();
385     }
386 
387     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll(
388         int start, int end) throws com.liferay.portal.SystemException {
389         return getPersistence().findAll(start, end);
390     }
391 
392     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll(
393         int start, int end,
394         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
395         throws com.liferay.portal.SystemException {
396         return getPersistence().findAll(start, end, orderByComparator);
397     }
398 
399     public static void removeByUserGroupId(long userGroupId)
400         throws com.liferay.portal.SystemException {
401         getPersistence().removeByUserGroupId(userGroupId);
402     }
403 
404     public static void removeByGroupId(long groupId)
405         throws com.liferay.portal.SystemException {
406         getPersistence().removeByGroupId(groupId);
407     }
408 
409     public static void removeByRoleId(long roleId)
410         throws com.liferay.portal.SystemException {
411         getPersistence().removeByRoleId(roleId);
412     }
413 
414     public static void removeByU_G(long userGroupId, long groupId)
415         throws com.liferay.portal.SystemException {
416         getPersistence().removeByU_G(userGroupId, groupId);
417     }
418 
419     public static void removeByG_R(long groupId, long roleId)
420         throws com.liferay.portal.SystemException {
421         getPersistence().removeByG_R(groupId, roleId);
422     }
423 
424     public static void removeAll() throws com.liferay.portal.SystemException {
425         getPersistence().removeAll();
426     }
427 
428     public static int countByUserGroupId(long userGroupId)
429         throws com.liferay.portal.SystemException {
430         return getPersistence().countByUserGroupId(userGroupId);
431     }
432 
433     public static int countByGroupId(long groupId)
434         throws com.liferay.portal.SystemException {
435         return getPersistence().countByGroupId(groupId);
436     }
437 
438     public static int countByRoleId(long roleId)
439         throws com.liferay.portal.SystemException {
440         return getPersistence().countByRoleId(roleId);
441     }
442 
443     public static int countByU_G(long userGroupId, long groupId)
444         throws com.liferay.portal.SystemException {
445         return getPersistence().countByU_G(userGroupId, groupId);
446     }
447 
448     public static int countByG_R(long groupId, long roleId)
449         throws com.liferay.portal.SystemException {
450         return getPersistence().countByG_R(groupId, roleId);
451     }
452 
453     public static int countAll() throws com.liferay.portal.SystemException {
454         return getPersistence().countAll();
455     }
456 
457     public static UserGroupGroupRolePersistence getPersistence() {
458         if (_persistence == null) {
459             _persistence = (UserGroupGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupGroupRolePersistence.class.getName());
460 
461             ReferenceRegistry.registerReference(UserGroupGroupRoleUtil.class,
462                 "_persistence");
463         }
464 
465         return _persistence;
466     }
467 
468     public void setPersistence(UserGroupGroupRolePersistence persistence) {
469         _persistence = persistence;
470 
471         ReferenceRegistry.registerReference(UserGroupGroupRoleUtil.class,
472             "_persistence");
473     }
474 
475     private static UserGroupGroupRolePersistence _persistence;
476 }