001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.UserGroupRole;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       UserGroupRolePersistence
029     * @see       UserGroupRolePersistenceImpl
030     * @generated
031     */
032    public class UserGroupRoleUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(UserGroupRole userGroupRole) {
044                    getPersistence().clearCache(userGroupRole);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<UserGroupRole> findWithDynamicQuery(
059                    DynamicQuery dynamicQuery) throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<UserGroupRole> findWithDynamicQuery(
067                    DynamicQuery dynamicQuery, int start, int end)
068                    throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<UserGroupRole> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery, int start, int end,
077                    OrderByComparator orderByComparator) throws SystemException {
078                    return getPersistence()
079                                       .findWithDynamicQuery(dynamicQuery, start, end,
080                            orderByComparator);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static UserGroupRole remove(UserGroupRole userGroupRole)
087                    throws SystemException {
088                    return getPersistence().remove(userGroupRole);
089            }
090    
091            /**
092             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
093             */
094            public static UserGroupRole update(UserGroupRole userGroupRole,
095                    boolean merge) throws SystemException {
096                    return getPersistence().update(userGroupRole, merge);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
101             */
102            public static UserGroupRole update(UserGroupRole userGroupRole,
103                    boolean merge, ServiceContext serviceContext) throws SystemException {
104                    return getPersistence().update(userGroupRole, merge, serviceContext);
105            }
106    
107            public static void cacheResult(
108                    com.liferay.portal.model.UserGroupRole userGroupRole) {
109                    getPersistence().cacheResult(userGroupRole);
110            }
111    
112            public static void cacheResult(
113                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles) {
114                    getPersistence().cacheResult(userGroupRoles);
115            }
116    
117            public static com.liferay.portal.model.UserGroupRole create(
118                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
119                    return getPersistence().create(userGroupRolePK);
120            }
121    
122            public static com.liferay.portal.model.UserGroupRole remove(
123                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
124                    throws com.liferay.portal.NoSuchUserGroupRoleException,
125                            com.liferay.portal.kernel.exception.SystemException {
126                    return getPersistence().remove(userGroupRolePK);
127            }
128    
129            public static com.liferay.portal.model.UserGroupRole updateImpl(
130                    com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
131                    throws com.liferay.portal.kernel.exception.SystemException {
132                    return getPersistence().updateImpl(userGroupRole, merge);
133            }
134    
135            public static com.liferay.portal.model.UserGroupRole findByPrimaryKey(
136                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
137                    throws com.liferay.portal.NoSuchUserGroupRoleException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    return getPersistence().findByPrimaryKey(userGroupRolePK);
140            }
141    
142            public static com.liferay.portal.model.UserGroupRole fetchByPrimaryKey(
143                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getPersistence().fetchByPrimaryKey(userGroupRolePK);
146            }
147    
148            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
149                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
150                    return getPersistence().findByUserId(userId);
151            }
152    
153            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
154                    long userId, int start, int end)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getPersistence().findByUserId(userId, start, end);
157            }
158    
159            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByUserId(
160                    long userId, int start, int end,
161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence()
164                                       .findByUserId(userId, start, end, orderByComparator);
165            }
166    
167            public static com.liferay.portal.model.UserGroupRole findByUserId_First(
168                    long userId,
169                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
170                    throws com.liferay.portal.NoSuchUserGroupRoleException,
171                            com.liferay.portal.kernel.exception.SystemException {
172                    return getPersistence().findByUserId_First(userId, orderByComparator);
173            }
174    
175            public static com.liferay.portal.model.UserGroupRole findByUserId_Last(
176                    long userId,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.NoSuchUserGroupRoleException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getPersistence().findByUserId_Last(userId, orderByComparator);
181            }
182    
183            public static com.liferay.portal.model.UserGroupRole[] findByUserId_PrevAndNext(
184                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
185                    long userId,
186                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
187                    throws com.liferay.portal.NoSuchUserGroupRoleException,
188                            com.liferay.portal.kernel.exception.SystemException {
189                    return getPersistence()
190                                       .findByUserId_PrevAndNext(userGroupRolePK, userId,
191                            orderByComparator);
192            }
193    
194            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
195                    long groupId)
196                    throws com.liferay.portal.kernel.exception.SystemException {
197                    return getPersistence().findByGroupId(groupId);
198            }
199    
200            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
201                    long groupId, int start, int end)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByGroupId(groupId, start, end);
204            }
205    
206            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByGroupId(
207                    long groupId, int start, int end,
208                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
209                    throws com.liferay.portal.kernel.exception.SystemException {
210                    return getPersistence()
211                                       .findByGroupId(groupId, start, end, orderByComparator);
212            }
213    
214            public static com.liferay.portal.model.UserGroupRole findByGroupId_First(
215                    long groupId,
216                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
217                    throws com.liferay.portal.NoSuchUserGroupRoleException,
218                            com.liferay.portal.kernel.exception.SystemException {
219                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
220            }
221    
222            public static com.liferay.portal.model.UserGroupRole findByGroupId_Last(
223                    long groupId,
224                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
225                    throws com.liferay.portal.NoSuchUserGroupRoleException,
226                            com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
228            }
229    
230            public static com.liferay.portal.model.UserGroupRole[] findByGroupId_PrevAndNext(
231                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
232                    long groupId,
233                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
234                    throws com.liferay.portal.NoSuchUserGroupRoleException,
235                            com.liferay.portal.kernel.exception.SystemException {
236                    return getPersistence()
237                                       .findByGroupId_PrevAndNext(userGroupRolePK, groupId,
238                            orderByComparator);
239            }
240    
241            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
242                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence().findByRoleId(roleId);
244            }
245    
246            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
247                    long roleId, int start, int end)
248                    throws com.liferay.portal.kernel.exception.SystemException {
249                    return getPersistence().findByRoleId(roleId, start, end);
250            }
251    
252            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByRoleId(
253                    long roleId, int start, int end,
254                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    return getPersistence()
257                                       .findByRoleId(roleId, start, end, orderByComparator);
258            }
259    
260            public static com.liferay.portal.model.UserGroupRole findByRoleId_First(
261                    long roleId,
262                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
263                    throws com.liferay.portal.NoSuchUserGroupRoleException,
264                            com.liferay.portal.kernel.exception.SystemException {
265                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
266            }
267    
268            public static com.liferay.portal.model.UserGroupRole findByRoleId_Last(
269                    long roleId,
270                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
271                    throws com.liferay.portal.NoSuchUserGroupRoleException,
272                            com.liferay.portal.kernel.exception.SystemException {
273                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
274            }
275    
276            public static com.liferay.portal.model.UserGroupRole[] findByRoleId_PrevAndNext(
277                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
278                    long roleId,
279                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280                    throws com.liferay.portal.NoSuchUserGroupRoleException,
281                            com.liferay.portal.kernel.exception.SystemException {
282                    return getPersistence()
283                                       .findByRoleId_PrevAndNext(userGroupRolePK, roleId,
284                            orderByComparator);
285            }
286    
287            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
288                    long userId, long groupId)
289                    throws com.liferay.portal.kernel.exception.SystemException {
290                    return getPersistence().findByU_G(userId, groupId);
291            }
292    
293            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
294                    long userId, long groupId, int start, int end)
295                    throws com.liferay.portal.kernel.exception.SystemException {
296                    return getPersistence().findByU_G(userId, groupId, start, end);
297            }
298    
299            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByU_G(
300                    long userId, long groupId, int start, int end,
301                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
302                    throws com.liferay.portal.kernel.exception.SystemException {
303                    return getPersistence()
304                                       .findByU_G(userId, groupId, start, end, orderByComparator);
305            }
306    
307            public static com.liferay.portal.model.UserGroupRole findByU_G_First(
308                    long userId, long groupId,
309                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
310                    throws com.liferay.portal.NoSuchUserGroupRoleException,
311                            com.liferay.portal.kernel.exception.SystemException {
312                    return getPersistence()
313                                       .findByU_G_First(userId, groupId, orderByComparator);
314            }
315    
316            public static com.liferay.portal.model.UserGroupRole findByU_G_Last(
317                    long userId, long groupId,
318                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
319                    throws com.liferay.portal.NoSuchUserGroupRoleException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    return getPersistence()
322                                       .findByU_G_Last(userId, groupId, orderByComparator);
323            }
324    
325            public static com.liferay.portal.model.UserGroupRole[] findByU_G_PrevAndNext(
326                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
327                    long userId, long groupId,
328                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
329                    throws com.liferay.portal.NoSuchUserGroupRoleException,
330                            com.liferay.portal.kernel.exception.SystemException {
331                    return getPersistence()
332                                       .findByU_G_PrevAndNext(userGroupRolePK, userId, groupId,
333                            orderByComparator);
334            }
335    
336            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
337                    long groupId, long roleId)
338                    throws com.liferay.portal.kernel.exception.SystemException {
339                    return getPersistence().findByG_R(groupId, roleId);
340            }
341    
342            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
343                    long groupId, long roleId, int start, int end)
344                    throws com.liferay.portal.kernel.exception.SystemException {
345                    return getPersistence().findByG_R(groupId, roleId, start, end);
346            }
347    
348            public static java.util.List<com.liferay.portal.model.UserGroupRole> findByG_R(
349                    long groupId, long roleId, int start, int end,
350                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
351                    throws com.liferay.portal.kernel.exception.SystemException {
352                    return getPersistence()
353                                       .findByG_R(groupId, roleId, start, end, orderByComparator);
354            }
355    
356            public static com.liferay.portal.model.UserGroupRole findByG_R_First(
357                    long groupId, long roleId,
358                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
359                    throws com.liferay.portal.NoSuchUserGroupRoleException,
360                            com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence()
362                                       .findByG_R_First(groupId, roleId, orderByComparator);
363            }
364    
365            public static com.liferay.portal.model.UserGroupRole findByG_R_Last(
366                    long groupId, long roleId,
367                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
368                    throws com.liferay.portal.NoSuchUserGroupRoleException,
369                            com.liferay.portal.kernel.exception.SystemException {
370                    return getPersistence()
371                                       .findByG_R_Last(groupId, roleId, orderByComparator);
372            }
373    
374            public static com.liferay.portal.model.UserGroupRole[] findByG_R_PrevAndNext(
375                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK,
376                    long groupId, long roleId,
377                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
378                    throws com.liferay.portal.NoSuchUserGroupRoleException,
379                            com.liferay.portal.kernel.exception.SystemException {
380                    return getPersistence()
381                                       .findByG_R_PrevAndNext(userGroupRolePK, groupId, roleId,
382                            orderByComparator);
383            }
384    
385            public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll()
386                    throws com.liferay.portal.kernel.exception.SystemException {
387                    return getPersistence().findAll();
388            }
389    
390            public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
391                    int start, int end)
392                    throws com.liferay.portal.kernel.exception.SystemException {
393                    return getPersistence().findAll(start, end);
394            }
395    
396            public static java.util.List<com.liferay.portal.model.UserGroupRole> findAll(
397                    int start, int end,
398                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
399                    throws com.liferay.portal.kernel.exception.SystemException {
400                    return getPersistence().findAll(start, end, orderByComparator);
401            }
402    
403            public static void removeByUserId(long userId)
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    getPersistence().removeByUserId(userId);
406            }
407    
408            public static void removeByGroupId(long groupId)
409                    throws com.liferay.portal.kernel.exception.SystemException {
410                    getPersistence().removeByGroupId(groupId);
411            }
412    
413            public static void removeByRoleId(long roleId)
414                    throws com.liferay.portal.kernel.exception.SystemException {
415                    getPersistence().removeByRoleId(roleId);
416            }
417    
418            public static void removeByU_G(long userId, long groupId)
419                    throws com.liferay.portal.kernel.exception.SystemException {
420                    getPersistence().removeByU_G(userId, groupId);
421            }
422    
423            public static void removeByG_R(long groupId, long roleId)
424                    throws com.liferay.portal.kernel.exception.SystemException {
425                    getPersistence().removeByG_R(groupId, roleId);
426            }
427    
428            public static void removeAll()
429                    throws com.liferay.portal.kernel.exception.SystemException {
430                    getPersistence().removeAll();
431            }
432    
433            public static int countByUserId(long userId)
434                    throws com.liferay.portal.kernel.exception.SystemException {
435                    return getPersistence().countByUserId(userId);
436            }
437    
438            public static int countByGroupId(long groupId)
439                    throws com.liferay.portal.kernel.exception.SystemException {
440                    return getPersistence().countByGroupId(groupId);
441            }
442    
443            public static int countByRoleId(long roleId)
444                    throws com.liferay.portal.kernel.exception.SystemException {
445                    return getPersistence().countByRoleId(roleId);
446            }
447    
448            public static int countByU_G(long userId, long groupId)
449                    throws com.liferay.portal.kernel.exception.SystemException {
450                    return getPersistence().countByU_G(userId, groupId);
451            }
452    
453            public static int countByG_R(long groupId, long roleId)
454                    throws com.liferay.portal.kernel.exception.SystemException {
455                    return getPersistence().countByG_R(groupId, roleId);
456            }
457    
458            public static int countAll()
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return getPersistence().countAll();
461            }
462    
463            public static UserGroupRolePersistence getPersistence() {
464                    if (_persistence == null) {
465                            _persistence = (UserGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupRolePersistence.class.getName());
466                    }
467    
468                    return _persistence;
469            }
470    
471            public void setPersistence(UserGroupRolePersistence persistence) {
472                    _persistence = persistence;
473            }
474    
475            private static UserGroupRolePersistence _persistence;
476    }