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 obc)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().findByUserId(userId, start, end, obc);
134     }
135 
136     public static com.liferay.portal.model.UserGroupRole findByUserId_First(
137         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.NoSuchUserGroupRoleException,
139             com.liferay.portal.kernel.exception.SystemException {
140         return getPersistence().findByUserId_First(userId, obc);
141     }
142 
143     public static com.liferay.portal.model.UserGroupRole findByUserId_Last(
144         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.NoSuchUserGroupRoleException,
146             com.liferay.portal.kernel.exception.SystemException {
147         return getPersistence().findByUserId_Last(userId, obc);
148     }
149 
150     public static com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
151         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
152         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.NoSuchUserGroupRoleException,
154             com.liferay.portal.kernel.exception.SystemException {
155         return getPersistence()
156                    .findByUserId_PrevAndNext(userGroupRolePK, userId, obc);
157     }
158 
159     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
160         long groupId)
161         throws com.liferay.portal.kernel.exception.SystemException {
162         return getPersistence().findByGroupId(groupId);
163     }
164 
165     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
166         long groupId, int start, int end)
167         throws com.liferay.portal.kernel.exception.SystemException {
168         return getPersistence().findByGroupId(groupId, start, end);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
172         long groupId, int start, int end,
173         com.liferay.portal.kernel.util.OrderByComparator obc)
174         throws com.liferay.portal.kernel.exception.SystemException {
175         return getPersistence().findByGroupId(groupId, start, end, obc);
176     }
177 
178     public static com.liferay.portal.model.UserGroupRole findByGroupId_First(
179         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.NoSuchUserGroupRoleException,
181             com.liferay.portal.kernel.exception.SystemException {
182         return getPersistence().findByGroupId_First(groupId, obc);
183     }
184 
185     public static com.liferay.portal.model.UserGroupRole findByGroupId_Last(
186         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.NoSuchUserGroupRoleException,
188             com.liferay.portal.kernel.exception.SystemException {
189         return getPersistence().findByGroupId_Last(groupId, obc);
190     }
191 
192     public static com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
193         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
194         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
195         throws com.liferay.portal.NoSuchUserGroupRoleException,
196             com.liferay.portal.kernel.exception.SystemException {
197         return getPersistence()
198                    .findByGroupId_PrevAndNext(userGroupRolePK, groupId, obc);
199     }
200 
201     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
202         long roleId) throws com.liferay.portal.kernel.exception.SystemException {
203         return getPersistence().findByRoleId(roleId);
204     }
205 
206     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
207         long roleId, int start, int end)
208         throws com.liferay.portal.kernel.exception.SystemException {
209         return getPersistence().findByRoleId(roleId, start, end);
210     }
211 
212     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
213         long roleId, int start, int end,
214         com.liferay.portal.kernel.util.OrderByComparator obc)
215         throws com.liferay.portal.kernel.exception.SystemException {
216         return getPersistence().findByRoleId(roleId, start, end, obc);
217     }
218 
219     public static com.liferay.portal.model.UserGroupRole findByRoleId_First(
220         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.NoSuchUserGroupRoleException,
222             com.liferay.portal.kernel.exception.SystemException {
223         return getPersistence().findByRoleId_First(roleId, obc);
224     }
225 
226     public static com.liferay.portal.model.UserGroupRole findByRoleId_Last(
227         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.NoSuchUserGroupRoleException,
229             com.liferay.portal.kernel.exception.SystemException {
230         return getPersistence().findByRoleId_Last(roleId, obc);
231     }
232 
233     public static com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
234         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
235         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.NoSuchUserGroupRoleException,
237             com.liferay.portal.kernel.exception.SystemException {
238         return getPersistence()
239                    .findByRoleId_PrevAndNext(userGroupRolePK, roleId, obc);
240     }
241 
242     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
243         long userId, long groupId)
244         throws com.liferay.portal.kernel.exception.SystemException {
245         return getPersistence().findByU_G(userId, groupId);
246     }
247 
248     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
249         long userId, long groupId, int start, int end)
250         throws com.liferay.portal.kernel.exception.SystemException {
251         return getPersistence().findByU_G(userId, groupId, start, end);
252     }
253 
254     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
255         long userId, long groupId, int start, int end,
256         com.liferay.portal.kernel.util.OrderByComparator obc)
257         throws com.liferay.portal.kernel.exception.SystemException {
258         return getPersistence().findByU_G(userId, groupId, start, end, obc);
259     }
260 
261     public static com.liferay.portal.model.UserGroupRole findByU_G_First(
262         long userId, long groupId,
263         com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.NoSuchUserGroupRoleException,
265             com.liferay.portal.kernel.exception.SystemException {
266         return getPersistence().findByU_G_First(userId, groupId, obc);
267     }
268 
269     public static com.liferay.portal.model.UserGroupRole findByU_G_Last(
270         long userId, long groupId,
271         com.liferay.portal.kernel.util.OrderByComparator obc)
272         throws com.liferay.portal.NoSuchUserGroupRoleException,
273             com.liferay.portal.kernel.exception.SystemException {
274         return getPersistence().findByU_G_Last(userId, groupId, obc);
275     }
276 
277     public static com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
278         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
279         long userId, long groupId,
280         com.liferay.portal.kernel.util.OrderByComparator obc)
281         throws com.liferay.portal.NoSuchUserGroupRoleException,
282             com.liferay.portal.kernel.exception.SystemException {
283         return getPersistence()
284                    .findByU_G_PrevAndNext(userGroupRolePK, userId, groupId, obc);
285     }
286 
287     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
288         long groupId, long roleId)
289         throws com.liferay.portal.kernel.exception.SystemException {
290         return getPersistence().findByG_R(groupId, roleId);
291     }
292 
293     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
294         long groupId, long roleId, int start, int end)
295         throws com.liferay.portal.kernel.exception.SystemException {
296         return getPersistence().findByG_R(groupId, roleId, start, end);
297     }
298 
299     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
300         long groupId, long roleId, int start, int end,
301         com.liferay.portal.kernel.util.OrderByComparator obc)
302         throws com.liferay.portal.kernel.exception.SystemException {
303         return getPersistence().findByG_R(groupId, roleId, start, end, obc);
304     }
305 
306     public static com.liferay.portal.model.UserGroupRole findByG_R_First(
307         long groupId, long roleId,
308         com.liferay.portal.kernel.util.OrderByComparator obc)
309         throws com.liferay.portal.NoSuchUserGroupRoleException,
310             com.liferay.portal.kernel.exception.SystemException {
311         return getPersistence().findByG_R_First(groupId, roleId, obc);
312     }
313 
314     public static com.liferay.portal.model.UserGroupRole findByG_R_Last(
315         long groupId, long roleId,
316         com.liferay.portal.kernel.util.OrderByComparator obc)
317         throws com.liferay.portal.NoSuchUserGroupRoleException,
318             com.liferay.portal.kernel.exception.SystemException {
319         return getPersistence().findByG_R_Last(groupId, roleId, obc);
320     }
321 
322     public static com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
323         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
324         long groupId, long roleId,
325         com.liferay.portal.kernel.util.OrderByComparator obc)
326         throws com.liferay.portal.NoSuchUserGroupRoleException,
327             com.liferay.portal.kernel.exception.SystemException {
328         return getPersistence()
329                    .findByG_R_PrevAndNext(userGroupRolePK, groupId, roleId, obc);
330     }
331 
332     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll()
333         throws com.liferay.portal.kernel.exception.SystemException {
334         return getPersistence().findAll();
335     }
336 
337     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
338         int start, int end)
339         throws com.liferay.portal.kernel.exception.SystemException {
340         return getPersistence().findAll(start, end);
341     }
342 
343     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
344         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
345         throws com.liferay.portal.kernel.exception.SystemException {
346         return getPersistence().findAll(start, end, obc);
347     }
348 
349     public static void removeByUserId(long userId)
350         throws com.liferay.portal.kernel.exception.SystemException {
351         getPersistence().removeByUserId(userId);
352     }
353 
354     public static void removeByGroupId(long groupId)
355         throws com.liferay.portal.kernel.exception.SystemException {
356         getPersistence().removeByGroupId(groupId);
357     }
358 
359     public static void removeByRoleId(long roleId)
360         throws com.liferay.portal.kernel.exception.SystemException {
361         getPersistence().removeByRoleId(roleId);
362     }
363 
364     public static void removeByU_G(long userId, long groupId)
365         throws com.liferay.portal.kernel.exception.SystemException {
366         getPersistence().removeByU_G(userId, groupId);
367     }
368 
369     public static void removeByG_R(long groupId, long roleId)
370         throws com.liferay.portal.kernel.exception.SystemException {
371         getPersistence().removeByG_R(groupId, roleId);
372     }
373 
374     public static void removeAll()
375         throws com.liferay.portal.kernel.exception.SystemException {
376         getPersistence().removeAll();
377     }
378 
379     public static int countByUserId(long userId)
380         throws com.liferay.portal.kernel.exception.SystemException {
381         return getPersistence().countByUserId(userId);
382     }
383 
384     public static int countByGroupId(long groupId)
385         throws com.liferay.portal.kernel.exception.SystemException {
386         return getPersistence().countByGroupId(groupId);
387     }
388 
389     public static int countByRoleId(long roleId)
390         throws com.liferay.portal.kernel.exception.SystemException {
391         return getPersistence().countByRoleId(roleId);
392     }
393 
394     public static int countByU_G(long userId, long groupId)
395         throws com.liferay.portal.kernel.exception.SystemException {
396         return getPersistence().countByU_G(userId, groupId);
397     }
398 
399     public static int countByG_R(long groupId, long roleId)
400         throws com.liferay.portal.kernel.exception.SystemException {
401         return getPersistence().countByG_R(groupId, roleId);
402     }
403 
404     public static int countAll()
405         throws com.liferay.portal.kernel.exception.SystemException {
406         return getPersistence().countAll();
407     }
408 
409     public static UserGroupRolePersistence getPersistence() {
410         if (_persistence == null) {
411             _persistence = (UserGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupRolePersistence.class.getName());
412         }
413 
414         return _persistence;
415     }
416 
417     public void setPersistence(UserGroupRolePersistence persistence) {
418         _persistence = persistence;
419     }
420 
421     private static UserGroupRolePersistence _persistence;
422 }