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