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