001    /**
002     * Copyright (c) 2000-2013 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.exception.SystemException;
022    import com.liferay.portal.kernel.util.OrderByComparator;
023    import com.liferay.portal.kernel.util.ReferenceRegistry;
024    import com.liferay.portal.model.OrgGroupRole;
025    import com.liferay.portal.service.ServiceContext;
026    
027    import java.util.List;
028    
029    /**
030     * 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.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see OrgGroupRolePersistence
038     * @see OrgGroupRolePersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class OrgGroupRoleUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(OrgGroupRole orgGroupRole) {
060                    getPersistence().clearCache(orgGroupRole);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
067                    throws SystemException {
068                    return getPersistence().countWithDynamicQuery(dynamicQuery);
069            }
070    
071            /**
072             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
073             */
074            public static List<OrgGroupRole> findWithDynamicQuery(
075                    DynamicQuery dynamicQuery) throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
081             */
082            public static List<OrgGroupRole> findWithDynamicQuery(
083                    DynamicQuery dynamicQuery, int start, int end)
084                    throws SystemException {
085                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
086            }
087    
088            /**
089             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
090             */
091            public static List<OrgGroupRole> findWithDynamicQuery(
092                    DynamicQuery dynamicQuery, int start, int end,
093                    OrderByComparator orderByComparator) throws SystemException {
094                    return getPersistence()
095                                       .findWithDynamicQuery(dynamicQuery, start, end,
096                            orderByComparator);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
101             */
102            public static OrgGroupRole update(OrgGroupRole orgGroupRole)
103                    throws SystemException {
104                    return getPersistence().update(orgGroupRole);
105            }
106    
107            /**
108             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
109             */
110            public static OrgGroupRole update(OrgGroupRole orgGroupRole,
111                    ServiceContext serviceContext) throws SystemException {
112                    return getPersistence().update(orgGroupRole, serviceContext);
113            }
114    
115            /**
116            * Returns all the org group roles where groupId = &#63;.
117            *
118            * @param groupId the group ID
119            * @return the matching org group roles
120            * @throws SystemException if a system exception occurred
121            */
122            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
123                    long groupId)
124                    throws com.liferay.portal.kernel.exception.SystemException {
125                    return getPersistence().findByGroupId(groupId);
126            }
127    
128            /**
129            * Returns a range of all the org group roles where groupId = &#63;.
130            *
131            * <p>
132            * 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.
133            * </p>
134            *
135            * @param groupId the group ID
136            * @param start the lower bound of the range of org group roles
137            * @param end the upper bound of the range of org group roles (not inclusive)
138            * @return the range of matching org group roles
139            * @throws SystemException if a system exception occurred
140            */
141            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
142                    long groupId, int start, int end)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getPersistence().findByGroupId(groupId, start, end);
145            }
146    
147            /**
148            * Returns an ordered range of all the org group roles where groupId = &#63;.
149            *
150            * <p>
151            * 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.
152            * </p>
153            *
154            * @param groupId the group ID
155            * @param start the lower bound of the range of org group roles
156            * @param end the upper bound of the range of org group roles (not inclusive)
157            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
158            * @return the ordered range of matching org group roles
159            * @throws SystemException if a system exception occurred
160            */
161            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
162                    long groupId, int start, int end,
163                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164                    throws com.liferay.portal.kernel.exception.SystemException {
165                    return getPersistence()
166                                       .findByGroupId(groupId, start, end, orderByComparator);
167            }
168    
169            /**
170            * Returns the first org group role in the ordered set where groupId = &#63;.
171            *
172            * @param groupId the group ID
173            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
174            * @return the first matching org group role
175            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public static com.liferay.portal.model.OrgGroupRole findByGroupId_First(
179                    long groupId,
180                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
184            }
185    
186            /**
187            * Returns the first org group role in the ordered set where groupId = &#63;.
188            *
189            * @param groupId the group ID
190            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
191            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
192            * @throws SystemException if a system exception occurred
193            */
194            public static com.liferay.portal.model.OrgGroupRole fetchByGroupId_First(
195                    long groupId,
196                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197                    throws com.liferay.portal.kernel.exception.SystemException {
198                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
199            }
200    
201            /**
202            * Returns the last org group role in the ordered set where groupId = &#63;.
203            *
204            * @param groupId the group ID
205            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
206            * @return the last matching org group role
207            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
208            * @throws SystemException if a system exception occurred
209            */
210            public static com.liferay.portal.model.OrgGroupRole findByGroupId_Last(
211                    long groupId,
212                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
213                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
214                            com.liferay.portal.kernel.exception.SystemException {
215                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
216            }
217    
218            /**
219            * Returns the last org group role in the ordered set where groupId = &#63;.
220            *
221            * @param groupId the group ID
222            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
223            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
224            * @throws SystemException if a system exception occurred
225            */
226            public static com.liferay.portal.model.OrgGroupRole fetchByGroupId_Last(
227                    long groupId,
228                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
229                    throws com.liferay.portal.kernel.exception.SystemException {
230                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
231            }
232    
233            /**
234            * Returns the org group roles before and after the current org group role in the ordered set where groupId = &#63;.
235            *
236            * @param orgGroupRolePK the primary key of the current org group role
237            * @param groupId the group ID
238            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
239            * @return the previous, current, and next org group role
240            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
241            * @throws SystemException if a system exception occurred
242            */
243            public static com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext(
244                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
245                    long groupId,
246                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
248                            com.liferay.portal.kernel.exception.SystemException {
249                    return getPersistence()
250                                       .findByGroupId_PrevAndNext(orgGroupRolePK, groupId,
251                            orderByComparator);
252            }
253    
254            /**
255            * Removes all the org group roles where groupId = &#63; from the database.
256            *
257            * @param groupId the group ID
258            * @throws SystemException if a system exception occurred
259            */
260            public static void removeByGroupId(long groupId)
261                    throws com.liferay.portal.kernel.exception.SystemException {
262                    getPersistence().removeByGroupId(groupId);
263            }
264    
265            /**
266            * Returns the number of org group roles where groupId = &#63;.
267            *
268            * @param groupId the group ID
269            * @return the number of matching org group roles
270            * @throws SystemException if a system exception occurred
271            */
272            public static int countByGroupId(long groupId)
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    return getPersistence().countByGroupId(groupId);
275            }
276    
277            /**
278            * Returns all the org group roles where roleId = &#63;.
279            *
280            * @param roleId the role ID
281            * @return the matching org group roles
282            * @throws SystemException if a system exception occurred
283            */
284            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
285                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
286                    return getPersistence().findByRoleId(roleId);
287            }
288    
289            /**
290            * Returns a range of all the org group roles where roleId = &#63;.
291            *
292            * <p>
293            * 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.
294            * </p>
295            *
296            * @param roleId the role ID
297            * @param start the lower bound of the range of org group roles
298            * @param end the upper bound of the range of org group roles (not inclusive)
299            * @return the range of matching org group roles
300            * @throws SystemException if a system exception occurred
301            */
302            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
303                    long roleId, int start, int end)
304                    throws com.liferay.portal.kernel.exception.SystemException {
305                    return getPersistence().findByRoleId(roleId, start, end);
306            }
307    
308            /**
309            * Returns an ordered range of all the org group roles where roleId = &#63;.
310            *
311            * <p>
312            * 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.
313            * </p>
314            *
315            * @param roleId the role ID
316            * @param start the lower bound of the range of org group roles
317            * @param end the upper bound of the range of org group roles (not inclusive)
318            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
319            * @return the ordered range of matching org group roles
320            * @throws SystemException if a system exception occurred
321            */
322            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
323                    long roleId, int start, int end,
324                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
325                    throws com.liferay.portal.kernel.exception.SystemException {
326                    return getPersistence()
327                                       .findByRoleId(roleId, start, end, orderByComparator);
328            }
329    
330            /**
331            * Returns the first org group role in the ordered set where roleId = &#63;.
332            *
333            * @param roleId the role ID
334            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
335            * @return the first matching org group role
336            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
337            * @throws SystemException if a system exception occurred
338            */
339            public static com.liferay.portal.model.OrgGroupRole findByRoleId_First(
340                    long roleId,
341                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
342                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
343                            com.liferay.portal.kernel.exception.SystemException {
344                    return getPersistence().findByRoleId_First(roleId, orderByComparator);
345            }
346    
347            /**
348            * Returns the first org group role in the ordered set where roleId = &#63;.
349            *
350            * @param roleId the role ID
351            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
352            * @return the first matching org group role, or <code>null</code> if a matching org group role could not be found
353            * @throws SystemException if a system exception occurred
354            */
355            public static com.liferay.portal.model.OrgGroupRole fetchByRoleId_First(
356                    long roleId,
357                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
358                    throws com.liferay.portal.kernel.exception.SystemException {
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 com.liferay.portal.NoSuchOrgGroupRoleException if a matching org group role could not be found
369            * @throws SystemException if a system exception occurred
370            */
371            public static com.liferay.portal.model.OrgGroupRole findByRoleId_Last(
372                    long roleId,
373                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
374                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
375                            com.liferay.portal.kernel.exception.SystemException {
376                    return getPersistence().findByRoleId_Last(roleId, orderByComparator);
377            }
378    
379            /**
380            * Returns the last org group role in the ordered set where roleId = &#63;.
381            *
382            * @param roleId the role ID
383            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
384            * @return the last matching org group role, or <code>null</code> if a matching org group role could not be found
385            * @throws SystemException if a system exception occurred
386            */
387            public static com.liferay.portal.model.OrgGroupRole fetchByRoleId_Last(
388                    long roleId,
389                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
390                    throws com.liferay.portal.kernel.exception.SystemException {
391                    return getPersistence().fetchByRoleId_Last(roleId, orderByComparator);
392            }
393    
394            /**
395            * Returns the org group roles before and after the current org group role in the ordered set where roleId = &#63;.
396            *
397            * @param orgGroupRolePK the primary key of the current org group role
398            * @param roleId the role ID
399            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
400            * @return the previous, current, and next org group role
401            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
402            * @throws SystemException if a system exception occurred
403            */
404            public static com.liferay.portal.model.OrgGroupRole[] findByRoleId_PrevAndNext(
405                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
406                    long roleId,
407                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
408                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
409                            com.liferay.portal.kernel.exception.SystemException {
410                    return getPersistence()
411                                       .findByRoleId_PrevAndNext(orgGroupRolePK, roleId,
412                            orderByComparator);
413            }
414    
415            /**
416            * Removes all the org group roles where roleId = &#63; from the database.
417            *
418            * @param roleId the role ID
419            * @throws SystemException if a system exception occurred
420            */
421            public static void removeByRoleId(long roleId)
422                    throws com.liferay.portal.kernel.exception.SystemException {
423                    getPersistence().removeByRoleId(roleId);
424            }
425    
426            /**
427            * Returns the number of org group roles where roleId = &#63;.
428            *
429            * @param roleId the role ID
430            * @return the number of matching org group roles
431            * @throws SystemException if a system exception occurred
432            */
433            public static int countByRoleId(long roleId)
434                    throws com.liferay.portal.kernel.exception.SystemException {
435                    return getPersistence().countByRoleId(roleId);
436            }
437    
438            /**
439            * Caches the org group role in the entity cache if it is enabled.
440            *
441            * @param orgGroupRole the org group role
442            */
443            public static void cacheResult(
444                    com.liferay.portal.model.OrgGroupRole orgGroupRole) {
445                    getPersistence().cacheResult(orgGroupRole);
446            }
447    
448            /**
449            * Caches the org group roles in the entity cache if it is enabled.
450            *
451            * @param orgGroupRoles the org group roles
452            */
453            public static void cacheResult(
454                    java.util.List<com.liferay.portal.model.OrgGroupRole> orgGroupRoles) {
455                    getPersistence().cacheResult(orgGroupRoles);
456            }
457    
458            /**
459            * Creates a new org group role with the primary key. Does not add the org group role to the database.
460            *
461            * @param orgGroupRolePK the primary key for the new org group role
462            * @return the new org group role
463            */
464            public static com.liferay.portal.model.OrgGroupRole create(
465                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK) {
466                    return getPersistence().create(orgGroupRolePK);
467            }
468    
469            /**
470            * Removes the org group role with the primary key from the database. Also notifies the appropriate model listeners.
471            *
472            * @param orgGroupRolePK the primary key of the org group role
473            * @return the org group role that was removed
474            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
475            * @throws SystemException if a system exception occurred
476            */
477            public static com.liferay.portal.model.OrgGroupRole remove(
478                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
479                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
480                            com.liferay.portal.kernel.exception.SystemException {
481                    return getPersistence().remove(orgGroupRolePK);
482            }
483    
484            public static com.liferay.portal.model.OrgGroupRole updateImpl(
485                    com.liferay.portal.model.OrgGroupRole orgGroupRole)
486                    throws com.liferay.portal.kernel.exception.SystemException {
487                    return getPersistence().updateImpl(orgGroupRole);
488            }
489    
490            /**
491            * Returns the org group role with the primary key or throws a {@link com.liferay.portal.NoSuchOrgGroupRoleException} if it could not be found.
492            *
493            * @param orgGroupRolePK the primary key of the org group role
494            * @return the org group role
495            * @throws com.liferay.portal.NoSuchOrgGroupRoleException if a org group role with the primary key could not be found
496            * @throws SystemException if a system exception occurred
497            */
498            public static com.liferay.portal.model.OrgGroupRole findByPrimaryKey(
499                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
500                    throws com.liferay.portal.NoSuchOrgGroupRoleException,
501                            com.liferay.portal.kernel.exception.SystemException {
502                    return getPersistence().findByPrimaryKey(orgGroupRolePK);
503            }
504    
505            /**
506            * Returns the org group role with the primary key or returns <code>null</code> if it could not be found.
507            *
508            * @param orgGroupRolePK the primary key of the org group role
509            * @return the org group role, or <code>null</code> if a org group role with the primary key could not be found
510            * @throws SystemException if a system exception occurred
511            */
512            public static com.liferay.portal.model.OrgGroupRole fetchByPrimaryKey(
513                    com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
514                    throws com.liferay.portal.kernel.exception.SystemException {
515                    return getPersistence().fetchByPrimaryKey(orgGroupRolePK);
516            }
517    
518            /**
519            * Returns all the org group roles.
520            *
521            * @return the org group roles
522            * @throws SystemException if a system exception occurred
523            */
524            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll()
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    return getPersistence().findAll();
527            }
528    
529            /**
530            * Returns a range of all the org group roles.
531            *
532            * <p>
533            * 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.
534            * </p>
535            *
536            * @param start the lower bound of the range of org group roles
537            * @param end the upper bound of the range of org group roles (not inclusive)
538            * @return the range of org group roles
539            * @throws SystemException if a system exception occurred
540            */
541            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
542                    int start, int end)
543                    throws com.liferay.portal.kernel.exception.SystemException {
544                    return getPersistence().findAll(start, end);
545            }
546    
547            /**
548            * Returns an ordered range of all the org group roles.
549            *
550            * <p>
551            * 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.
552            * </p>
553            *
554            * @param start the lower bound of the range of org group roles
555            * @param end the upper bound of the range of org group roles (not inclusive)
556            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
557            * @return the ordered range of org group roles
558            * @throws SystemException if a system exception occurred
559            */
560            public static java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
561                    int start, int end,
562                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
563                    throws com.liferay.portal.kernel.exception.SystemException {
564                    return getPersistence().findAll(start, end, orderByComparator);
565            }
566    
567            /**
568            * Removes all the org group roles from the database.
569            *
570            * @throws SystemException if a system exception occurred
571            */
572            public static void removeAll()
573                    throws com.liferay.portal.kernel.exception.SystemException {
574                    getPersistence().removeAll();
575            }
576    
577            /**
578            * Returns the number of org group roles.
579            *
580            * @return the number of org group roles
581            * @throws SystemException if a system exception occurred
582            */
583            public static int countAll()
584                    throws com.liferay.portal.kernel.exception.SystemException {
585                    return getPersistence().countAll();
586            }
587    
588            public static OrgGroupRolePersistence getPersistence() {
589                    if (_persistence == null) {
590                            _persistence = (OrgGroupRolePersistence)PortalBeanLocatorUtil.locate(OrgGroupRolePersistence.class.getName());
591    
592                            ReferenceRegistry.registerReference(OrgGroupRoleUtil.class,
593                                    "_persistence");
594                    }
595    
596                    return _persistence;
597            }
598    
599            /**
600             * @deprecated As of 6.2.0
601             */
602            public void setPersistence(OrgGroupRolePersistence persistence) {
603            }
604    
605            private static OrgGroupRolePersistence _persistence;
606    }