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