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