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