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