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 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 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 java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
118                    long groupId) {
119                    return getPersistence().findByGroupId(groupId);
120            }
121    
122            /**
123            * Returns a range of all the org group roles where groupId = &#63;.
124            *
125            * <p>
126            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
127            * </p>
128            *
129            * @param groupId the group ID
130            * @param start the lower bound of the range of org group roles
131            * @param end the upper bound of the range of org group roles (not inclusive)
132            * @return the range of matching org group roles
133            */
134            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
135                    long groupId, int start, int end) {
136                    return getPersistence().findByGroupId(groupId, start, end);
137            }
138    
139            /**
140            * Returns an ordered range of all the org group roles where groupId = &#63;.
141            *
142            * <p>
143            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
144            * </p>
145            *
146            * @param groupId the group ID
147            * @param start the lower bound of the range of org group roles
148            * @param end the upper bound of the range of org group roles (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching org group roles
151            */
152            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
153                    long groupId, int start, int end,
154                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator) {
155                    return getPersistence()
156                                       .findByGroupId(groupId, start, end, orderByComparator);
157            }
158    
159            /**
160            * Returns the first org group role in the ordered set where groupId = &#63;.
161            *
162            * @param groupId the group ID
163            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
164            * @return the first matching org group role
165            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
166            */
167            public static com.liferay.portal.model.OrgGroupRole findByGroupId_First(
168                    long groupId,
169                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator)
170                    throws com.liferay.portal.NoSuchOrgGroupRoleException {
171                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
172            }
173    
174            /**
175            * Returns the first org group role in the ordered set where groupId = &#63;.
176            *
177            * @param groupId the group ID
178            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
179            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
180            */
181            public static com.liferay.portal.model.OrgGroupRole fetchByGroupId_First(
182                    long groupId,
183                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator) {
184                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
185            }
186    
187            /**
188            * Returns the last org group role in the ordered set where groupId = &#63;.
189            *
190            * @param groupId the group ID
191            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
192            * @return the last matching org group role
193            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
194            */
195            public static com.liferay.portal.model.OrgGroupRole findByGroupId_Last(
196                    long groupId,
197                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator)
198                    throws com.liferay.portal.NoSuchOrgGroupRoleException {
199                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
200            }
201    
202            /**
203            * Returns the last org group role in the ordered set where groupId = &#63;.
204            *
205            * @param groupId the group ID
206            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
207            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
208            */
209            public static com.liferay.portal.model.OrgGroupRole fetchByGroupId_Last(
210                    long groupId,
211                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator) {
212                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
213            }
214    
215            /**
216            * Returns the org group roles before and after the current org group role in the ordered set where groupId = &#63;.
217            *
218            * @param orgGroupRolePK the primary key of the current org group role
219            * @param groupId the group ID
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the previous, current, and next org group role
222            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
223            */
224            public static com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext(
225                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
226                    long groupId,
227                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator)
228                    throws com.liferay.portal.NoSuchOrgGroupRoleException {
229                    return getPersistence()
230                                       .findByGroupId_PrevAndNext(orgGroupRolePK, groupId,
231                            orderByComparator);
232            }
233    
234            /**
235            * Removes all the org group roles where groupId = &#63; from the database.
236            *
237            * @param groupId the group ID
238            */
239            public static void removeByGroupId(long groupId) {
240                    getPersistence().removeByGroupId(groupId);
241            }
242    
243            /**
244            * Returns the number of org group roles where groupId = &#63;.
245            *
246            * @param groupId the group ID
247            * @return the number of matching org group roles
248            */
249            public static int countByGroupId(long groupId) {
250                    return getPersistence().countByGroupId(groupId);
251            }
252    
253            /**
254            * Returns all the org group roles where roleId = &#63;.
255            *
256            * @param roleId the role ID
257            * @return the matching org group roles
258            */
259            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
260                    long roleId) {
261                    return getPersistence().findByRoleId(roleId);
262            }
263    
264            /**
265            * Returns a range of all the org group roles where roleId = &#63;.
266            *
267            * <p>
268            * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
269            * </p>
270            *
271            * @param roleId the role ID
272            * @param start the lower bound of the range of org group roles
273            * @param end the upper bound of the range of org group roles (not inclusive)
274            * @return the range of matching org group roles
275            */
276            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
277                    long roleId, int start, int end) {
278                    return getPersistence().findByRoleId(roleId, start, end);
279            }
280    
281            /**
282            * Returns an ordered range of all the org group roles where roleId = &#63;.
283            *
284            * <p>
285            * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
286            * </p>
287            *
288            * @param roleId the role ID
289            * @param start the lower bound of the range of org group roles
290            * @param end the upper bound of the range of org group roles (not inclusive)
291            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
292            * @return the ordered range of matching org group roles
293            */
294            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
295                    long roleId, int start, int end,
296                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator) {
297                    return getPersistence()
298                                       .findByRoleId(roleId, start, end, orderByComparator);
299            }
300    
301            /**
302            * Returns the first org group role in the ordered set where roleId = &#63;.
303            *
304            * @param roleId the role ID
305            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
306            * @return the first matching org group role
307            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
308            */
309            public static com.liferay.portal.model.OrgGroupRole findByRoleId_First(
310                    long roleId,
311                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator)
312                    throws com.liferay.portal.NoSuchOrgGroupRoleException {
313                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
314            }
315    
316            /**
317            * Returns the first org group role in the ordered set where roleId = &#63;.
318            *
319            * @param roleId the role ID
320            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
321            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
322            */
323            public static com.liferay.portal.model.OrgGroupRole fetchByRoleId_First(
324                    long roleId,
325                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator) {
326                    return getPersistence().fetchByRoleId_First(roleId, orderByComparator);
327            }
328    
329            /**
330            * Returns the last org group role in the ordered set where roleId = &#63;.
331            *
332            * @param roleId the role ID
333            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
334            * @return the last matching org group role
335            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
336            */
337            public static com.liferay.portal.model.OrgGroupRole findByRoleId_Last(
338                    long roleId,
339                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator)
340                    throws com.liferay.portal.NoSuchOrgGroupRoleException {
341                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
342            }
343    
344            /**
345            * Returns the last org group role in the ordered set where roleId = &#63;.
346            *
347            * @param roleId the role ID
348            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
349            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
350            */
351            public static com.liferay.portal.model.OrgGroupRole fetchByRoleId_Last(
352                    long roleId,
353                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator) {
354                    return getPersistence().fetchByRoleId_Last(roleId, orderByComparator);
355            }
356    
357            /**
358            * Returns the org group roles before and after the current org group role in the ordered set where roleId = &#63;.
359            *
360            * @param orgGroupRolePK the primary key of the current org group role
361            * @param roleId the role ID
362            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
363            * @return the previous, current, and next org group role
364            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
365            */
366            public static com.liferay.portal.model.OrgGroupRole[] findByRoleId_PrevAndNext(
367                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
368                    long roleId,
369                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator)
370                    throws com.liferay.portal.NoSuchOrgGroupRoleException {
371                    return getPersistence()
372                                       .findByRoleId_PrevAndNext(orgGroupRolePK, roleId,
373                            orderByComparator);
374            }
375    
376            /**
377            * Removes all the org group roles where roleId = &#63; from the database.
378            *
379            * @param roleId the role ID
380            */
381            public static void removeByRoleId(long roleId) {
382                    getPersistence().removeByRoleId(roleId);
383            }
384    
385            /**
386            * Returns the number of org group roles where roleId = &#63;.
387            *
388            * @param roleId the role ID
389            * @return the number of matching org group roles
390            */
391            public static int countByRoleId(long roleId) {
392                    return getPersistence().countByRoleId(roleId);
393            }
394    
395            /**
396            * Caches the org group role in the entity cache if it is enabled.
397            *
398            * @param orgGroupRole the org group role
399            */
400            public static void cacheResult(
401                    com.liferay.portal.model.OrgGroupRole orgGroupRole) {
402                    getPersistence().cacheResult(orgGroupRole);
403            }
404    
405            /**
406            * Caches the org group roles in the entity cache if it is enabled.
407            *
408            * @param orgGroupRoles the org group roles
409            */
410            public static void cacheResult(
411                    java.util.List<com.liferay.portal.model.OrgGroupRole> orgGroupRoles) {
412                    getPersistence().cacheResult(orgGroupRoles);
413            }
414    
415            /**
416            * Creates a new org group role with the primary key. Does not add the org group role to the database.
417            *
418            * @param orgGroupRolePK the primary key for the new org group role
419            * @return the new org group role
420            */
421            public static com.liferay.portal.model.OrgGroupRole create(
422                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) {
423                    return getPersistence().create(orgGroupRolePK);
424            }
425    
426            /**
427            * Removes the org group role with the primary key from the database. Also notifies the appropriate model listeners.
428            *
429            * @param orgGroupRolePK the primary key of the org group role
430            * @return the org group role that was removed
431            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
432            */
433            public static com.liferay.portal.model.OrgGroupRole remove(
434                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
435                    throws com.liferay.portal.NoSuchOrgGroupRoleException {
436                    return getPersistence().remove(orgGroupRolePK);
437            }
438    
439            public static com.liferay.portal.model.OrgGroupRole updateImpl(
440                    com.liferay.portal.model.OrgGroupRole orgGroupRole) {
441                    return getPersistence().updateImpl(orgGroupRole);
442            }
443    
444            /**
445            * Returns the org group role with the primary key or throws a {@link com.liferay.portal.NoSuchOrgGroupRoleException} if it could not be found.
446            *
447            * @param orgGroupRolePK the primary key of the org group role
448            * @return the org group role
449            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
450            */
451            public static com.liferay.portal.model.OrgGroupRole findByPrimaryKey(
452                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
453                    throws com.liferay.portal.NoSuchOrgGroupRoleException {
454                    return getPersistence().findByPrimaryKey(orgGroupRolePK);
455            }
456    
457            /**
458            * Returns the org group role with the primary key or returns <code>null</code> if it could not be found.
459            *
460            * @param orgGroupRolePK the primary key of the org group role
461            * @return the org group role, or <code>null</code> if a org group role with the primary key could not be found
462            */
463            public static com.liferay.portal.model.OrgGroupRole fetchByPrimaryKey(
464                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) {
465                    return getPersistence().fetchByPrimaryKey(orgGroupRolePK);
466            }
467    
468            public static java.util.Map<java.io.Serializable, com.liferay.portal.model.OrgGroupRole> fetchByPrimaryKeys(
469                    java.util.Set<java.io.Serializable> primaryKeys) {
470                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
471            }
472    
473            /**
474            * Returns all the org group roles.
475            *
476            * @return the org group roles
477            */
478            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll() {
479                    return getPersistence().findAll();
480            }
481    
482            /**
483            * Returns a range of all the org group roles.
484            *
485            * <p>
486            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
487            * </p>
488            *
489            * @param start the lower bound of the range of org group roles
490            * @param end the upper bound of the range of org group roles (not inclusive)
491            * @return the range of org group roles
492            */
493            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
494                    int start, int end) {
495                    return getPersistence().findAll(start, end);
496            }
497    
498            /**
499            * Returns an ordered range of all the org group roles.
500            *
501            * <p>
502            * 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 com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.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.
503            * </p>
504            *
505            * @param start the lower bound of the range of org group roles
506            * @param end the upper bound of the range of org group roles (not inclusive)
507            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
508            * @return the ordered range of org group roles
509            */
510            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
511                    int start, int end,
512                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.OrgGroupRole> orderByComparator) {
513                    return getPersistence().findAll(start, end, orderByComparator);
514            }
515    
516            /**
517            * Removes all the org group roles from the database.
518            */
519            public static void removeAll() {
520                    getPersistence().removeAll();
521            }
522    
523            /**
524            * Returns the number of org group roles.
525            *
526            * @return the number of org group roles
527            */
528            public static int countAll() {
529                    return getPersistence().countAll();
530            }
531    
532            public static OrgGroupRolePersistence getPersistence() {
533                    if (_persistence == null) {
534                            _persistence = (OrgGroupRolePersistence)PortalBeanLocatorUtil.locate(OrgGroupRolePersistence.class.getName());
535    
536                            ReferenceRegistry.registerReference(OrgGroupRoleUtil.class,
537                                    "_persistence");
538                    }
539    
540                    return _persistence;
541            }
542    
543            /**
544             * @deprecated As of 6.2.0
545             */
546            @Deprecated
547            public void setPersistence(OrgGroupRolePersistence persistence) {
548            }
549    
550            private static OrgGroupRolePersistence _persistence;
551    }