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