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