1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  /**
27   * <a href="UserGroupRoleUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       UserGroupRolePersistence
36   * @see       UserGroupRolePersistenceImpl
37   * @generated
38   */
39  public class UserGroupRoleUtil {
40      public static void cacheResult(
41          com.liferay.portal.model.UserGroupRole userGroupRole) {
42          getPersistence().cacheResult(userGroupRole);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles) {
47          getPersistence().cacheResult(userGroupRoles);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portal.model.UserGroupRole create(
55          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
56          return getPersistence().create(userGroupRolePK);
57      }
58  
59      public static com.liferay.portal.model.UserGroupRole remove(
60          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
61          throws com.liferay.portal.NoSuchUserGroupRoleException,
62              com.liferay.portal.SystemException {
63          return getPersistence().remove(userGroupRolePK);
64      }
65  
66      public static com.liferay.portal.model.UserGroupRole remove(
67          com.liferay.portal.model.UserGroupRole userGroupRole)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(userGroupRole);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(UserGroupRole, boolean merge)}.
74       */
75      public static com.liferay.portal.model.UserGroupRole update(
76          com.liferay.portal.model.UserGroupRole userGroupRole)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(userGroupRole);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  userGroupRole the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when userGroupRole is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portal.model.UserGroupRole update(
94          com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(userGroupRole, merge);
97      }
98  
99      public static com.liferay.portal.model.UserGroupRole updateImpl(
100         com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(userGroupRole, merge);
103     }
104 
105     public static com.liferay.portal.model.UserGroupRole findByPrimaryKey(
106         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
107         throws com.liferay.portal.NoSuchUserGroupRoleException,
108             com.liferay.portal.SystemException {
109         return getPersistence().findByPrimaryKey(userGroupRolePK);
110     }
111 
112     public static com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
113         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().fetchByPrimaryKey(userGroupRolePK);
116     }
117 
118     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
119         long userId) throws com.liferay.portal.SystemException {
120         return getPersistence().findByUserId(userId);
121     }
122 
123     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
124         long userId, int start, int end)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().findByUserId(userId, start, end);
127     }
128 
129     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
130         long userId, int start, int end,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.SystemException {
133         return getPersistence().findByUserId(userId, start, end, obc);
134     }
135 
136     public static com.liferay.portal.model.UserGroupRole findByUserId_First(
137         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.NoSuchUserGroupRoleException,
139             com.liferay.portal.SystemException {
140         return getPersistence().findByUserId_First(userId, obc);
141     }
142 
143     public static com.liferay.portal.model.UserGroupRole findByUserId_Last(
144         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.NoSuchUserGroupRoleException,
146             com.liferay.portal.SystemException {
147         return getPersistence().findByUserId_Last(userId, obc);
148     }
149 
150     public static com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
151         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
152         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.NoSuchUserGroupRoleException,
154             com.liferay.portal.SystemException {
155         return getPersistence()
156                    .findByUserId_PrevAndNext(userGroupRolePK, userId, obc);
157     }
158 
159     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
160         long groupId) throws com.liferay.portal.SystemException {
161         return getPersistence().findByGroupId(groupId);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
165         long groupId, int start, int end)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByGroupId(groupId, start, end);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
171         long groupId, int start, int end,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException {
174         return getPersistence().findByGroupId(groupId, start, end, obc);
175     }
176 
177     public static com.liferay.portal.model.UserGroupRole findByGroupId_First(
178         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.NoSuchUserGroupRoleException,
180             com.liferay.portal.SystemException {
181         return getPersistence().findByGroupId_First(groupId, obc);
182     }
183 
184     public static com.liferay.portal.model.UserGroupRole findByGroupId_Last(
185         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.NoSuchUserGroupRoleException,
187             com.liferay.portal.SystemException {
188         return getPersistence().findByGroupId_Last(groupId, obc);
189     }
190 
191     public static com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
192         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
193         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.NoSuchUserGroupRoleException,
195             com.liferay.portal.SystemException {
196         return getPersistence()
197                    .findByGroupId_PrevAndNext(userGroupRolePK, groupId, obc);
198     }
199 
200     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
201         long roleId) throws com.liferay.portal.SystemException {
202         return getPersistence().findByRoleId(roleId);
203     }
204 
205     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
206         long roleId, int start, int end)
207         throws com.liferay.portal.SystemException {
208         return getPersistence().findByRoleId(roleId, start, end);
209     }
210 
211     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
212         long roleId, int start, int end,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException {
215         return getPersistence().findByRoleId(roleId, start, end, obc);
216     }
217 
218     public static com.liferay.portal.model.UserGroupRole findByRoleId_First(
219         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.NoSuchUserGroupRoleException,
221             com.liferay.portal.SystemException {
222         return getPersistence().findByRoleId_First(roleId, obc);
223     }
224 
225     public static com.liferay.portal.model.UserGroupRole findByRoleId_Last(
226         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.NoSuchUserGroupRoleException,
228             com.liferay.portal.SystemException {
229         return getPersistence().findByRoleId_Last(roleId, obc);
230     }
231 
232     public static com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
233         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
234         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
235         throws com.liferay.portal.NoSuchUserGroupRoleException,
236             com.liferay.portal.SystemException {
237         return getPersistence()
238                    .findByRoleId_PrevAndNext(userGroupRolePK, roleId, obc);
239     }
240 
241     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
242         long userId, long groupId) throws com.liferay.portal.SystemException {
243         return getPersistence().findByU_G(userId, groupId);
244     }
245 
246     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
247         long userId, long groupId, int start, int end)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findByU_G(userId, groupId, start, end);
250     }
251 
252     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
253         long userId, long groupId, int start, int end,
254         com.liferay.portal.kernel.util.OrderByComparator obc)
255         throws com.liferay.portal.SystemException {
256         return getPersistence().findByU_G(userId, groupId, start, end, obc);
257     }
258 
259     public static com.liferay.portal.model.UserGroupRole findByU_G_First(
260         long userId, long groupId,
261         com.liferay.portal.kernel.util.OrderByComparator obc)
262         throws com.liferay.portal.NoSuchUserGroupRoleException,
263             com.liferay.portal.SystemException {
264         return getPersistence().findByU_G_First(userId, groupId, obc);
265     }
266 
267     public static com.liferay.portal.model.UserGroupRole findByU_G_Last(
268         long userId, long groupId,
269         com.liferay.portal.kernel.util.OrderByComparator obc)
270         throws com.liferay.portal.NoSuchUserGroupRoleException,
271             com.liferay.portal.SystemException {
272         return getPersistence().findByU_G_Last(userId, groupId, obc);
273     }
274 
275     public static com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
276         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
277         long userId, long groupId,
278         com.liferay.portal.kernel.util.OrderByComparator obc)
279         throws com.liferay.portal.NoSuchUserGroupRoleException,
280             com.liferay.portal.SystemException {
281         return getPersistence()
282                    .findByU_G_PrevAndNext(userGroupRolePK, userId, groupId, obc);
283     }
284 
285     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
286         long groupId, long roleId) throws com.liferay.portal.SystemException {
287         return getPersistence().findByG_R(groupId, roleId);
288     }
289 
290     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
291         long groupId, long roleId, int start, int end)
292         throws com.liferay.portal.SystemException {
293         return getPersistence().findByG_R(groupId, roleId, start, end);
294     }
295 
296     public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
297         long groupId, long roleId, int start, int end,
298         com.liferay.portal.kernel.util.OrderByComparator obc)
299         throws com.liferay.portal.SystemException {
300         return getPersistence().findByG_R(groupId, roleId, start, end, obc);
301     }
302 
303     public static com.liferay.portal.model.UserGroupRole findByG_R_First(
304         long groupId, long roleId,
305         com.liferay.portal.kernel.util.OrderByComparator obc)
306         throws com.liferay.portal.NoSuchUserGroupRoleException,
307             com.liferay.portal.SystemException {
308         return getPersistence().findByG_R_First(groupId, roleId, obc);
309     }
310 
311     public static com.liferay.portal.model.UserGroupRole findByG_R_Last(
312         long groupId, long roleId,
313         com.liferay.portal.kernel.util.OrderByComparator obc)
314         throws com.liferay.portal.NoSuchUserGroupRoleException,
315             com.liferay.portal.SystemException {
316         return getPersistence().findByG_R_Last(groupId, roleId, obc);
317     }
318 
319     public static com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
320         com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
321         long groupId, long roleId,
322         com.liferay.portal.kernel.util.OrderByComparator obc)
323         throws com.liferay.portal.NoSuchUserGroupRoleException,
324             com.liferay.portal.SystemException {
325         return getPersistence()
326                    .findByG_R_PrevAndNext(userGroupRolePK, groupId, roleId, obc);
327     }
328 
329     public static java.util.List<Object> findWithDynamicQuery(
330         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
331         throws com.liferay.portal.SystemException {
332         return getPersistence().findWithDynamicQuery(dynamicQuery);
333     }
334 
335     public static java.util.List<Object> findWithDynamicQuery(
336         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
337         int end) throws com.liferay.portal.SystemException {
338         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
339     }
340 
341     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll()
342         throws com.liferay.portal.SystemException {
343         return getPersistence().findAll();
344     }
345 
346     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
347         int start, int end) throws com.liferay.portal.SystemException {
348         return getPersistence().findAll(start, end);
349     }
350 
351     public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
352         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
353         throws com.liferay.portal.SystemException {
354         return getPersistence().findAll(start, end, obc);
355     }
356 
357     public static void removeByUserId(long userId)
358         throws com.liferay.portal.SystemException {
359         getPersistence().removeByUserId(userId);
360     }
361 
362     public static void removeByGroupId(long groupId)
363         throws com.liferay.portal.SystemException {
364         getPersistence().removeByGroupId(groupId);
365     }
366 
367     public static void removeByRoleId(long roleId)
368         throws com.liferay.portal.SystemException {
369         getPersistence().removeByRoleId(roleId);
370     }
371 
372     public static void removeByU_G(long userId, long groupId)
373         throws com.liferay.portal.SystemException {
374         getPersistence().removeByU_G(userId, groupId);
375     }
376 
377     public static void removeByG_R(long groupId, long roleId)
378         throws com.liferay.portal.SystemException {
379         getPersistence().removeByG_R(groupId, roleId);
380     }
381 
382     public static void removeAll() throws com.liferay.portal.SystemException {
383         getPersistence().removeAll();
384     }
385 
386     public static int countByUserId(long userId)
387         throws com.liferay.portal.SystemException {
388         return getPersistence().countByUserId(userId);
389     }
390 
391     public static int countByGroupId(long groupId)
392         throws com.liferay.portal.SystemException {
393         return getPersistence().countByGroupId(groupId);
394     }
395 
396     public static int countByRoleId(long roleId)
397         throws com.liferay.portal.SystemException {
398         return getPersistence().countByRoleId(roleId);
399     }
400 
401     public static int countByU_G(long userId, long groupId)
402         throws com.liferay.portal.SystemException {
403         return getPersistence().countByU_G(userId, groupId);
404     }
405 
406     public static int countByG_R(long groupId, long roleId)
407         throws com.liferay.portal.SystemException {
408         return getPersistence().countByG_R(groupId, roleId);
409     }
410 
411     public static int countAll() throws com.liferay.portal.SystemException {
412         return getPersistence().countAll();
413     }
414 
415     public static UserGroupRolePersistence getPersistence() {
416         return _persistence;
417     }
418 
419     public void setPersistence(UserGroupRolePersistence persistence) {
420         _persistence = persistence;
421     }
422 
423     private static UserGroupRolePersistence _persistence;
424 }