001    /**
002     * Copyright (c) 2000-2012 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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.UserGroupGroupRole;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the user group group role service. This utility wraps {@link UserGroupGroupRolePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see UserGroupGroupRolePersistence
036     * @see UserGroupGroupRolePersistenceImpl
037     * @generated
038     */
039    public class UserGroupGroupRoleUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(UserGroupGroupRole userGroupGroupRole) {
057                    getPersistence().clearCache(userGroupGroupRole);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<UserGroupGroupRole> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<UserGroupGroupRole> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<UserGroupGroupRole> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static UserGroupGroupRole update(
100                    UserGroupGroupRole userGroupGroupRole) throws SystemException {
101                    return getPersistence().update(userGroupGroupRole);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static UserGroupGroupRole update(
108                    UserGroupGroupRole userGroupGroupRole, ServiceContext serviceContext)
109                    throws SystemException {
110                    return getPersistence().update(userGroupGroupRole, serviceContext);
111            }
112    
113            /**
114            * Caches the user group group role in the entity cache if it is enabled.
115            *
116            * @param userGroupGroupRole the user group group role
117            */
118            public static void cacheResult(
119                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) {
120                    getPersistence().cacheResult(userGroupGroupRole);
121            }
122    
123            /**
124            * Caches the user group group roles in the entity cache if it is enabled.
125            *
126            * @param userGroupGroupRoles the user group group roles
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portal.model.UserGroupGroupRole> userGroupGroupRoles) {
130                    getPersistence().cacheResult(userGroupGroupRoles);
131            }
132    
133            /**
134            * Creates a new user group group role with the primary key. Does not add the user group group role to the database.
135            *
136            * @param userGroupGroupRolePK the primary key for the new user group group role
137            * @return the new user group group role
138            */
139            public static com.liferay.portal.model.UserGroupGroupRole create(
140                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
141                    return getPersistence().create(userGroupGroupRolePK);
142            }
143    
144            /**
145            * Removes the user group group role with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param userGroupGroupRolePK the primary key of the user group group role
148            * @return the user group group role that was removed
149            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portal.model.UserGroupGroupRole remove(
153                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
154                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
155                            com.liferay.portal.kernel.exception.SystemException {
156                    return getPersistence().remove(userGroupGroupRolePK);
157            }
158    
159            public static com.liferay.portal.model.UserGroupGroupRole updateImpl(
160                    com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence().updateImpl(userGroupGroupRole);
163            }
164    
165            /**
166            * Returns the user group group role with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupGroupRoleException} if it could not be found.
167            *
168            * @param userGroupGroupRolePK the primary key of the user group group role
169            * @return the user group group role
170            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portal.model.UserGroupGroupRole findByPrimaryKey(
174                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
175                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    return getPersistence().findByPrimaryKey(userGroupGroupRolePK);
178            }
179    
180            /**
181            * Returns the user group group role with the primary key or returns <code>null</code> if it could not be found.
182            *
183            * @param userGroupGroupRolePK the primary key of the user group group role
184            * @return the user group group role, or <code>null</code> if a user group group role with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portal.model.UserGroupGroupRole fetchByPrimaryKey(
188                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(userGroupGroupRolePK);
191            }
192    
193            /**
194            * Returns all the user group group roles where userGroupId = &#63;.
195            *
196            * @param userGroupId the user group ID
197            * @return the matching user group group roles
198            * @throws SystemException if a system exception occurred
199            */
200            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
201                    long userGroupId)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByUserGroupId(userGroupId);
204            }
205    
206            /**
207            * Returns a range of all the user group group roles where userGroupId = &#63;.
208            *
209            * <p>
210            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
211            * </p>
212            *
213            * @param userGroupId the user group ID
214            * @param start the lower bound of the range of user group group roles
215            * @param end the upper bound of the range of user group group roles (not inclusive)
216            * @return the range of matching user group group roles
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
220                    long userGroupId, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence().findByUserGroupId(userGroupId, start, end);
223            }
224    
225            /**
226            * Returns an ordered range of all the user group group roles where userGroupId = &#63;.
227            *
228            * <p>
229            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
230            * </p>
231            *
232            * @param userGroupId the user group ID
233            * @param start the lower bound of the range of user group group roles
234            * @param end the upper bound of the range of user group group roles (not inclusive)
235            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
236            * @return the ordered range of matching user group group roles
237            * @throws SystemException if a system exception occurred
238            */
239            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByUserGroupId(
240                    long userGroupId, int start, int end,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence()
244                                       .findByUserGroupId(userGroupId, start, end, orderByComparator);
245            }
246    
247            /**
248            * Returns the first user group group role in the ordered set where userGroupId = &#63;.
249            *
250            * @param userGroupId the user group ID
251            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
252            * @return the first matching user group group role
253            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
254            * @throws SystemException if a system exception occurred
255            */
256            public static com.liferay.portal.model.UserGroupGroupRole findByUserGroupId_First(
257                    long userGroupId,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence()
262                                       .findByUserGroupId_First(userGroupId, orderByComparator);
263            }
264    
265            /**
266            * Returns the first user group group role in the ordered set where userGroupId = &#63;.
267            *
268            * @param userGroupId the user group ID
269            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
270            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
271            * @throws SystemException if a system exception occurred
272            */
273            public static com.liferay.portal.model.UserGroupGroupRole fetchByUserGroupId_First(
274                    long userGroupId,
275                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
276                    throws com.liferay.portal.kernel.exception.SystemException {
277                    return getPersistence()
278                                       .fetchByUserGroupId_First(userGroupId, orderByComparator);
279            }
280    
281            /**
282            * Returns the last user group group role in the ordered set where userGroupId = &#63;.
283            *
284            * @param userGroupId the user group ID
285            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
286            * @return the last matching user group group role
287            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
288            * @throws SystemException if a system exception occurred
289            */
290            public static com.liferay.portal.model.UserGroupGroupRole findByUserGroupId_Last(
291                    long userGroupId,
292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    return getPersistence()
296                                       .findByUserGroupId_Last(userGroupId, orderByComparator);
297            }
298    
299            /**
300            * Returns the last user group group role in the ordered set where userGroupId = &#63;.
301            *
302            * @param userGroupId the user group ID
303            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
304            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
305            * @throws SystemException if a system exception occurred
306            */
307            public static com.liferay.portal.model.UserGroupGroupRole fetchByUserGroupId_Last(
308                    long userGroupId,
309                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
310                    throws com.liferay.portal.kernel.exception.SystemException {
311                    return getPersistence()
312                                       .fetchByUserGroupId_Last(userGroupId, orderByComparator);
313            }
314    
315            /**
316            * Returns the user group group roles before and after the current user group group role in the ordered set where userGroupId = &#63;.
317            *
318            * @param userGroupGroupRolePK the primary key of the current user group group role
319            * @param userGroupId the user group ID
320            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
321            * @return the previous, current, and next user group group role
322            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
323            * @throws SystemException if a system exception occurred
324            */
325            public static com.liferay.portal.model.UserGroupGroupRole[] findByUserGroupId_PrevAndNext(
326                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
327                    long userGroupId,
328                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
329                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
330                            com.liferay.portal.kernel.exception.SystemException {
331                    return getPersistence()
332                                       .findByUserGroupId_PrevAndNext(userGroupGroupRolePK,
333                            userGroupId, orderByComparator);
334            }
335    
336            /**
337            * Returns all the user group group roles where groupId = &#63;.
338            *
339            * @param groupId the group ID
340            * @return the matching user group group roles
341            * @throws SystemException if a system exception occurred
342            */
343            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
344                    long groupId)
345                    throws com.liferay.portal.kernel.exception.SystemException {
346                    return getPersistence().findByGroupId(groupId);
347            }
348    
349            /**
350            * Returns a range of all the user group group roles where groupId = &#63;.
351            *
352            * <p>
353            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
354            * </p>
355            *
356            * @param groupId the group ID
357            * @param start the lower bound of the range of user group group roles
358            * @param end the upper bound of the range of user group group roles (not inclusive)
359            * @return the range of matching user group group roles
360            * @throws SystemException if a system exception occurred
361            */
362            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
363                    long groupId, int start, int end)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    return getPersistence().findByGroupId(groupId, start, end);
366            }
367    
368            /**
369            * Returns an ordered range of all the user group group roles where groupId = &#63;.
370            *
371            * <p>
372            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
373            * </p>
374            *
375            * @param groupId the group ID
376            * @param start the lower bound of the range of user group group roles
377            * @param end the upper bound of the range of user group group roles (not inclusive)
378            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
379            * @return the ordered range of matching user group group roles
380            * @throws SystemException if a system exception occurred
381            */
382            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByGroupId(
383                    long groupId, int start, int end,
384                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
385                    throws com.liferay.portal.kernel.exception.SystemException {
386                    return getPersistence()
387                                       .findByGroupId(groupId, start, end, orderByComparator);
388            }
389    
390            /**
391            * Returns the first user group group role in the ordered set where groupId = &#63;.
392            *
393            * @param groupId the group ID
394            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
395            * @return the first matching user group group role
396            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
397            * @throws SystemException if a system exception occurred
398            */
399            public static com.liferay.portal.model.UserGroupGroupRole findByGroupId_First(
400                    long groupId,
401                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
402                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
403                            com.liferay.portal.kernel.exception.SystemException {
404                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
405            }
406    
407            /**
408            * Returns the first user group group role in the ordered set where groupId = &#63;.
409            *
410            * @param groupId the group ID
411            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
412            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
413            * @throws SystemException if a system exception occurred
414            */
415            public static com.liferay.portal.model.UserGroupGroupRole fetchByGroupId_First(
416                    long groupId,
417                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
420            }
421    
422            /**
423            * Returns the last user group group role in the ordered set where groupId = &#63;.
424            *
425            * @param groupId the group ID
426            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
427            * @return the last matching user group group role
428            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
429            * @throws SystemException if a system exception occurred
430            */
431            public static com.liferay.portal.model.UserGroupGroupRole findByGroupId_Last(
432                    long groupId,
433                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
434                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
435                            com.liferay.portal.kernel.exception.SystemException {
436                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
437            }
438    
439            /**
440            * Returns the last user group group role in the ordered set where groupId = &#63;.
441            *
442            * @param groupId the group ID
443            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
444            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
445            * @throws SystemException if a system exception occurred
446            */
447            public static com.liferay.portal.model.UserGroupGroupRole fetchByGroupId_Last(
448                    long groupId,
449                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
450                    throws com.liferay.portal.kernel.exception.SystemException {
451                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
452            }
453    
454            /**
455            * Returns the user group group roles before and after the current user group group role in the ordered set where groupId = &#63;.
456            *
457            * @param userGroupGroupRolePK the primary key of the current user group group role
458            * @param groupId the group ID
459            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
460            * @return the previous, current, and next user group group role
461            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
462            * @throws SystemException if a system exception occurred
463            */
464            public static com.liferay.portal.model.UserGroupGroupRole[] findByGroupId_PrevAndNext(
465                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
466                    long groupId,
467                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
468                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
469                            com.liferay.portal.kernel.exception.SystemException {
470                    return getPersistence()
471                                       .findByGroupId_PrevAndNext(userGroupGroupRolePK, groupId,
472                            orderByComparator);
473            }
474    
475            /**
476            * Returns all the user group group roles where roleId = &#63;.
477            *
478            * @param roleId the role ID
479            * @return the matching user group group roles
480            * @throws SystemException if a system exception occurred
481            */
482            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
483                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
484                    return getPersistence().findByRoleId(roleId);
485            }
486    
487            /**
488            * Returns a range of all the user group group roles where roleId = &#63;.
489            *
490            * <p>
491            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
492            * </p>
493            *
494            * @param roleId the role ID
495            * @param start the lower bound of the range of user group group roles
496            * @param end the upper bound of the range of user group group roles (not inclusive)
497            * @return the range of matching user group group roles
498            * @throws SystemException if a system exception occurred
499            */
500            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
501                    long roleId, int start, int end)
502                    throws com.liferay.portal.kernel.exception.SystemException {
503                    return getPersistence().findByRoleId(roleId, start, end);
504            }
505    
506            /**
507            * Returns an ordered range of all the user group group roles where roleId = &#63;.
508            *
509            * <p>
510            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
511            * </p>
512            *
513            * @param roleId the role ID
514            * @param start the lower bound of the range of user group group roles
515            * @param end the upper bound of the range of user group group roles (not inclusive)
516            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
517            * @return the ordered range of matching user group group roles
518            * @throws SystemException if a system exception occurred
519            */
520            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByRoleId(
521                    long roleId, int start, int end,
522                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
523                    throws com.liferay.portal.kernel.exception.SystemException {
524                    return getPersistence()
525                                       .findByRoleId(roleId, start, end, orderByComparator);
526            }
527    
528            /**
529            * Returns the first user group group role in the ordered set where roleId = &#63;.
530            *
531            * @param roleId the role ID
532            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
533            * @return the first matching user group group role
534            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
535            * @throws SystemException if a system exception occurred
536            */
537            public static com.liferay.portal.model.UserGroupGroupRole findByRoleId_First(
538                    long roleId,
539                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
540                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
541                            com.liferay.portal.kernel.exception.SystemException {
542                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
543            }
544    
545            /**
546            * Returns the first user group group role in the ordered set where roleId = &#63;.
547            *
548            * @param roleId the role ID
549            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
550            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
551            * @throws SystemException if a system exception occurred
552            */
553            public static com.liferay.portal.model.UserGroupGroupRole fetchByRoleId_First(
554                    long roleId,
555                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
556                    throws com.liferay.portal.kernel.exception.SystemException {
557                    return getPersistence().fetchByRoleId_First(roleId, orderByComparator);
558            }
559    
560            /**
561            * Returns the last user group group role in the ordered set where roleId = &#63;.
562            *
563            * @param roleId the role ID
564            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
565            * @return the last matching user group group role
566            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
567            * @throws SystemException if a system exception occurred
568            */
569            public static com.liferay.portal.model.UserGroupGroupRole findByRoleId_Last(
570                    long roleId,
571                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
572                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
573                            com.liferay.portal.kernel.exception.SystemException {
574                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
575            }
576    
577            /**
578            * Returns the last user group group role in the ordered set where roleId = &#63;.
579            *
580            * @param roleId the role ID
581            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
582            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
583            * @throws SystemException if a system exception occurred
584            */
585            public static com.liferay.portal.model.UserGroupGroupRole fetchByRoleId_Last(
586                    long roleId,
587                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
588                    throws com.liferay.portal.kernel.exception.SystemException {
589                    return getPersistence().fetchByRoleId_Last(roleId, orderByComparator);
590            }
591    
592            /**
593            * Returns the user group group roles before and after the current user group group role in the ordered set where roleId = &#63;.
594            *
595            * @param userGroupGroupRolePK the primary key of the current user group group role
596            * @param roleId the role ID
597            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
598            * @return the previous, current, and next user group group role
599            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
600            * @throws SystemException if a system exception occurred
601            */
602            public static com.liferay.portal.model.UserGroupGroupRole[] findByRoleId_PrevAndNext(
603                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
604                    long roleId,
605                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
606                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
607                            com.liferay.portal.kernel.exception.SystemException {
608                    return getPersistence()
609                                       .findByRoleId_PrevAndNext(userGroupGroupRolePK, roleId,
610                            orderByComparator);
611            }
612    
613            /**
614            * Returns all the user group group roles where userGroupId = &#63; and groupId = &#63;.
615            *
616            * @param userGroupId the user group ID
617            * @param groupId the group ID
618            * @return the matching user group group roles
619            * @throws SystemException if a system exception occurred
620            */
621            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
622                    long userGroupId, long groupId)
623                    throws com.liferay.portal.kernel.exception.SystemException {
624                    return getPersistence().findByU_G(userGroupId, groupId);
625            }
626    
627            /**
628            * Returns a range of all the user group group roles where userGroupId = &#63; and groupId = &#63;.
629            *
630            * <p>
631            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
632            * </p>
633            *
634            * @param userGroupId the user group ID
635            * @param groupId the group ID
636            * @param start the lower bound of the range of user group group roles
637            * @param end the upper bound of the range of user group group roles (not inclusive)
638            * @return the range of matching user group group roles
639            * @throws SystemException if a system exception occurred
640            */
641            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
642                    long userGroupId, long groupId, int start, int end)
643                    throws com.liferay.portal.kernel.exception.SystemException {
644                    return getPersistence().findByU_G(userGroupId, groupId, start, end);
645            }
646    
647            /**
648            * Returns an ordered range of all the user group group roles where userGroupId = &#63; and groupId = &#63;.
649            *
650            * <p>
651            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
652            * </p>
653            *
654            * @param userGroupId the user group ID
655            * @param groupId the group ID
656            * @param start the lower bound of the range of user group group roles
657            * @param end the upper bound of the range of user group group roles (not inclusive)
658            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
659            * @return the ordered range of matching user group group roles
660            * @throws SystemException if a system exception occurred
661            */
662            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByU_G(
663                    long userGroupId, long groupId, int start, int end,
664                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
665                    throws com.liferay.portal.kernel.exception.SystemException {
666                    return getPersistence()
667                                       .findByU_G(userGroupId, groupId, start, end,
668                            orderByComparator);
669            }
670    
671            /**
672            * Returns the first user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
673            *
674            * @param userGroupId the user group ID
675            * @param groupId the group ID
676            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
677            * @return the first matching user group group role
678            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
679            * @throws SystemException if a system exception occurred
680            */
681            public static com.liferay.portal.model.UserGroupGroupRole findByU_G_First(
682                    long userGroupId, long groupId,
683                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
684                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
685                            com.liferay.portal.kernel.exception.SystemException {
686                    return getPersistence()
687                                       .findByU_G_First(userGroupId, groupId, orderByComparator);
688            }
689    
690            /**
691            * Returns the first user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
692            *
693            * @param userGroupId the user group ID
694            * @param groupId the group ID
695            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
696            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
697            * @throws SystemException if a system exception occurred
698            */
699            public static com.liferay.portal.model.UserGroupGroupRole fetchByU_G_First(
700                    long userGroupId, long groupId,
701                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
702                    throws com.liferay.portal.kernel.exception.SystemException {
703                    return getPersistence()
704                                       .fetchByU_G_First(userGroupId, groupId, orderByComparator);
705            }
706    
707            /**
708            * Returns the last user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
709            *
710            * @param userGroupId the user group ID
711            * @param groupId the group ID
712            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
713            * @return the last matching user group group role
714            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
715            * @throws SystemException if a system exception occurred
716            */
717            public static com.liferay.portal.model.UserGroupGroupRole findByU_G_Last(
718                    long userGroupId, long groupId,
719                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
720                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
721                            com.liferay.portal.kernel.exception.SystemException {
722                    return getPersistence()
723                                       .findByU_G_Last(userGroupId, groupId, orderByComparator);
724            }
725    
726            /**
727            * Returns the last user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
728            *
729            * @param userGroupId the user group ID
730            * @param groupId the group ID
731            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
732            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
733            * @throws SystemException if a system exception occurred
734            */
735            public static com.liferay.portal.model.UserGroupGroupRole fetchByU_G_Last(
736                    long userGroupId, long groupId,
737                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
738                    throws com.liferay.portal.kernel.exception.SystemException {
739                    return getPersistence()
740                                       .fetchByU_G_Last(userGroupId, groupId, orderByComparator);
741            }
742    
743            /**
744            * Returns the user group group roles before and after the current user group group role in the ordered set where userGroupId = &#63; and groupId = &#63;.
745            *
746            * @param userGroupGroupRolePK the primary key of the current user group group role
747            * @param userGroupId the user group ID
748            * @param groupId the group ID
749            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
750            * @return the previous, current, and next user group group role
751            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
752            * @throws SystemException if a system exception occurred
753            */
754            public static com.liferay.portal.model.UserGroupGroupRole[] findByU_G_PrevAndNext(
755                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
756                    long userGroupId, long groupId,
757                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
758                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
759                            com.liferay.portal.kernel.exception.SystemException {
760                    return getPersistence()
761                                       .findByU_G_PrevAndNext(userGroupGroupRolePK, userGroupId,
762                            groupId, orderByComparator);
763            }
764    
765            /**
766            * Returns all the user group group roles where groupId = &#63; and roleId = &#63;.
767            *
768            * @param groupId the group ID
769            * @param roleId the role ID
770            * @return the matching user group group roles
771            * @throws SystemException if a system exception occurred
772            */
773            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
774                    long groupId, long roleId)
775                    throws com.liferay.portal.kernel.exception.SystemException {
776                    return getPersistence().findByG_R(groupId, roleId);
777            }
778    
779            /**
780            * Returns a range of all the user group group roles where groupId = &#63; and roleId = &#63;.
781            *
782            * <p>
783            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
784            * </p>
785            *
786            * @param groupId the group ID
787            * @param roleId the role ID
788            * @param start the lower bound of the range of user group group roles
789            * @param end the upper bound of the range of user group group roles (not inclusive)
790            * @return the range of matching user group group roles
791            * @throws SystemException if a system exception occurred
792            */
793            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
794                    long groupId, long roleId, int start, int end)
795                    throws com.liferay.portal.kernel.exception.SystemException {
796                    return getPersistence().findByG_R(groupId, roleId, start, end);
797            }
798    
799            /**
800            * Returns an ordered range of all the user group group roles where groupId = &#63; and roleId = &#63;.
801            *
802            * <p>
803            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
804            * </p>
805            *
806            * @param groupId the group ID
807            * @param roleId the role ID
808            * @param start the lower bound of the range of user group group roles
809            * @param end the upper bound of the range of user group group roles (not inclusive)
810            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
811            * @return the ordered range of matching user group group roles
812            * @throws SystemException if a system exception occurred
813            */
814            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findByG_R(
815                    long groupId, long roleId, int start, int end,
816                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
817                    throws com.liferay.portal.kernel.exception.SystemException {
818                    return getPersistence()
819                                       .findByG_R(groupId, roleId, start, end, orderByComparator);
820            }
821    
822            /**
823            * Returns the first user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
824            *
825            * @param groupId the group ID
826            * @param roleId the role ID
827            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
828            * @return the first matching user group group role
829            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
830            * @throws SystemException if a system exception occurred
831            */
832            public static com.liferay.portal.model.UserGroupGroupRole findByG_R_First(
833                    long groupId, long roleId,
834                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
835                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
836                            com.liferay.portal.kernel.exception.SystemException {
837                    return getPersistence()
838                                       .findByG_R_First(groupId, roleId, orderByComparator);
839            }
840    
841            /**
842            * Returns the first user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
843            *
844            * @param groupId the group ID
845            * @param roleId the role ID
846            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
847            * @return the first matching user group group role, or <code>null</code> if a matching user group group role could not be found
848            * @throws SystemException if a system exception occurred
849            */
850            public static com.liferay.portal.model.UserGroupGroupRole fetchByG_R_First(
851                    long groupId, long roleId,
852                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
853                    throws com.liferay.portal.kernel.exception.SystemException {
854                    return getPersistence()
855                                       .fetchByG_R_First(groupId, roleId, orderByComparator);
856            }
857    
858            /**
859            * Returns the last user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
860            *
861            * @param groupId the group ID
862            * @param roleId the role ID
863            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
864            * @return the last matching user group group role
865            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a matching user group group role could not be found
866            * @throws SystemException if a system exception occurred
867            */
868            public static com.liferay.portal.model.UserGroupGroupRole findByG_R_Last(
869                    long groupId, long roleId,
870                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
871                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
872                            com.liferay.portal.kernel.exception.SystemException {
873                    return getPersistence()
874                                       .findByG_R_Last(groupId, roleId, orderByComparator);
875            }
876    
877            /**
878            * Returns the last user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
879            *
880            * @param groupId the group ID
881            * @param roleId the role ID
882            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
883            * @return the last matching user group group role, or <code>null</code> if a matching user group group role could not be found
884            * @throws SystemException if a system exception occurred
885            */
886            public static com.liferay.portal.model.UserGroupGroupRole fetchByG_R_Last(
887                    long groupId, long roleId,
888                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
889                    throws com.liferay.portal.kernel.exception.SystemException {
890                    return getPersistence()
891                                       .fetchByG_R_Last(groupId, roleId, orderByComparator);
892            }
893    
894            /**
895            * Returns the user group group roles before and after the current user group group role in the ordered set where groupId = &#63; and roleId = &#63;.
896            *
897            * @param userGroupGroupRolePK the primary key of the current user group group role
898            * @param groupId the group ID
899            * @param roleId the role ID
900            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
901            * @return the previous, current, and next user group group role
902            * @throws com.liferay.portal.NoSuchUserGroupGroupRoleException if a user group group role with the primary key could not be found
903            * @throws SystemException if a system exception occurred
904            */
905            public static com.liferay.portal.model.UserGroupGroupRole[] findByG_R_PrevAndNext(
906                    com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK,
907                    long groupId, long roleId,
908                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
909                    throws com.liferay.portal.NoSuchUserGroupGroupRoleException,
910                            com.liferay.portal.kernel.exception.SystemException {
911                    return getPersistence()
912                                       .findByG_R_PrevAndNext(userGroupGroupRolePK, groupId,
913                            roleId, orderByComparator);
914            }
915    
916            /**
917            * Returns all the user group group roles.
918            *
919            * @return the user group group roles
920            * @throws SystemException if a system exception occurred
921            */
922            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll()
923                    throws com.liferay.portal.kernel.exception.SystemException {
924                    return getPersistence().findAll();
925            }
926    
927            /**
928            * Returns a range of all the user group group roles.
929            *
930            * <p>
931            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
932            * </p>
933            *
934            * @param start the lower bound of the range of user group group roles
935            * @param end the upper bound of the range of user group group roles (not inclusive)
936            * @return the range of user group group roles
937            * @throws SystemException if a system exception occurred
938            */
939            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll(
940                    int start, int end)
941                    throws com.liferay.portal.kernel.exception.SystemException {
942                    return getPersistence().findAll(start, end);
943            }
944    
945            /**
946            * Returns an ordered range of all the user group group roles.
947            *
948            * <p>
949            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
950            * </p>
951            *
952            * @param start the lower bound of the range of user group group roles
953            * @param end the upper bound of the range of user group group roles (not inclusive)
954            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
955            * @return the ordered range of user group group roles
956            * @throws SystemException if a system exception occurred
957            */
958            public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> findAll(
959                    int start, int end,
960                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
961                    throws com.liferay.portal.kernel.exception.SystemException {
962                    return getPersistence().findAll(start, end, orderByComparator);
963            }
964    
965            /**
966            * Removes all the user group group roles where userGroupId = &#63; from the database.
967            *
968            * @param userGroupId the user group ID
969            * @throws SystemException if a system exception occurred
970            */
971            public static void removeByUserGroupId(long userGroupId)
972                    throws com.liferay.portal.kernel.exception.SystemException {
973                    getPersistence().removeByUserGroupId(userGroupId);
974            }
975    
976            /**
977            * Removes all the user group group roles where groupId = &#63; from the database.
978            *
979            * @param groupId the group ID
980            * @throws SystemException if a system exception occurred
981            */
982            public static void removeByGroupId(long groupId)
983                    throws com.liferay.portal.kernel.exception.SystemException {
984                    getPersistence().removeByGroupId(groupId);
985            }
986    
987            /**
988            * Removes all the user group group roles where roleId = &#63; from the database.
989            *
990            * @param roleId the role ID
991            * @throws SystemException if a system exception occurred
992            */
993            public static void removeByRoleId(long roleId)
994                    throws com.liferay.portal.kernel.exception.SystemException {
995                    getPersistence().removeByRoleId(roleId);
996            }
997    
998            /**
999            * Removes all the user group group roles where userGroupId = &#63; and groupId = &#63; from the database.
1000            *
1001            * @param userGroupId the user group ID
1002            * @param groupId the group ID
1003            * @throws SystemException if a system exception occurred
1004            */
1005            public static void removeByU_G(long userGroupId, long groupId)
1006                    throws com.liferay.portal.kernel.exception.SystemException {
1007                    getPersistence().removeByU_G(userGroupId, groupId);
1008            }
1009    
1010            /**
1011            * Removes all the user group group roles where groupId = &#63; and roleId = &#63; from the database.
1012            *
1013            * @param groupId the group ID
1014            * @param roleId the role ID
1015            * @throws SystemException if a system exception occurred
1016            */
1017            public static void removeByG_R(long groupId, long roleId)
1018                    throws com.liferay.portal.kernel.exception.SystemException {
1019                    getPersistence().removeByG_R(groupId, roleId);
1020            }
1021    
1022            /**
1023            * Removes all the user group group roles from the database.
1024            *
1025            * @throws SystemException if a system exception occurred
1026            */
1027            public static void removeAll()
1028                    throws com.liferay.portal.kernel.exception.SystemException {
1029                    getPersistence().removeAll();
1030            }
1031    
1032            /**
1033            * Returns the number of user group group roles where userGroupId = &#63;.
1034            *
1035            * @param userGroupId the user group ID
1036            * @return the number of matching user group group roles
1037            * @throws SystemException if a system exception occurred
1038            */
1039            public static int countByUserGroupId(long userGroupId)
1040                    throws com.liferay.portal.kernel.exception.SystemException {
1041                    return getPersistence().countByUserGroupId(userGroupId);
1042            }
1043    
1044            /**
1045            * Returns the number of user group group roles where groupId = &#63;.
1046            *
1047            * @param groupId the group ID
1048            * @return the number of matching user group group roles
1049            * @throws SystemException if a system exception occurred
1050            */
1051            public static int countByGroupId(long groupId)
1052                    throws com.liferay.portal.kernel.exception.SystemException {
1053                    return getPersistence().countByGroupId(groupId);
1054            }
1055    
1056            /**
1057            * Returns the number of user group group roles where roleId = &#63;.
1058            *
1059            * @param roleId the role ID
1060            * @return the number of matching user group group roles
1061            * @throws SystemException if a system exception occurred
1062            */
1063            public static int countByRoleId(long roleId)
1064                    throws com.liferay.portal.kernel.exception.SystemException {
1065                    return getPersistence().countByRoleId(roleId);
1066            }
1067    
1068            /**
1069            * Returns the number of user group group roles where userGroupId = &#63; and groupId = &#63;.
1070            *
1071            * @param userGroupId the user group ID
1072            * @param groupId the group ID
1073            * @return the number of matching user group group roles
1074            * @throws SystemException if a system exception occurred
1075            */
1076            public static int countByU_G(long userGroupId, long groupId)
1077                    throws com.liferay.portal.kernel.exception.SystemException {
1078                    return getPersistence().countByU_G(userGroupId, groupId);
1079            }
1080    
1081            /**
1082            * Returns the number of user group group roles where groupId = &#63; and roleId = &#63;.
1083            *
1084            * @param groupId the group ID
1085            * @param roleId the role ID
1086            * @return the number of matching user group group roles
1087            * @throws SystemException if a system exception occurred
1088            */
1089            public static int countByG_R(long groupId, long roleId)
1090                    throws com.liferay.portal.kernel.exception.SystemException {
1091                    return getPersistence().countByG_R(groupId, roleId);
1092            }
1093    
1094            /**
1095            * Returns the number of user group group roles.
1096            *
1097            * @return the number of user group group roles
1098            * @throws SystemException if a system exception occurred
1099            */
1100            public static int countAll()
1101                    throws com.liferay.portal.kernel.exception.SystemException {
1102                    return getPersistence().countAll();
1103            }
1104    
1105            public static UserGroupGroupRolePersistence getPersistence() {
1106                    if (_persistence == null) {
1107                            _persistence = (UserGroupGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupGroupRolePersistence.class.getName());
1108    
1109                            ReferenceRegistry.registerReference(UserGroupGroupRoleUtil.class,
1110                                    "_persistence");
1111                    }
1112    
1113                    return _persistence;
1114            }
1115    
1116            /**
1117             * @deprecated
1118             */
1119            public void setPersistence(UserGroupGroupRolePersistence persistence) {
1120            }
1121    
1122            private static UserGroupGroupRolePersistence _persistence;
1123    }