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.OrgGroupRole;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the org group role service. This utility wraps {@link com.liferay.portal.service.persistence.impl.OrgGroupRolePersistenceImpl} 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 OrgGroupRolePersistence
037     * @see com.liferay.portal.service.persistence.impl.OrgGroupRolePersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class OrgGroupRoleUtil {
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(OrgGroupRole orgGroupRole) {
059                    getPersistence().clearCache(orgGroupRole);
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<OrgGroupRole> 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<OrgGroupRole> 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<OrgGroupRole> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator<OrgGroupRole> 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 OrgGroupRole update(OrgGroupRole orgGroupRole) {
100                    return getPersistence().update(orgGroupRole);
101            }
102    
103            /**
104             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
105             */
106            public static OrgGroupRole update(OrgGroupRole orgGroupRole,
107                    ServiceContext serviceContext) {
108                    return getPersistence().update(orgGroupRole, serviceContext);
109            }
110    
111            /**
112            * Returns all the org group roles where groupId = &#63;.
113            *
114            * @param groupId the group ID
115            * @return the matching org group roles
116            */
117            public static List<OrgGroupRole> findByGroupId(long groupId) {
118                    return getPersistence().findByGroupId(groupId);
119            }
120    
121            /**
122            * Returns a range of all the org group roles where groupId = &#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 OrgGroupRoleModelImpl}. 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 groupId the group ID
129            * @param start the lower bound of the range of org group roles
130            * @param end the upper bound of the range of org group roles (not inclusive)
131            * @return the range of matching org group roles
132            */
133            public static List<OrgGroupRole> findByGroupId(long groupId, int start,
134                    int end) {
135                    return getPersistence().findByGroupId(groupId, start, end);
136            }
137    
138            /**
139            * Returns an ordered range of all the org group roles where groupId = &#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 OrgGroupRoleModelImpl}. 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 groupId the group ID
146            * @param start the lower bound of the range of org group roles
147            * @param end the upper bound of the range of org 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 org group roles
150            */
151            public static List<OrgGroupRole> findByGroupId(long groupId, int start,
152                    int end, OrderByComparator<OrgGroupRole> orderByComparator) {
153                    return getPersistence()
154                                       .findByGroupId(groupId, start, end, orderByComparator);
155            }
156    
157            /**
158            * Returns an ordered range of all the org group roles where groupId = &#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 OrgGroupRoleModelImpl}. 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 groupId the group ID
165            * @param start the lower bound of the range of org group roles
166            * @param end the upper bound of the range of org 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 org group roles
170            */
171            public static List<OrgGroupRole> findByGroupId(long groupId, int start,
172                    int end, OrderByComparator<OrgGroupRole> orderByComparator,
173                    boolean retrieveFromCache) {
174                    return getPersistence()
175                                       .findByGroupId(groupId, start, end, orderByComparator,
176                            retrieveFromCache);
177            }
178    
179            /**
180            * Returns the first org group role in the ordered set where groupId = &#63;.
181            *
182            * @param groupId the group ID
183            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
184            * @return the first matching org group role
185            * @throws NoSuchOrgGroupRoleException if a matching org group role could not be found
186            */
187            public static OrgGroupRole findByGroupId_First(long groupId,
188                    OrderByComparator<OrgGroupRole> orderByComparator)
189                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException {
190                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
191            }
192    
193            /**
194            * Returns the first org group role in the ordered set where groupId = &#63;.
195            *
196            * @param groupId the group ID
197            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
198            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
199            */
200            public static OrgGroupRole fetchByGroupId_First(long groupId,
201                    OrderByComparator<OrgGroupRole> orderByComparator) {
202                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
203            }
204    
205            /**
206            * Returns the last org group role in the ordered set where groupId = &#63;.
207            *
208            * @param groupId the group ID
209            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
210            * @return the last matching org group role
211            * @throws NoSuchOrgGroupRoleException if a matching org group role could not be found
212            */
213            public static OrgGroupRole findByGroupId_Last(long groupId,
214                    OrderByComparator<OrgGroupRole> orderByComparator)
215                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException {
216                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
217            }
218    
219            /**
220            * Returns the last org group role in the ordered set where groupId = &#63;.
221            *
222            * @param groupId the group ID
223            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
224            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
225            */
226            public static OrgGroupRole fetchByGroupId_Last(long groupId,
227                    OrderByComparator<OrgGroupRole> orderByComparator) {
228                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
229            }
230    
231            /**
232            * Returns the org group roles before and after the current org group role in the ordered set where groupId = &#63;.
233            *
234            * @param orgGroupRolePK the primary key of the current org group role
235            * @param groupId the group ID
236            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
237            * @return the previous, current, and next org group role
238            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
239            */
240            public static OrgGroupRole[] findByGroupId_PrevAndNext(
241                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
242                    long groupId, OrderByComparator<OrgGroupRole> orderByComparator)
243                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException {
244                    return getPersistence()
245                                       .findByGroupId_PrevAndNext(orgGroupRolePK, groupId,
246                            orderByComparator);
247            }
248    
249            /**
250            * Removes all the org group roles where groupId = &#63; from the database.
251            *
252            * @param groupId the group ID
253            */
254            public static void removeByGroupId(long groupId) {
255                    getPersistence().removeByGroupId(groupId);
256            }
257    
258            /**
259            * Returns the number of org group roles where groupId = &#63;.
260            *
261            * @param groupId the group ID
262            * @return the number of matching org group roles
263            */
264            public static int countByGroupId(long groupId) {
265                    return getPersistence().countByGroupId(groupId);
266            }
267    
268            /**
269            * Returns all the org group roles where roleId = &#63;.
270            *
271            * @param roleId the role ID
272            * @return the matching org group roles
273            */
274            public static List<OrgGroupRole> findByRoleId(long roleId) {
275                    return getPersistence().findByRoleId(roleId);
276            }
277    
278            /**
279            * Returns a range of all the org group roles where roleId = &#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 OrgGroupRoleModelImpl}. 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 roleId the role ID
286            * @param start the lower bound of the range of org group roles
287            * @param end the upper bound of the range of org group roles (not inclusive)
288            * @return the range of matching org group roles
289            */
290            public static List<OrgGroupRole> findByRoleId(long roleId, int start,
291                    int end) {
292                    return getPersistence().findByRoleId(roleId, start, end);
293            }
294    
295            /**
296            * Returns an ordered range of all the org group roles where roleId = &#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 OrgGroupRoleModelImpl}. 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 roleId the role ID
303            * @param start the lower bound of the range of org group roles
304            * @param end the upper bound of the range of org 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 org group roles
307            */
308            public static List<OrgGroupRole> findByRoleId(long roleId, int start,
309                    int end, OrderByComparator<OrgGroupRole> orderByComparator) {
310                    return getPersistence()
311                                       .findByRoleId(roleId, start, end, orderByComparator);
312            }
313    
314            /**
315            * Returns an ordered range of all the org group roles where roleId = &#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 OrgGroupRoleModelImpl}. 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 roleId the role ID
322            * @param start the lower bound of the range of org group roles
323            * @param end the upper bound of the range of org 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 org group roles
327            */
328            public static List<OrgGroupRole> findByRoleId(long roleId, int start,
329                    int end, OrderByComparator<OrgGroupRole> orderByComparator,
330                    boolean retrieveFromCache) {
331                    return getPersistence()
332                                       .findByRoleId(roleId, start, end, orderByComparator,
333                            retrieveFromCache);
334            }
335    
336            /**
337            * Returns the first org group role in the ordered set where roleId = &#63;.
338            *
339            * @param roleId the role ID
340            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
341            * @return the first matching org group role
342            * @throws NoSuchOrgGroupRoleException if a matching org group role could not be found
343            */
344            public static OrgGroupRole findByRoleId_First(long roleId,
345                    OrderByComparator<OrgGroupRole> orderByComparator)
346                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException {
347                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
348            }
349    
350            /**
351            * Returns the first org group role in the ordered set where roleId = &#63;.
352            *
353            * @param roleId the role ID
354            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
355            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
356            */
357            public static OrgGroupRole fetchByRoleId_First(long roleId,
358                    OrderByComparator<OrgGroupRole> orderByComparator) {
359                    return getPersistence().fetchByRoleId_First(roleId, orderByComparator);
360            }
361    
362            /**
363            * Returns the last org group role in the ordered set where roleId = &#63;.
364            *
365            * @param roleId the role ID
366            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
367            * @return the last matching org group role
368            * @throws NoSuchOrgGroupRoleException if a matching org group role could not be found
369            */
370            public static OrgGroupRole findByRoleId_Last(long roleId,
371                    OrderByComparator<OrgGroupRole> orderByComparator)
372                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException {
373                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
374            }
375    
376            /**
377            * Returns the last org group role in the ordered set where roleId = &#63;.
378            *
379            * @param roleId the role ID
380            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
381            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
382            */
383            public static OrgGroupRole fetchByRoleId_Last(long roleId,
384                    OrderByComparator<OrgGroupRole> orderByComparator) {
385                    return getPersistence().fetchByRoleId_Last(roleId, orderByComparator);
386            }
387    
388            /**
389            * Returns the org group roles before and after the current org group role in the ordered set where roleId = &#63;.
390            *
391            * @param orgGroupRolePK the primary key of the current org group role
392            * @param roleId the role ID
393            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
394            * @return the previous, current, and next org group role
395            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
396            */
397            public static OrgGroupRole[] findByRoleId_PrevAndNext(
398                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
399                    long roleId, OrderByComparator<OrgGroupRole> orderByComparator)
400                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException {
401                    return getPersistence()
402                                       .findByRoleId_PrevAndNext(orgGroupRolePK, roleId,
403                            orderByComparator);
404            }
405    
406            /**
407            * Removes all the org group roles where roleId = &#63; from the database.
408            *
409            * @param roleId the role ID
410            */
411            public static void removeByRoleId(long roleId) {
412                    getPersistence().removeByRoleId(roleId);
413            }
414    
415            /**
416            * Returns the number of org group roles where roleId = &#63;.
417            *
418            * @param roleId the role ID
419            * @return the number of matching org group roles
420            */
421            public static int countByRoleId(long roleId) {
422                    return getPersistence().countByRoleId(roleId);
423            }
424    
425            /**
426            * Caches the org group role in the entity cache if it is enabled.
427            *
428            * @param orgGroupRole the org group role
429            */
430            public static void cacheResult(OrgGroupRole orgGroupRole) {
431                    getPersistence().cacheResult(orgGroupRole);
432            }
433    
434            /**
435            * Caches the org group roles in the entity cache if it is enabled.
436            *
437            * @param orgGroupRoles the org group roles
438            */
439            public static void cacheResult(List<OrgGroupRole> orgGroupRoles) {
440                    getPersistence().cacheResult(orgGroupRoles);
441            }
442    
443            /**
444            * Creates a new org group role with the primary key. Does not add the org group role to the database.
445            *
446            * @param orgGroupRolePK the primary key for the new org group role
447            * @return the new org group role
448            */
449            public static OrgGroupRole create(
450                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) {
451                    return getPersistence().create(orgGroupRolePK);
452            }
453    
454            /**
455            * Removes the org group role with the primary key from the database. Also notifies the appropriate model listeners.
456            *
457            * @param orgGroupRolePK the primary key of the org group role
458            * @return the org group role that was removed
459            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
460            */
461            public static OrgGroupRole remove(
462                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
463                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException {
464                    return getPersistence().remove(orgGroupRolePK);
465            }
466    
467            public static OrgGroupRole updateImpl(OrgGroupRole orgGroupRole) {
468                    return getPersistence().updateImpl(orgGroupRole);
469            }
470    
471            /**
472            * Returns the org group role with the primary key or throws a {@link NoSuchOrgGroupRoleException} if it could not be found.
473            *
474            * @param orgGroupRolePK the primary key of the org group role
475            * @return the org group role
476            * @throws NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
477            */
478            public static OrgGroupRole findByPrimaryKey(
479                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
480                    throws com.liferay.portal.exception.NoSuchOrgGroupRoleException {
481                    return getPersistence().findByPrimaryKey(orgGroupRolePK);
482            }
483    
484            /**
485            * Returns the org group role with the primary key or returns <code>null</code> if it could not be found.
486            *
487            * @param orgGroupRolePK the primary key of the org group role
488            * @return the org group role, or <code>null</code> if a org group role with the primary key could not be found
489            */
490            public static OrgGroupRole fetchByPrimaryKey(
491                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) {
492                    return getPersistence().fetchByPrimaryKey(orgGroupRolePK);
493            }
494    
495            public static java.util.Map<java.io.Serializable, OrgGroupRole> fetchByPrimaryKeys(
496                    java.util.Set<java.io.Serializable> primaryKeys) {
497                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
498            }
499    
500            /**
501            * Returns all the org group roles.
502            *
503            * @return the org group roles
504            */
505            public static List<OrgGroupRole> findAll() {
506                    return getPersistence().findAll();
507            }
508    
509            /**
510            * Returns a range of all the org group roles.
511            *
512            * <p>
513            * 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 OrgGroupRoleModelImpl}. 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.
514            * </p>
515            *
516            * @param start the lower bound of the range of org group roles
517            * @param end the upper bound of the range of org group roles (not inclusive)
518            * @return the range of org group roles
519            */
520            public static List<OrgGroupRole> findAll(int start, int end) {
521                    return getPersistence().findAll(start, end);
522            }
523    
524            /**
525            * Returns an ordered range of all the org group roles.
526            *
527            * <p>
528            * 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 OrgGroupRoleModelImpl}. 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.
529            * </p>
530            *
531            * @param start the lower bound of the range of org group roles
532            * @param end the upper bound of the range of org group roles (not inclusive)
533            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
534            * @return the ordered range of org group roles
535            */
536            public static List<OrgGroupRole> findAll(int start, int end,
537                    OrderByComparator<OrgGroupRole> orderByComparator) {
538                    return getPersistence().findAll(start, end, orderByComparator);
539            }
540    
541            /**
542            * Returns an ordered range of all the org group roles.
543            *
544            * <p>
545            * 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 OrgGroupRoleModelImpl}. 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.
546            * </p>
547            *
548            * @param start the lower bound of the range of org group roles
549            * @param end the upper bound of the range of org group roles (not inclusive)
550            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
551            * @param retrieveFromCache whether to retrieve from the finder cache
552            * @return the ordered range of org group roles
553            */
554            public static List<OrgGroupRole> findAll(int start, int end,
555                    OrderByComparator<OrgGroupRole> orderByComparator,
556                    boolean retrieveFromCache) {
557                    return getPersistence()
558                                       .findAll(start, end, orderByComparator, retrieveFromCache);
559            }
560    
561            /**
562            * Removes all the org group roles from the database.
563            */
564            public static void removeAll() {
565                    getPersistence().removeAll();
566            }
567    
568            /**
569            * Returns the number of org group roles.
570            *
571            * @return the number of org group roles
572            */
573            public static int countAll() {
574                    return getPersistence().countAll();
575            }
576    
577            public static OrgGroupRolePersistence getPersistence() {
578                    if (_persistence == null) {
579                            _persistence = (OrgGroupRolePersistence)PortalBeanLocatorUtil.locate(OrgGroupRolePersistence.class.getName());
580    
581                            ReferenceRegistry.registerReference(OrgGroupRoleUtil.class,
582                                    "_persistence");
583                    }
584    
585                    return _persistence;
586            }
587    
588            private static OrgGroupRolePersistence _persistence;
589    }