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