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