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