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