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