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