001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.model.UserGroupRole;
022    import com.liferay.portal.kernel.service.ServiceContext;
023    import com.liferay.portal.kernel.util.OrderByComparator;
024    import com.liferay.portal.kernel.util.ReferenceRegistry;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the user group 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 BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel)
057             */
058            public static void clearCache(UserGroupRole userGroupRole) {
059                    getPersistence().clearCache(userGroupRole);
060            }
061    
062            /**
063             * @see BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<UserGroupRole> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see 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 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 BasePersistence#update(com.liferay.portal.kernel.model.BaseModel)
098             */
099            public static UserGroupRole update(UserGroupRole userGroupRole) {
100                    return getPersistence().update(userGroupRole);
101            }
102    
103            /**
104             * @see BasePersistence#update(com.liferay.portal.kernel.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.kernel.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.kernel.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                    UserGroupRolePK userGroupRolePK, long userId,
242                    OrderByComparator<UserGroupRole> orderByComparator)
243                    throws com.liferay.portal.kernel.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.kernel.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.kernel.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                    UserGroupRolePK userGroupRolePK, long groupId,
399                    OrderByComparator<UserGroupRole> orderByComparator)
400                    throws com.liferay.portal.kernel.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.kernel.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.kernel.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                    UserGroupRolePK userGroupRolePK, long roleId,
556                    OrderByComparator<UserGroupRole> orderByComparator)
557                    throws com.liferay.portal.kernel.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.kernel.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.kernel.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                    UserGroupRolePK userGroupRolePK, long userId, long groupId,
726                    OrderByComparator<UserGroupRole> orderByComparator)
727                    throws com.liferay.portal.kernel.exception.NoSuchUserGroupRoleException {
728                    return getPersistence()
729                                       .findByU_G_PrevAndNext(userGroupRolePK, userId, groupId,
730                            orderByComparator);
731            }
732    
733            /**
734            * Removes all the user group roles where userId = &#63; and groupId = &#63; from the database.
735            *
736            * @param userId the user ID
737            * @param groupId the group ID
738            */
739            public static void removeByU_G(long userId, long groupId) {
740                    getPersistence().removeByU_G(userId, groupId);
741            }
742    
743            /**
744            * Returns the number of user group roles where userId = &#63; and groupId = &#63;.
745            *
746            * @param userId the user ID
747            * @param groupId the group ID
748            * @return the number of matching user group roles
749            */
750            public static int countByU_G(long userId, long groupId) {
751                    return getPersistence().countByU_G(userId, groupId);
752            }
753    
754            /**
755            * Returns all the user group roles where groupId = &#63; and roleId = &#63;.
756            *
757            * @param groupId the group ID
758            * @param roleId the role ID
759            * @return the matching user group roles
760            */
761            public static List<UserGroupRole> findByG_R(long groupId, long roleId) {
762                    return getPersistence().findByG_R(groupId, roleId);
763            }
764    
765            /**
766            * Returns a range of all the user group roles where groupId = &#63; and roleId = &#63;.
767            *
768            * <p>
769            * 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.
770            * </p>
771            *
772            * @param groupId the group ID
773            * @param roleId the role ID
774            * @param start the lower bound of the range of user group roles
775            * @param end the upper bound of the range of user group roles (not inclusive)
776            * @return the range of matching user group roles
777            */
778            public static List<UserGroupRole> findByG_R(long groupId, long roleId,
779                    int start, int end) {
780                    return getPersistence().findByG_R(groupId, roleId, start, end);
781            }
782    
783            /**
784            * Returns an ordered range of all the user group roles where groupId = &#63; and roleId = &#63;.
785            *
786            * <p>
787            * 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.
788            * </p>
789            *
790            * @param groupId the group ID
791            * @param roleId the role ID
792            * @param start the lower bound of the range of user group roles
793            * @param end the upper bound of the range of user group roles (not inclusive)
794            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
795            * @return the ordered range of matching user group roles
796            */
797            public static List<UserGroupRole> findByG_R(long groupId, long roleId,
798                    int start, int end, OrderByComparator<UserGroupRole> orderByComparator) {
799                    return getPersistence()
800                                       .findByG_R(groupId, roleId, start, end, orderByComparator);
801            }
802    
803            /**
804            * Returns an ordered range of all the user group roles where groupId = &#63; and roleId = &#63;.
805            *
806            * <p>
807            * 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.
808            * </p>
809            *
810            * @param groupId the group ID
811            * @param roleId the role ID
812            * @param start the lower bound of the range of user group roles
813            * @param end the upper bound of the range of user group roles (not inclusive)
814            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
815            * @param retrieveFromCache whether to retrieve from the finder cache
816            * @return the ordered range of matching user group roles
817            */
818            public static List<UserGroupRole> findByG_R(long groupId, long roleId,
819                    int start, int end, OrderByComparator<UserGroupRole> orderByComparator,
820                    boolean retrieveFromCache) {
821                    return getPersistence()
822                                       .findByG_R(groupId, roleId, start, end, orderByComparator,
823                            retrieveFromCache);
824            }
825    
826            /**
827            * Returns the first user group role in the ordered set where groupId = &#63; and roleId = &#63;.
828            *
829            * @param groupId the group ID
830            * @param roleId the role ID
831            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
832            * @return the first matching user group role
833            * @throws NoSuchUserGroupRoleException if a matching user group role could not be found
834            */
835            public static UserGroupRole findByG_R_First(long groupId, long roleId,
836                    OrderByComparator<UserGroupRole> orderByComparator)
837                    throws com.liferay.portal.kernel.exception.NoSuchUserGroupRoleException {
838                    return getPersistence()
839                                       .findByG_R_First(groupId, roleId, orderByComparator);
840            }
841    
842            /**
843            * Returns the first user group role in the ordered set where groupId = &#63; and roleId = &#63;.
844            *
845            * @param groupId the group ID
846            * @param roleId the role ID
847            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
848            * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found
849            */
850            public static UserGroupRole fetchByG_R_First(long groupId, long roleId,
851                    OrderByComparator<UserGroupRole> orderByComparator) {
852                    return getPersistence()
853                                       .fetchByG_R_First(groupId, roleId, orderByComparator);
854            }
855    
856            /**
857            * Returns the last user group role in the ordered set where groupId = &#63; and roleId = &#63;.
858            *
859            * @param groupId the group ID
860            * @param roleId the role ID
861            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
862            * @return the last matching user group role
863            * @throws NoSuchUserGroupRoleException if a matching user group role could not be found
864            */
865            public static UserGroupRole findByG_R_Last(long groupId, long roleId,
866                    OrderByComparator<UserGroupRole> orderByComparator)
867                    throws com.liferay.portal.kernel.exception.NoSuchUserGroupRoleException {
868                    return getPersistence()
869                                       .findByG_R_Last(groupId, roleId, orderByComparator);
870            }
871    
872            /**
873            * Returns the last user group role in the ordered set where groupId = &#63; and roleId = &#63;.
874            *
875            * @param groupId the group ID
876            * @param roleId the role ID
877            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
878            * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found
879            */
880            public static UserGroupRole fetchByG_R_Last(long groupId, long roleId,
881                    OrderByComparator<UserGroupRole> orderByComparator) {
882                    return getPersistence()
883                                       .fetchByG_R_Last(groupId, roleId, orderByComparator);
884            }
885    
886            /**
887            * Returns the user group roles before and after the current user group role in the ordered set where groupId = &#63; and roleId = &#63;.
888            *
889            * @param userGroupRolePK the primary key of the current user group role
890            * @param groupId the group ID
891            * @param roleId the role ID
892            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
893            * @return the previous, current, and next user group role
894            * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found
895            */
896            public static UserGroupRole[] findByG_R_PrevAndNext(
897                    UserGroupRolePK userGroupRolePK, long groupId, long roleId,
898                    OrderByComparator<UserGroupRole> orderByComparator)
899                    throws com.liferay.portal.kernel.exception.NoSuchUserGroupRoleException {
900                    return getPersistence()
901                                       .findByG_R_PrevAndNext(userGroupRolePK, groupId, roleId,
902                            orderByComparator);
903            }
904    
905            /**
906            * Removes all the user group roles where groupId = &#63; and roleId = &#63; from the database.
907            *
908            * @param groupId the group ID
909            * @param roleId the role ID
910            */
911            public static void removeByG_R(long groupId, long roleId) {
912                    getPersistence().removeByG_R(groupId, roleId);
913            }
914    
915            /**
916            * Returns the number of user group roles where groupId = &#63; and roleId = &#63;.
917            *
918            * @param groupId the group ID
919            * @param roleId the role ID
920            * @return the number of matching user group roles
921            */
922            public static int countByG_R(long groupId, long roleId) {
923                    return getPersistence().countByG_R(groupId, roleId);
924            }
925    
926            /**
927            * Caches the user group role in the entity cache if it is enabled.
928            *
929            * @param userGroupRole the user group role
930            */
931            public static void cacheResult(UserGroupRole userGroupRole) {
932                    getPersistence().cacheResult(userGroupRole);
933            }
934    
935            /**
936            * Caches the user group roles in the entity cache if it is enabled.
937            *
938            * @param userGroupRoles the user group roles
939            */
940            public static void cacheResult(List<UserGroupRole> userGroupRoles) {
941                    getPersistence().cacheResult(userGroupRoles);
942            }
943    
944            /**
945            * Creates a new user group role with the primary key. Does not add the user group role to the database.
946            *
947            * @param userGroupRolePK the primary key for the new user group role
948            * @return the new user group role
949            */
950            public static UserGroupRole create(UserGroupRolePK userGroupRolePK) {
951                    return getPersistence().create(userGroupRolePK);
952            }
953    
954            /**
955            * Removes the user group role with the primary key from the database. Also notifies the appropriate model listeners.
956            *
957            * @param userGroupRolePK the primary key of the user group role
958            * @return the user group role that was removed
959            * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found
960            */
961            public static UserGroupRole remove(UserGroupRolePK userGroupRolePK)
962                    throws com.liferay.portal.kernel.exception.NoSuchUserGroupRoleException {
963                    return getPersistence().remove(userGroupRolePK);
964            }
965    
966            public static UserGroupRole updateImpl(UserGroupRole userGroupRole) {
967                    return getPersistence().updateImpl(userGroupRole);
968            }
969    
970            /**
971            * Returns the user group role with the primary key or throws a {@link NoSuchUserGroupRoleException} if it could not be found.
972            *
973            * @param userGroupRolePK the primary key of the user group role
974            * @return the user group role
975            * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found
976            */
977            public static UserGroupRole findByPrimaryKey(
978                    UserGroupRolePK userGroupRolePK)
979                    throws com.liferay.portal.kernel.exception.NoSuchUserGroupRoleException {
980                    return getPersistence().findByPrimaryKey(userGroupRolePK);
981            }
982    
983            /**
984            * Returns the user group role with the primary key or returns <code>null</code> if it could not be found.
985            *
986            * @param userGroupRolePK the primary key of the user group role
987            * @return the user group role, or <code>null</code> if a user group role with the primary key could not be found
988            */
989            public static UserGroupRole fetchByPrimaryKey(
990                    UserGroupRolePK userGroupRolePK) {
991                    return getPersistence().fetchByPrimaryKey(userGroupRolePK);
992            }
993    
994            public static java.util.Map<java.io.Serializable, UserGroupRole> fetchByPrimaryKeys(
995                    java.util.Set<java.io.Serializable> primaryKeys) {
996                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
997            }
998    
999            /**
1000            * Returns all the user group roles.
1001            *
1002            * @return the user group roles
1003            */
1004            public static List<UserGroupRole> findAll() {
1005                    return getPersistence().findAll();
1006            }
1007    
1008            /**
1009            * Returns a range of all the user group roles.
1010            *
1011            * <p>
1012            * 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.
1013            * </p>
1014            *
1015            * @param start the lower bound of the range of user group roles
1016            * @param end the upper bound of the range of user group roles (not inclusive)
1017            * @return the range of user group roles
1018            */
1019            public static List<UserGroupRole> findAll(int start, int end) {
1020                    return getPersistence().findAll(start, end);
1021            }
1022    
1023            /**
1024            * Returns an ordered range of all the user group roles.
1025            *
1026            * <p>
1027            * 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.
1028            * </p>
1029            *
1030            * @param start the lower bound of the range of user group roles
1031            * @param end the upper bound of the range of user group roles (not inclusive)
1032            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1033            * @return the ordered range of user group roles
1034            */
1035            public static List<UserGroupRole> findAll(int start, int end,
1036                    OrderByComparator<UserGroupRole> orderByComparator) {
1037                    return getPersistence().findAll(start, end, orderByComparator);
1038            }
1039    
1040            /**
1041            * Returns an ordered range of all the user group roles.
1042            *
1043            * <p>
1044            * 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.
1045            * </p>
1046            *
1047            * @param start the lower bound of the range of user group roles
1048            * @param end the upper bound of the range of user group roles (not inclusive)
1049            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1050            * @param retrieveFromCache whether to retrieve from the finder cache
1051            * @return the ordered range of user group roles
1052            */
1053            public static List<UserGroupRole> findAll(int start, int end,
1054                    OrderByComparator<UserGroupRole> orderByComparator,
1055                    boolean retrieveFromCache) {
1056                    return getPersistence()
1057                                       .findAll(start, end, orderByComparator, retrieveFromCache);
1058            }
1059    
1060            /**
1061            * Removes all the user group roles from the database.
1062            */
1063            public static void removeAll() {
1064                    getPersistence().removeAll();
1065            }
1066    
1067            /**
1068            * Returns the number of user group roles.
1069            *
1070            * @return the number of user group roles
1071            */
1072            public static int countAll() {
1073                    return getPersistence().countAll();
1074            }
1075    
1076            public static UserGroupRolePersistence getPersistence() {
1077                    if (_persistence == null) {
1078                            _persistence = (UserGroupRolePersistence)PortalBeanLocatorUtil.locate(UserGroupRolePersistence.class.getName());
1079    
1080                            ReferenceRegistry.registerReference(UserGroupRoleUtil.class,
1081                                    "_persistence");
1082                    }
1083    
1084                    return _persistence;
1085            }
1086    
1087            private static UserGroupRolePersistence _persistence;
1088    }