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