1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  /**
26   * <a href="UserGroupGroupRoleUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class UserGroupGroupRoleUtil {
32      public static void cacheResult(
33          com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) {
34          getPersistence().cacheResult(userGroupGroupRole);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portal.model.UserGroupGroupRole> userGroupGroupRoles) {
39          getPersistence().cacheResult(userGroupGroupRoles);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portal.model.UserGroupGroupRole create(
47          com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
48          return getPersistence().create(userGroupGroupRolePK);
49      }
50  
51      public static com.liferay.portal.model.UserGroupGroupRole remove(
52          com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
53          throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
54              com.liferay.portal.SystemException {
55          return getPersistence().remove(userGroupGroupRolePK);
56      }
57  
58      public static com.liferay.portal.model.UserGroupGroupRole remove(
59          com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(userGroupGroupRole);
62      }
63  
64      /**
65       * @deprecated Use <code>update(UserGroupGroupRole userGroupGroupRole, boolean merge)</code>.
66       */
67      public static com.liferay.portal.model.UserGroupGroupRole update(
68          com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(userGroupGroupRole);
71      }
72  
73      /**
74       * Add, update, or merge, the entity. This method also calls the model
75       * listeners to trigger the proper events associated with adding, deleting,
76       * or updating an entity.
77       *
78       * @param        userGroupGroupRole the entity to add, update, or merge
79       * @param        merge boolean value for whether to merge the entity. The
80       *                default value is false. Setting merge to true is more
81       *                expensive and should only be true when userGroupGroupRole is
82       *                transient. See LEP-5473 for a detailed discussion of this
83       *                method.
84       * @return        true if the portlet can be displayed via Ajax
85       */
86      public static com.liferay.portal.model.UserGroupGroupRole update(
87          com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(userGroupGroupRole, merge);
90      }
91  
92      public static com.liferay.portal.model.UserGroupGroupRole updateImpl(
93          com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(userGroupGroupRole, merge);
96      }
97  
98      public static com.liferay.portal.model.UserGroupGroupRole findByPrimaryKey(
99          com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
100         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
101             com.liferay.portal.SystemException {
102         return getPersistence().findByPrimaryKey(userGroupGroupRolePK);
103     }
104 
105     public static com.liferay.portal.model.UserGroupGroupRole fetchByPrimaryKey(
106         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
107         throws com.liferay.portal.SystemException {
108         return getPersistence().fetchByPrimaryKey(userGroupGroupRolePK);
109     }
110 
111     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
112         long userGroupId) throws com.liferay.portal.SystemException {
113         return getPersistence().findByUserGroupId(userGroupId);
114     }
115 
116     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
117         long userGroupId, int start, int end)
118         throws com.liferay.portal.SystemException {
119         return getPersistence().findByUserGroupId(userGroupId, start, end);
120     }
121 
122     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
123         long userGroupId, int start, int end,
124         com.liferay.portal.kernel.util.OrderByComparator obc)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().findByUserGroupId(userGroupId, start, end, obc);
127     }
128 
129     public static com.liferay.portal.model.UserGroupGroupRole findByUserGroupId_First(
130         long userGroupId, com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
132             com.liferay.portal.SystemException {
133         return getPersistence().findByUserGroupId_First(userGroupId, obc);
134     }
135 
136     public static com.liferay.portal.model.UserGroupGroupRole findByUserGroupId_Last(
137         long userGroupId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
139             com.liferay.portal.SystemException {
140         return getPersistence().findByUserGroupId_Last(userGroupId, obc);
141     }
142 
143     public static com.liferay.portal.model.UserGroupGroupRole[] findByUserGroupId_PrevAndNext(
144         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
145         long userGroupId, com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
147             com.liferay.portal.SystemException {
148         return getPersistence()
149                    .findByUserGroupId_PrevAndNext(userGroupGroupRolePK,
150             userGroupId, obc);
151     }
152 
153     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
154         long groupId) throws com.liferay.portal.SystemException {
155         return getPersistence().findByGroupId(groupId);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
159         long groupId, int start, int end)
160         throws com.liferay.portal.SystemException {
161         return getPersistence().findByGroupId(groupId, start, end);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
165         long groupId, int start, int end,
166         com.liferay.portal.kernel.util.OrderByComparator obc)
167         throws com.liferay.portal.SystemException {
168         return getPersistence().findByGroupId(groupId, start, end, obc);
169     }
170 
171     public static com.liferay.portal.model.UserGroupGroupRole findByGroupId_First(
172         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
174             com.liferay.portal.SystemException {
175         return getPersistence().findByGroupId_First(groupId, obc);
176     }
177 
178     public static com.liferay.portal.model.UserGroupGroupRole findByGroupId_Last(
179         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
181             com.liferay.portal.SystemException {
182         return getPersistence().findByGroupId_Last(groupId, obc);
183     }
184 
185     public static com.liferay.portal.model.UserGroupGroupRole[] findByGroupId_PrevAndNext(
186         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
187         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
189             com.liferay.portal.SystemException {
190         return getPersistence()
191                    .findByGroupId_PrevAndNext(userGroupGroupRolePK, groupId, obc);
192     }
193 
194     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
195         long roleId) throws com.liferay.portal.SystemException {
196         return getPersistence().findByRoleId(roleId);
197     }
198 
199     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
200         long roleId, int start, int end)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().findByRoleId(roleId, start, end);
203     }
204 
205     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
206         long roleId, int start, int end,
207         com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException {
209         return getPersistence().findByRoleId(roleId, start, end, obc);
210     }
211 
212     public static com.liferay.portal.model.UserGroupGroupRole findByRoleId_First(
213         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
215             com.liferay.portal.SystemException {
216         return getPersistence().findByRoleId_First(roleId, obc);
217     }
218 
219     public static com.liferay.portal.model.UserGroupGroupRole findByRoleId_Last(
220         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
221         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
222             com.liferay.portal.SystemException {
223         return getPersistence().findByRoleId_Last(roleId, obc);
224     }
225 
226     public static com.liferay.portal.model.UserGroupGroupRole[] findByRoleId_PrevAndNext(
227         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
228         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
229         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
230             com.liferay.portal.SystemException {
231         return getPersistence()
232                    .findByRoleId_PrevAndNext(userGroupGroupRolePK, roleId, obc);
233     }
234 
235     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
236         long userGroupId, long groupId)
237         throws com.liferay.portal.SystemException {
238         return getPersistence().findByU_G(userGroupId, groupId);
239     }
240 
241     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
242         long userGroupId, long groupId, int start, int end)
243         throws com.liferay.portal.SystemException {
244         return getPersistence().findByU_G(userGroupId, groupId, start, end);
245     }
246 
247     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
248         long userGroupId, long groupId, int start, int end,
249         com.liferay.portal.kernel.util.OrderByComparator obc)
250         throws com.liferay.portal.SystemException {
251         return getPersistence().findByU_G(userGroupId, groupId, start, end, obc);
252     }
253 
254     public static com.liferay.portal.model.UserGroupGroupRole findByU_G_First(
255         long userGroupId, long groupId,
256         com.liferay.portal.kernel.util.OrderByComparator obc)
257         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
258             com.liferay.portal.SystemException {
259         return getPersistence().findByU_G_First(userGroupId, groupId, obc);
260     }
261 
262     public static com.liferay.portal.model.UserGroupGroupRole findByU_G_Last(
263         long userGroupId, long groupId,
264         com.liferay.portal.kernel.util.OrderByComparator obc)
265         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
266             com.liferay.portal.SystemException {
267         return getPersistence().findByU_G_Last(userGroupId, groupId, obc);
268     }
269 
270     public static com.liferay.portal.model.UserGroupGroupRole[] findByU_G_PrevAndNext(
271         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
272         long userGroupId, long groupId,
273         com.liferay.portal.kernel.util.OrderByComparator obc)
274         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
275             com.liferay.portal.SystemException {
276         return getPersistence()
277                    .findByU_G_PrevAndNext(userGroupGroupRolePK, userGroupId,
278             groupId, obc);
279     }
280 
281     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
282         long groupId, long roleId) throws com.liferay.portal.SystemException {
283         return getPersistence().findByG_R(groupId, roleId);
284     }
285 
286     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
287         long groupId, long roleId, int start, int end)
288         throws com.liferay.portal.SystemException {
289         return getPersistence().findByG_R(groupId, roleId, start, end);
290     }
291 
292     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
293         long groupId, long roleId, int start, int end,
294         com.liferay.portal.kernel.util.OrderByComparator obc)
295         throws com.liferay.portal.SystemException {
296         return getPersistence().findByG_R(groupId, roleId, start, end, obc);
297     }
298 
299     public static com.liferay.portal.model.UserGroupGroupRole findByG_R_First(
300         long groupId, long roleId,
301         com.liferay.portal.kernel.util.OrderByComparator obc)
302         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
303             com.liferay.portal.SystemException {
304         return getPersistence().findByG_R_First(groupId, roleId, obc);
305     }
306 
307     public static com.liferay.portal.model.UserGroupGroupRole findByG_R_Last(
308         long groupId, long roleId,
309         com.liferay.portal.kernel.util.OrderByComparator obc)
310         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
311             com.liferay.portal.SystemException {
312         return getPersistence().findByG_R_Last(groupId, roleId, obc);
313     }
314 
315     public static com.liferay.portal.model.UserGroupGroupRole[] findByG_R_PrevAndNext(
316         com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
317         long groupId, long roleId,
318         com.liferay.portal.kernel.util.OrderByComparator obc)
319         throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
320             com.liferay.portal.SystemException {
321         return getPersistence()
322                    .findByG_R_PrevAndNext(userGroupGroupRolePK, groupId,
323             roleId, obc);
324     }
325 
326     public static java.util.List<Object> findWithDynamicQuery(
327         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
328         throws com.liferay.portal.SystemException {
329         return getPersistence().findWithDynamicQuery(dynamicQuery);
330     }
331 
332     public static java.util.List<Object> findWithDynamicQuery(
333         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
334         int end) throws com.liferay.portal.SystemException {
335         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
336     }
337 
338     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll()
339         throws com.liferay.portal.SystemException {
340         return getPersistence().findAll();
341     }
342 
343     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> 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.UserGroupGroupRole> 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 removeByUserGroupId(long userGroupId)
355         throws com.liferay.portal.SystemException {
356         getPersistence().removeByUserGroupId(userGroupId);
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 userGroupId, long groupId)
370         throws com.liferay.portal.SystemException {
371         getPersistence().removeByU_G(userGroupId, 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 countByUserGroupId(long userGroupId)
384         throws com.liferay.portal.SystemException {
385         return getPersistence().countByUserGroupId(userGroupId);
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 userGroupId, long groupId)
399         throws com.liferay.portal.SystemException {
400         return getPersistence().countByU_G(userGroupId, 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 UserGroupGroupRolePersistence getPersistence() {
413         return _persistence;
414     }
415 
416     public void setPersistence(UserGroupGroupRolePersistence persistence) {
417         _persistence = persistence;
418     }
419 
420     private static UserGroupGroupRolePersistence _persistence;
421 }