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