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.UserGroupRole;
21  
22  import java.util.List;
23  
24  /**
25   * <a href="UserGroupRoleUtil.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       UserGroupRolePersistence
34   * @see       UserGroupRolePersistenceImpl
35   * @generated
36   */
37  public class UserGroupRoleUtil {
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(UserGroupRole)
47       */
48      public static void clearCache(UserGroupRole userGroupRole) {
49          getPersistence().clearCache(userGroupRole);
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<UserGroupRole> 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<UserGroupRole> 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 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.kernel.exception.SystemException {
112         return getPersistence().remove(userGroupRolePK);
113     }
114 
115     public static com.liferay.portal.model.UserGroupRole updateImpl(
116         com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getPersistence().updateImpl(userGroupRole, merge);
119     }
120 
121     public static com.liferay.portal.model.UserGroupRole findByPrimaryKey(
122         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
123         throws com.liferay.portal.NoSuchUserGroupRoleException,
124             com.liferay.portal.kernel.exception.SystemException {
125         return getPersistence().findByPrimaryKey(userGroupRolePK);
126     }
127 
128     public static com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
129         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
130         throws com.liferay.portal.kernel.exception.SystemException {
131         return getPersistence().fetchByPrimaryKey(userGroupRolePK);
132     }
133 
134     public static java.util.List<com.liferay.portal.model.UserGroupRole> 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.UserGroupRole> 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.UserGroupRole> 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.UserGroupRole findByUserId_First(
154         long userId,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.NoSuchUserGroupRoleException,
157             com.liferay.portal.kernel.exception.SystemException {
158         return getPersistence().findByUserId_First(userId, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.UserGroupRole findByUserId_Last(
162         long userId,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchUserGroupRoleException,
165             com.liferay.portal.kernel.exception.SystemException {
166         return getPersistence().findByUserId_Last(userId, orderByComparator);
167     }
168 
169     public static com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
170         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
171         long userId,
172         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173         throws com.liferay.portal.NoSuchUserGroupRoleException,
174             com.liferay.portal.kernel.exception.SystemException {
175         return getPersistence()
176                    .findByUserId_PrevAndNext(userGroupRolePK, userId,
177             orderByComparator);
178     }
179 
180     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
181         long groupId)
182         throws com.liferay.portal.kernel.exception.SystemException {
183         return getPersistence().findByGroupId(groupId);
184     }
185 
186     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
187         long groupId, int start, int end)
188         throws com.liferay.portal.kernel.exception.SystemException {
189         return getPersistence().findByGroupId(groupId, start, end);
190     }
191 
192     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
193         long groupId, int start, int end,
194         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195         throws com.liferay.portal.kernel.exception.SystemException {
196         return getPersistence()
197                    .findByGroupId(groupId, start, end, orderByComparator);
198     }
199 
200     public static com.liferay.portal.model.UserGroupRole findByGroupId_First(
201         long groupId,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.NoSuchUserGroupRoleException,
204             com.liferay.portal.kernel.exception.SystemException {
205         return getPersistence().findByGroupId_First(groupId, orderByComparator);
206     }
207 
208     public static com.liferay.portal.model.UserGroupRole findByGroupId_Last(
209         long groupId,
210         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211         throws com.liferay.portal.NoSuchUserGroupRoleException,
212             com.liferay.portal.kernel.exception.SystemException {
213         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
214     }
215 
216     public static com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
217         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
218         long groupId,
219         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220         throws com.liferay.portal.NoSuchUserGroupRoleException,
221             com.liferay.portal.kernel.exception.SystemException {
222         return getPersistence()
223                    .findByGroupId_PrevAndNext(userGroupRolePK, groupId,
224             orderByComparator);
225     }
226 
227     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
228         long roleId) throws com.liferay.portal.kernel.exception.SystemException {
229         return getPersistence().findByRoleId(roleId);
230     }
231 
232     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
233         long roleId, int start, int end)
234         throws com.liferay.portal.kernel.exception.SystemException {
235         return getPersistence().findByRoleId(roleId, start, end);
236     }
237 
238     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
239         long roleId, int start, int end,
240         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241         throws com.liferay.portal.kernel.exception.SystemException {
242         return getPersistence()
243                    .findByRoleId(roleId, start, end, orderByComparator);
244     }
245 
246     public static com.liferay.portal.model.UserGroupRole findByRoleId_First(
247         long roleId,
248         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249         throws com.liferay.portal.NoSuchUserGroupRoleException,
250             com.liferay.portal.kernel.exception.SystemException {
251         return getPersistence().findByRoleId_First(roleId, orderByComparator);
252     }
253 
254     public static com.liferay.portal.model.UserGroupRole findByRoleId_Last(
255         long roleId,
256         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
257         throws com.liferay.portal.NoSuchUserGroupRoleException,
258             com.liferay.portal.kernel.exception.SystemException {
259         return getPersistence().findByRoleId_Last(roleId, orderByComparator);
260     }
261 
262     public static com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
263         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
264         long roleId,
265         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266         throws com.liferay.portal.NoSuchUserGroupRoleException,
267             com.liferay.portal.kernel.exception.SystemException {
268         return getPersistence()
269                    .findByRoleId_PrevAndNext(userGroupRolePK, roleId,
270             orderByComparator);
271     }
272 
273     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
274         long userId, long groupId)
275         throws com.liferay.portal.kernel.exception.SystemException {
276         return getPersistence().findByU_G(userId, groupId);
277     }
278 
279     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
280         long userId, long groupId, int start, int end)
281         throws com.liferay.portal.kernel.exception.SystemException {
282         return getPersistence().findByU_G(userId, groupId, start, end);
283     }
284 
285     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
286         long userId, long groupId, int start, int end,
287         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
288         throws com.liferay.portal.kernel.exception.SystemException {
289         return getPersistence()
290                    .findByU_G(userId, groupId, start, end, orderByComparator);
291     }
292 
293     public static com.liferay.portal.model.UserGroupRole findByU_G_First(
294         long userId, long groupId,
295         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
296         throws com.liferay.portal.NoSuchUserGroupRoleException,
297             com.liferay.portal.kernel.exception.SystemException {
298         return getPersistence()
299                    .findByU_G_First(userId, groupId, orderByComparator);
300     }
301 
302     public static com.liferay.portal.model.UserGroupRole findByU_G_Last(
303         long userId, long groupId,
304         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
305         throws com.liferay.portal.NoSuchUserGroupRoleException,
306             com.liferay.portal.kernel.exception.SystemException {
307         return getPersistence()
308                    .findByU_G_Last(userId, groupId, orderByComparator);
309     }
310 
311     public static com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
312         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
313         long userId, long groupId,
314         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
315         throws com.liferay.portal.NoSuchUserGroupRoleException,
316             com.liferay.portal.kernel.exception.SystemException {
317         return getPersistence()
318                    .findByU_G_PrevAndNext(userGroupRolePK, userId, groupId,
319             orderByComparator);
320     }
321 
322     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
323         long groupId, long roleId)
324         throws com.liferay.portal.kernel.exception.SystemException {
325         return getPersistence().findByG_R(groupId, roleId);
326     }
327 
328     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
329         long groupId, long roleId, int start, int end)
330         throws com.liferay.portal.kernel.exception.SystemException {
331         return getPersistence().findByG_R(groupId, roleId, start, end);
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         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
337         throws com.liferay.portal.kernel.exception.SystemException {
338         return getPersistence()
339                    .findByG_R(groupId, roleId, start, end, orderByComparator);
340     }
341 
342     public static com.liferay.portal.model.UserGroupRole findByG_R_First(
343         long groupId, long roleId,
344         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
345         throws com.liferay.portal.NoSuchUserGroupRoleException,
346             com.liferay.portal.kernel.exception.SystemException {
347         return getPersistence()
348                    .findByG_R_First(groupId, roleId, orderByComparator);
349     }
350 
351     public static com.liferay.portal.model.UserGroupRole findByG_R_Last(
352         long groupId, long roleId,
353         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
354         throws com.liferay.portal.NoSuchUserGroupRoleException,
355             com.liferay.portal.kernel.exception.SystemException {
356         return getPersistence()
357                    .findByG_R_Last(groupId, roleId, orderByComparator);
358     }
359 
360     public static com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
361         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
362         long groupId, long roleId,
363         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
364         throws com.liferay.portal.NoSuchUserGroupRoleException,
365             com.liferay.portal.kernel.exception.SystemException {
366         return getPersistence()
367                    .findByG_R_PrevAndNext(userGroupRolePK, groupId, roleId,
368             orderByComparator);
369     }
370 
371     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll()
372         throws com.liferay.portal.kernel.exception.SystemException {
373         return getPersistence().findAll();
374     }
375 
376     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
377         int start, int end)
378         throws com.liferay.portal.kernel.exception.SystemException {
379         return getPersistence().findAll(start, end);
380     }
381 
382     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
383         int start, int end,
384         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
385         throws com.liferay.portal.kernel.exception.SystemException {
386         return getPersistence().findAll(start, end, orderByComparator);
387     }
388 
389     public static void removeByUserId(long userId)
390         throws com.liferay.portal.kernel.exception.SystemException {
391         getPersistence().removeByUserId(userId);
392     }
393 
394     public static void removeByGroupId(long groupId)
395         throws com.liferay.portal.kernel.exception.SystemException {
396         getPersistence().removeByGroupId(groupId);
397     }
398 
399     public static void removeByRoleId(long roleId)
400         throws com.liferay.portal.kernel.exception.SystemException {
401         getPersistence().removeByRoleId(roleId);
402     }
403 
404     public static void removeByU_G(long userId, long groupId)
405         throws com.liferay.portal.kernel.exception.SystemException {
406         getPersistence().removeByU_G(userId, groupId);
407     }
408 
409     public static void removeByG_R(long groupId, long roleId)
410         throws com.liferay.portal.kernel.exception.SystemException {
411         getPersistence().removeByG_R(groupId, roleId);
412     }
413 
414     public static void removeAll()
415         throws com.liferay.portal.kernel.exception.SystemException {
416         getPersistence().removeAll();
417     }
418 
419     public static int countByUserId(long userId)
420         throws com.liferay.portal.kernel.exception.SystemException {
421         return getPersistence().countByUserId(userId);
422     }
423 
424     public static int countByGroupId(long groupId)
425         throws com.liferay.portal.kernel.exception.SystemException {
426         return getPersistence().countByGroupId(groupId);
427     }
428 
429     public static int countByRoleId(long roleId)
430         throws com.liferay.portal.kernel.exception.SystemException {
431         return getPersistence().countByRoleId(roleId);
432     }
433 
434     public static int countByU_G(long userId, long groupId)
435         throws com.liferay.portal.kernel.exception.SystemException {
436         return getPersistence().countByU_G(userId, groupId);
437     }
438 
439     public static int countByG_R(long groupId, long roleId)
440         throws com.liferay.portal.kernel.exception.SystemException {
441         return getPersistence().countByG_R(groupId, roleId);
442     }
443 
444     public static int countAll()
445         throws com.liferay.portal.kernel.exception.SystemException {
446         return getPersistence().countAll();
447     }
448 
449     public static UserGroupRolePersistence getPersistence() {
450         if (_persistence == null) {
451             _persistence = (UserGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupRolePersistence.class.getName());
452         }
453 
454         return _persistence;
455     }
456 
457     public void setPersistence(UserGroupRolePersistence persistence) {
458         _persistence = persistence;
459     }
460 
461     private static UserGroupRolePersistence _persistence;
462 }