1   /**
2    * Copyright (c) 2000-2008 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="UserGroupRoleUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class UserGroupRoleUtil {
32      public static com.liferay.portal.model.UserGroupRole create(
33          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
34          return getPersistence().create(userGroupRolePK);
35      }
36  
37      public static com.liferay.portal.model.UserGroupRole remove(
38          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portal.NoSuchUserGroupRoleException {
41          return getPersistence().remove(userGroupRolePK);
42      }
43  
44      public static com.liferay.portal.model.UserGroupRole remove(
45          com.liferay.portal.model.UserGroupRole userGroupRole)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(userGroupRole);
48      }
49  
50      public static com.liferay.portal.model.UserGroupRole update(
51          com.liferay.portal.model.UserGroupRole userGroupRole)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(userGroupRole);
54      }
55  
56      public static com.liferay.portal.model.UserGroupRole update(
57          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
58          throws com.liferay.portal.SystemException {
59          return getPersistence().update(userGroupRole, merge);
60      }
61  
62      public static com.liferay.portal.model.UserGroupRole updateImpl(
63          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
64          throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(userGroupRole, merge);
66      }
67  
68      public static com.liferay.portal.model.UserGroupRole findByPrimaryKey(
69          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.NoSuchUserGroupRoleException {
72          return getPersistence().findByPrimaryKey(userGroupRolePK);
73      }
74  
75      public static com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
76          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().fetchByPrimaryKey(userGroupRolePK);
79      }
80  
81      public static java.util.List findByUserId(long userId)
82          throws com.liferay.portal.SystemException {
83          return getPersistence().findByUserId(userId);
84      }
85  
86      public static java.util.List findByUserId(long userId, int begin, int end)
87          throws com.liferay.portal.SystemException {
88          return getPersistence().findByUserId(userId, begin, end);
89      }
90  
91      public static java.util.List findByUserId(long userId, int begin, int end,
92          com.liferay.portal.kernel.util.OrderByComparator obc)
93          throws com.liferay.portal.SystemException {
94          return getPersistence().findByUserId(userId, begin, end, obc);
95      }
96  
97      public static com.liferay.portal.model.UserGroupRole findByUserId_First(
98          long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException, 
100             com.liferay.portal.NoSuchUserGroupRoleException {
101         return getPersistence().findByUserId_First(userId, obc);
102     }
103 
104     public static com.liferay.portal.model.UserGroupRole findByUserId_Last(
105         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException, 
107             com.liferay.portal.NoSuchUserGroupRoleException {
108         return getPersistence().findByUserId_Last(userId, obc);
109     }
110 
111     public static com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
112         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
113         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException, 
115             com.liferay.portal.NoSuchUserGroupRoleException {
116         return getPersistence().findByUserId_PrevAndNext(userGroupRolePK,
117             userId, obc);
118     }
119 
120     public static java.util.List findByGroupId(long groupId)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByGroupId(groupId);
123     }
124 
125     public static java.util.List findByGroupId(long groupId, int begin, int end)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().findByGroupId(groupId, begin, end);
128     }
129 
130     public static java.util.List findByGroupId(long groupId, int begin,
131         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.SystemException {
133         return getPersistence().findByGroupId(groupId, begin, end, obc);
134     }
135 
136     public static com.liferay.portal.model.UserGroupRole findByGroupId_First(
137         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException, 
139             com.liferay.portal.NoSuchUserGroupRoleException {
140         return getPersistence().findByGroupId_First(groupId, obc);
141     }
142 
143     public static com.liferay.portal.model.UserGroupRole findByGroupId_Last(
144         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException, 
146             com.liferay.portal.NoSuchUserGroupRoleException {
147         return getPersistence().findByGroupId_Last(groupId, obc);
148     }
149 
150     public static com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
151         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
152         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException, 
154             com.liferay.portal.NoSuchUserGroupRoleException {
155         return getPersistence().findByGroupId_PrevAndNext(userGroupRolePK,
156             groupId, obc);
157     }
158 
159     public static java.util.List findByRoleId(long roleId)
160         throws com.liferay.portal.SystemException {
161         return getPersistence().findByRoleId(roleId);
162     }
163 
164     public static java.util.List findByRoleId(long roleId, int begin, int end)
165         throws com.liferay.portal.SystemException {
166         return getPersistence().findByRoleId(roleId, begin, end);
167     }
168 
169     public static java.util.List findByRoleId(long roleId, int begin, int end,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException {
172         return getPersistence().findByRoleId(roleId, begin, end, obc);
173     }
174 
175     public static com.liferay.portal.model.UserGroupRole findByRoleId_First(
176         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException, 
178             com.liferay.portal.NoSuchUserGroupRoleException {
179         return getPersistence().findByRoleId_First(roleId, obc);
180     }
181 
182     public static com.liferay.portal.model.UserGroupRole findByRoleId_Last(
183         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException, 
185             com.liferay.portal.NoSuchUserGroupRoleException {
186         return getPersistence().findByRoleId_Last(roleId, obc);
187     }
188 
189     public static com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
190         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
191         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException, 
193             com.liferay.portal.NoSuchUserGroupRoleException {
194         return getPersistence().findByRoleId_PrevAndNext(userGroupRolePK,
195             roleId, obc);
196     }
197 
198     public static java.util.List findByU_G(long userId, long groupId)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().findByU_G(userId, groupId);
201     }
202 
203     public static java.util.List findByU_G(long userId, long groupId,
204         int begin, int end) throws com.liferay.portal.SystemException {
205         return getPersistence().findByU_G(userId, groupId, begin, end);
206     }
207 
208     public static java.util.List findByU_G(long userId, long groupId,
209         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
210         throws com.liferay.portal.SystemException {
211         return getPersistence().findByU_G(userId, groupId, begin, end, obc);
212     }
213 
214     public static com.liferay.portal.model.UserGroupRole findByU_G_First(
215         long userId, long groupId,
216         com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException, 
218             com.liferay.portal.NoSuchUserGroupRoleException {
219         return getPersistence().findByU_G_First(userId, groupId, obc);
220     }
221 
222     public static com.liferay.portal.model.UserGroupRole findByU_G_Last(
223         long userId, long groupId,
224         com.liferay.portal.kernel.util.OrderByComparator obc)
225         throws com.liferay.portal.SystemException, 
226             com.liferay.portal.NoSuchUserGroupRoleException {
227         return getPersistence().findByU_G_Last(userId, groupId, obc);
228     }
229 
230     public static com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
231         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
232         long userId, long groupId,
233         com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.SystemException, 
235             com.liferay.portal.NoSuchUserGroupRoleException {
236         return getPersistence().findByU_G_PrevAndNext(userGroupRolePK, userId,
237             groupId, obc);
238     }
239 
240     public static java.util.List findByG_R(long groupId, long roleId)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().findByG_R(groupId, roleId);
243     }
244 
245     public static java.util.List findByG_R(long groupId, long roleId,
246         int begin, int end) throws com.liferay.portal.SystemException {
247         return getPersistence().findByG_R(groupId, roleId, begin, end);
248     }
249 
250     public static java.util.List findByG_R(long groupId, long roleId,
251         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
252         throws com.liferay.portal.SystemException {
253         return getPersistence().findByG_R(groupId, roleId, begin, end, obc);
254     }
255 
256     public static com.liferay.portal.model.UserGroupRole findByG_R_First(
257         long groupId, long roleId,
258         com.liferay.portal.kernel.util.OrderByComparator obc)
259         throws com.liferay.portal.SystemException, 
260             com.liferay.portal.NoSuchUserGroupRoleException {
261         return getPersistence().findByG_R_First(groupId, roleId, obc);
262     }
263 
264     public static com.liferay.portal.model.UserGroupRole findByG_R_Last(
265         long groupId, long roleId,
266         com.liferay.portal.kernel.util.OrderByComparator obc)
267         throws com.liferay.portal.SystemException, 
268             com.liferay.portal.NoSuchUserGroupRoleException {
269         return getPersistence().findByG_R_Last(groupId, roleId, obc);
270     }
271 
272     public static com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
273         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
274         long groupId, long roleId,
275         com.liferay.portal.kernel.util.OrderByComparator obc)
276         throws com.liferay.portal.SystemException, 
277             com.liferay.portal.NoSuchUserGroupRoleException {
278         return getPersistence().findByG_R_PrevAndNext(userGroupRolePK, groupId,
279             roleId, obc);
280     }
281 
282     public static java.util.List findWithDynamicQuery(
283         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
284         throws com.liferay.portal.SystemException {
285         return getPersistence().findWithDynamicQuery(queryInitializer);
286     }
287 
288     public static java.util.List findWithDynamicQuery(
289         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
290         int begin, int end) throws com.liferay.portal.SystemException {
291         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
292             end);
293     }
294 
295     public static java.util.List findAll()
296         throws com.liferay.portal.SystemException {
297         return getPersistence().findAll();
298     }
299 
300     public static java.util.List findAll(int begin, int end)
301         throws com.liferay.portal.SystemException {
302         return getPersistence().findAll(begin, end);
303     }
304 
305     public static java.util.List findAll(int begin, int end,
306         com.liferay.portal.kernel.util.OrderByComparator obc)
307         throws com.liferay.portal.SystemException {
308         return getPersistence().findAll(begin, end, obc);
309     }
310 
311     public static void removeByUserId(long userId)
312         throws com.liferay.portal.SystemException {
313         getPersistence().removeByUserId(userId);
314     }
315 
316     public static void removeByGroupId(long groupId)
317         throws com.liferay.portal.SystemException {
318         getPersistence().removeByGroupId(groupId);
319     }
320 
321     public static void removeByRoleId(long roleId)
322         throws com.liferay.portal.SystemException {
323         getPersistence().removeByRoleId(roleId);
324     }
325 
326     public static void removeByU_G(long userId, long groupId)
327         throws com.liferay.portal.SystemException {
328         getPersistence().removeByU_G(userId, groupId);
329     }
330 
331     public static void removeByG_R(long groupId, long roleId)
332         throws com.liferay.portal.SystemException {
333         getPersistence().removeByG_R(groupId, roleId);
334     }
335 
336     public static void removeAll() throws com.liferay.portal.SystemException {
337         getPersistence().removeAll();
338     }
339 
340     public static int countByUserId(long userId)
341         throws com.liferay.portal.SystemException {
342         return getPersistence().countByUserId(userId);
343     }
344 
345     public static int countByGroupId(long groupId)
346         throws com.liferay.portal.SystemException {
347         return getPersistence().countByGroupId(groupId);
348     }
349 
350     public static int countByRoleId(long roleId)
351         throws com.liferay.portal.SystemException {
352         return getPersistence().countByRoleId(roleId);
353     }
354 
355     public static int countByU_G(long userId, long groupId)
356         throws com.liferay.portal.SystemException {
357         return getPersistence().countByU_G(userId, groupId);
358     }
359 
360     public static int countByG_R(long groupId, long roleId)
361         throws com.liferay.portal.SystemException {
362         return getPersistence().countByG_R(groupId, roleId);
363     }
364 
365     public static int countAll() throws com.liferay.portal.SystemException {
366         return getPersistence().countAll();
367     }
368 
369     public static UserGroupRolePersistence getPersistence() {
370         return _getUtil()._persistence;
371     }
372 
373     public void setPersistence(UserGroupRolePersistence persistence) {
374         _persistence = persistence;
375     }
376 
377     private static UserGroupRoleUtil _getUtil() {
378         if (_util == null) {
379             _util = (UserGroupRoleUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
380         }
381 
382         return _util;
383     }
384 
385     private static final String _UTIL = UserGroupRoleUtil.class.getName();
386     private static UserGroupRoleUtil _util;
387     private UserGroupRolePersistence _persistence;
388 }