001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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.Group;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the group service. This utility wraps {@link GroupPersistenceImpl} 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 GroupPersistence
036     * @see GroupPersistenceImpl
037     * @generated
038     */
039    public class GroupUtil {
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(Group group) {
057                    getPersistence().clearCache(group);
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<Group> findWithDynamicQuery(DynamicQuery dynamicQuery)
072                    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<Group> findWithDynamicQuery(DynamicQuery dynamicQuery,
080                    int start, int end) throws SystemException {
081                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
082            }
083    
084            /**
085             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
086             */
087            public static List<Group> findWithDynamicQuery(DynamicQuery dynamicQuery,
088                    int start, int end, OrderByComparator orderByComparator)
089                    throws SystemException {
090                    return getPersistence()
091                                       .findWithDynamicQuery(dynamicQuery, start, end,
092                            orderByComparator);
093            }
094    
095            /**
096             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
097             */
098            public static Group remove(Group group) throws SystemException {
099                    return getPersistence().remove(group);
100            }
101    
102            /**
103             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
104             */
105            public static Group update(Group group, boolean merge)
106                    throws SystemException {
107                    return getPersistence().update(group, merge);
108            }
109    
110            /**
111             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
112             */
113            public static Group update(Group group, boolean merge,
114                    ServiceContext serviceContext) throws SystemException {
115                    return getPersistence().update(group, merge, serviceContext);
116            }
117    
118            /**
119            * Caches the group in the entity cache if it is enabled.
120            *
121            * @param group the group
122            */
123            public static void cacheResult(com.liferay.portal.model.Group group) {
124                    getPersistence().cacheResult(group);
125            }
126    
127            /**
128            * Caches the groups in the entity cache if it is enabled.
129            *
130            * @param groups the groups
131            */
132            public static void cacheResult(
133                    java.util.List<com.liferay.portal.model.Group> groups) {
134                    getPersistence().cacheResult(groups);
135            }
136    
137            /**
138            * Creates a new group with the primary key. Does not add the group to the database.
139            *
140            * @param groupId the primary key for the new group
141            * @return the new group
142            */
143            public static com.liferay.portal.model.Group create(long groupId) {
144                    return getPersistence().create(groupId);
145            }
146    
147            /**
148            * Removes the group with the primary key from the database. Also notifies the appropriate model listeners.
149            *
150            * @param groupId the primary key of the group
151            * @return the group that was removed
152            * @throws com.liferay.portal.NoSuchGroupException if a group with the primary key could not be found
153            * @throws SystemException if a system exception occurred
154            */
155            public static com.liferay.portal.model.Group remove(long groupId)
156                    throws com.liferay.portal.NoSuchGroupException,
157                            com.liferay.portal.kernel.exception.SystemException {
158                    return getPersistence().remove(groupId);
159            }
160    
161            public static com.liferay.portal.model.Group updateImpl(
162                    com.liferay.portal.model.Group group, boolean merge)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence().updateImpl(group, merge);
165            }
166    
167            /**
168            * Returns the group with the primary key or throws a {@link com.liferay.portal.NoSuchGroupException} if it could not be found.
169            *
170            * @param groupId the primary key of the group
171            * @return the group
172            * @throws com.liferay.portal.NoSuchGroupException if a group with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portal.model.Group findByPrimaryKey(long groupId)
176                    throws com.liferay.portal.NoSuchGroupException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getPersistence().findByPrimaryKey(groupId);
179            }
180    
181            /**
182            * Returns the group with the primary key or returns <code>null</code> if it could not be found.
183            *
184            * @param groupId the primary key of the group
185            * @return the group, or <code>null</code> if a group with the primary key could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portal.model.Group fetchByPrimaryKey(long groupId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(groupId);
191            }
192    
193            /**
194            * Returns all the groups where companyId = &#63;.
195            *
196            * @param companyId the company ID
197            * @return the matching groups
198            * @throws SystemException if a system exception occurred
199            */
200            public static java.util.List<com.liferay.portal.model.Group> findByCompanyId(
201                    long companyId)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByCompanyId(companyId);
204            }
205    
206            /**
207            * Returns a range of all the groups where companyId = &#63;.
208            *
209            * <p>
210            * 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.
211            * </p>
212            *
213            * @param companyId the company ID
214            * @param start the lower bound of the range of groups
215            * @param end the upper bound of the range of groups (not inclusive)
216            * @return the range of matching groups
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portal.model.Group> findByCompanyId(
220                    long companyId, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence().findByCompanyId(companyId, start, end);
223            }
224    
225            /**
226            * Returns an ordered range of all the groups where companyId = &#63;.
227            *
228            * <p>
229            * 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.
230            * </p>
231            *
232            * @param companyId the company ID
233            * @param start the lower bound of the range of groups
234            * @param end the upper bound of the range of groups (not inclusive)
235            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
236            * @return the ordered range of matching groups
237            * @throws SystemException if a system exception occurred
238            */
239            public static java.util.List<com.liferay.portal.model.Group> findByCompanyId(
240                    long companyId, int start, int end,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence()
244                                       .findByCompanyId(companyId, start, end, orderByComparator);
245            }
246    
247            /**
248            * Returns the first group in the ordered set where companyId = &#63;.
249            *
250            * <p>
251            * 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.
252            * </p>
253            *
254            * @param companyId the company ID
255            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
256            * @return the first matching group
257            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
258            * @throws SystemException if a system exception occurred
259            */
260            public static com.liferay.portal.model.Group findByCompanyId_First(
261                    long companyId,
262                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
263                    throws com.liferay.portal.NoSuchGroupException,
264                            com.liferay.portal.kernel.exception.SystemException {
265                    return getPersistence()
266                                       .findByCompanyId_First(companyId, orderByComparator);
267            }
268    
269            /**
270            * Returns the last group in the ordered set where companyId = &#63;.
271            *
272            * <p>
273            * 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.
274            * </p>
275            *
276            * @param companyId the company ID
277            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
278            * @return the last matching group
279            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public static com.liferay.portal.model.Group findByCompanyId_Last(
283                    long companyId,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.NoSuchGroupException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    return getPersistence()
288                                       .findByCompanyId_Last(companyId, orderByComparator);
289            }
290    
291            /**
292            * Returns the groups before and after the current group in the ordered set where companyId = &#63;.
293            *
294            * <p>
295            * 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.
296            * </p>
297            *
298            * @param groupId the primary key of the current group
299            * @param companyId the company ID
300            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
301            * @return the previous, current, and next group
302            * @throws com.liferay.portal.NoSuchGroupException if a group with the primary key could not be found
303            * @throws SystemException if a system exception occurred
304            */
305            public static com.liferay.portal.model.Group[] findByCompanyId_PrevAndNext(
306                    long groupId, long companyId,
307                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
308                    throws com.liferay.portal.NoSuchGroupException,
309                            com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence()
311                                       .findByCompanyId_PrevAndNext(groupId, companyId,
312                            orderByComparator);
313            }
314    
315            /**
316            * Returns the group where liveGroupId = &#63; or throws a {@link com.liferay.portal.NoSuchGroupException} if it could not be found.
317            *
318            * @param liveGroupId the live group ID
319            * @return the matching group
320            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
321            * @throws SystemException if a system exception occurred
322            */
323            public static com.liferay.portal.model.Group findByLiveGroupId(
324                    long liveGroupId)
325                    throws com.liferay.portal.NoSuchGroupException,
326                            com.liferay.portal.kernel.exception.SystemException {
327                    return getPersistence().findByLiveGroupId(liveGroupId);
328            }
329    
330            /**
331            * Returns the group where liveGroupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
332            *
333            * @param liveGroupId the live group ID
334            * @return the matching group, or <code>null</code> if a matching group could not be found
335            * @throws SystemException if a system exception occurred
336            */
337            public static com.liferay.portal.model.Group fetchByLiveGroupId(
338                    long liveGroupId)
339                    throws com.liferay.portal.kernel.exception.SystemException {
340                    return getPersistence().fetchByLiveGroupId(liveGroupId);
341            }
342    
343            /**
344            * Returns the group where liveGroupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
345            *
346            * @param liveGroupId the live group ID
347            * @param retrieveFromCache whether to use the finder cache
348            * @return the matching group, or <code>null</code> if a matching group could not be found
349            * @throws SystemException if a system exception occurred
350            */
351            public static com.liferay.portal.model.Group fetchByLiveGroupId(
352                    long liveGroupId, boolean retrieveFromCache)
353                    throws com.liferay.portal.kernel.exception.SystemException {
354                    return getPersistence()
355                                       .fetchByLiveGroupId(liveGroupId, retrieveFromCache);
356            }
357    
358            /**
359            * Returns the group where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchGroupException} if it could not be found.
360            *
361            * @param companyId the company ID
362            * @param name the name
363            * @return the matching group
364            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
365            * @throws SystemException if a system exception occurred
366            */
367            public static com.liferay.portal.model.Group findByC_N(long companyId,
368                    java.lang.String name)
369                    throws com.liferay.portal.NoSuchGroupException,
370                            com.liferay.portal.kernel.exception.SystemException {
371                    return getPersistence().findByC_N(companyId, name);
372            }
373    
374            /**
375            * Returns the group where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
376            *
377            * @param companyId the company ID
378            * @param name the name
379            * @return the matching group, or <code>null</code> if a matching group could not be found
380            * @throws SystemException if a system exception occurred
381            */
382            public static com.liferay.portal.model.Group fetchByC_N(long companyId,
383                    java.lang.String name)
384                    throws com.liferay.portal.kernel.exception.SystemException {
385                    return getPersistence().fetchByC_N(companyId, name);
386            }
387    
388            /**
389            * Returns the group where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
390            *
391            * @param companyId the company ID
392            * @param name the name
393            * @param retrieveFromCache whether to use the finder cache
394            * @return the matching group, or <code>null</code> if a matching group could not be found
395            * @throws SystemException if a system exception occurred
396            */
397            public static com.liferay.portal.model.Group fetchByC_N(long companyId,
398                    java.lang.String name, boolean retrieveFromCache)
399                    throws com.liferay.portal.kernel.exception.SystemException {
400                    return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
401            }
402    
403            /**
404            * Returns the group where companyId = &#63; and friendlyURL = &#63; or throws a {@link com.liferay.portal.NoSuchGroupException} if it could not be found.
405            *
406            * @param companyId the company ID
407            * @param friendlyURL the friendly u r l
408            * @return the matching group
409            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
410            * @throws SystemException if a system exception occurred
411            */
412            public static com.liferay.portal.model.Group findByC_F(long companyId,
413                    java.lang.String friendlyURL)
414                    throws com.liferay.portal.NoSuchGroupException,
415                            com.liferay.portal.kernel.exception.SystemException {
416                    return getPersistence().findByC_F(companyId, friendlyURL);
417            }
418    
419            /**
420            * Returns the group where companyId = &#63; and friendlyURL = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
421            *
422            * @param companyId the company ID
423            * @param friendlyURL the friendly u r l
424            * @return the matching group, or <code>null</code> if a matching group could not be found
425            * @throws SystemException if a system exception occurred
426            */
427            public static com.liferay.portal.model.Group fetchByC_F(long companyId,
428                    java.lang.String friendlyURL)
429                    throws com.liferay.portal.kernel.exception.SystemException {
430                    return getPersistence().fetchByC_F(companyId, friendlyURL);
431            }
432    
433            /**
434            * Returns the group where companyId = &#63; and friendlyURL = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
435            *
436            * @param companyId the company ID
437            * @param friendlyURL the friendly u r l
438            * @param retrieveFromCache whether to use the finder cache
439            * @return the matching group, or <code>null</code> if a matching group could not be found
440            * @throws SystemException if a system exception occurred
441            */
442            public static com.liferay.portal.model.Group fetchByC_F(long companyId,
443                    java.lang.String friendlyURL, boolean retrieveFromCache)
444                    throws com.liferay.portal.kernel.exception.SystemException {
445                    return getPersistence()
446                                       .fetchByC_F(companyId, friendlyURL, retrieveFromCache);
447            }
448    
449            /**
450            * Returns all the groups where type = &#63; and active = &#63;.
451            *
452            * @param type the type
453            * @param active the active
454            * @return the matching groups
455            * @throws SystemException if a system exception occurred
456            */
457            public static java.util.List<com.liferay.portal.model.Group> findByT_A(
458                    int type, boolean active)
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return getPersistence().findByT_A(type, active);
461            }
462    
463            /**
464            * Returns a range of all the groups where type = &#63; and active = &#63;.
465            *
466            * <p>
467            * 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.
468            * </p>
469            *
470            * @param type the type
471            * @param active the active
472            * @param start the lower bound of the range of groups
473            * @param end the upper bound of the range of groups (not inclusive)
474            * @return the range of matching groups
475            * @throws SystemException if a system exception occurred
476            */
477            public static java.util.List<com.liferay.portal.model.Group> findByT_A(
478                    int type, boolean active, int start, int end)
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    return getPersistence().findByT_A(type, active, start, end);
481            }
482    
483            /**
484            * Returns an ordered range of all the groups where type = &#63; and active = &#63;.
485            *
486            * <p>
487            * 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.
488            * </p>
489            *
490            * @param type the type
491            * @param active the active
492            * @param start the lower bound of the range of groups
493            * @param end the upper bound of the range of groups (not inclusive)
494            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
495            * @return the ordered range of matching groups
496            * @throws SystemException if a system exception occurred
497            */
498            public static java.util.List<com.liferay.portal.model.Group> findByT_A(
499                    int type, boolean active, int start, int end,
500                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
501                    throws com.liferay.portal.kernel.exception.SystemException {
502                    return getPersistence()
503                                       .findByT_A(type, active, start, end, orderByComparator);
504            }
505    
506            /**
507            * Returns the first group in the ordered set where type = &#63; and active = &#63;.
508            *
509            * <p>
510            * 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.
511            * </p>
512            *
513            * @param type the type
514            * @param active the active
515            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
516            * @return the first matching group
517            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
518            * @throws SystemException if a system exception occurred
519            */
520            public static com.liferay.portal.model.Group findByT_A_First(int type,
521                    boolean active,
522                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
523                    throws com.liferay.portal.NoSuchGroupException,
524                            com.liferay.portal.kernel.exception.SystemException {
525                    return getPersistence().findByT_A_First(type, active, orderByComparator);
526            }
527    
528            /**
529            * Returns the last group in the ordered set where type = &#63; and active = &#63;.
530            *
531            * <p>
532            * 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.
533            * </p>
534            *
535            * @param type the type
536            * @param active the active
537            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
538            * @return the last matching group
539            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
540            * @throws SystemException if a system exception occurred
541            */
542            public static com.liferay.portal.model.Group findByT_A_Last(int type,
543                    boolean active,
544                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
545                    throws com.liferay.portal.NoSuchGroupException,
546                            com.liferay.portal.kernel.exception.SystemException {
547                    return getPersistence().findByT_A_Last(type, active, orderByComparator);
548            }
549    
550            /**
551            * Returns the groups before and after the current group in the ordered set where type = &#63; and active = &#63;.
552            *
553            * <p>
554            * 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.
555            * </p>
556            *
557            * @param groupId the primary key of the current group
558            * @param type the type
559            * @param active the active
560            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
561            * @return the previous, current, and next group
562            * @throws com.liferay.portal.NoSuchGroupException if a group with the primary key could not be found
563            * @throws SystemException if a system exception occurred
564            */
565            public static com.liferay.portal.model.Group[] findByT_A_PrevAndNext(
566                    long groupId, int type, boolean active,
567                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
568                    throws com.liferay.portal.NoSuchGroupException,
569                            com.liferay.portal.kernel.exception.SystemException {
570                    return getPersistence()
571                                       .findByT_A_PrevAndNext(groupId, type, active,
572                            orderByComparator);
573            }
574    
575            /**
576            * Returns the group where companyId = &#63; and classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portal.NoSuchGroupException} if it could not be found.
577            *
578            * @param companyId the company ID
579            * @param classNameId the class name ID
580            * @param classPK the class p k
581            * @return the matching group
582            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
583            * @throws SystemException if a system exception occurred
584            */
585            public static com.liferay.portal.model.Group findByC_C_C(long companyId,
586                    long classNameId, long classPK)
587                    throws com.liferay.portal.NoSuchGroupException,
588                            com.liferay.portal.kernel.exception.SystemException {
589                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
590            }
591    
592            /**
593            * Returns the group where companyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
594            *
595            * @param companyId the company ID
596            * @param classNameId the class name ID
597            * @param classPK the class p k
598            * @return the matching group, or <code>null</code> if a matching group could not be found
599            * @throws SystemException if a system exception occurred
600            */
601            public static com.liferay.portal.model.Group fetchByC_C_C(long companyId,
602                    long classNameId, long classPK)
603                    throws com.liferay.portal.kernel.exception.SystemException {
604                    return getPersistence().fetchByC_C_C(companyId, classNameId, classPK);
605            }
606    
607            /**
608            * Returns the group where companyId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
609            *
610            * @param companyId the company ID
611            * @param classNameId the class name ID
612            * @param classPK the class p k
613            * @param retrieveFromCache whether to use the finder cache
614            * @return the matching group, or <code>null</code> if a matching group could not be found
615            * @throws SystemException if a system exception occurred
616            */
617            public static com.liferay.portal.model.Group fetchByC_C_C(long companyId,
618                    long classNameId, long classPK, boolean retrieveFromCache)
619                    throws com.liferay.portal.kernel.exception.SystemException {
620                    return getPersistence()
621                                       .fetchByC_C_C(companyId, classNameId, classPK,
622                            retrieveFromCache);
623            }
624    
625            /**
626            * Returns the group where companyId = &#63; and liveGroupId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchGroupException} if it could not be found.
627            *
628            * @param companyId the company ID
629            * @param liveGroupId the live group ID
630            * @param name the name
631            * @return the matching group
632            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
633            * @throws SystemException if a system exception occurred
634            */
635            public static com.liferay.portal.model.Group findByC_L_N(long companyId,
636                    long liveGroupId, java.lang.String name)
637                    throws com.liferay.portal.NoSuchGroupException,
638                            com.liferay.portal.kernel.exception.SystemException {
639                    return getPersistence().findByC_L_N(companyId, liveGroupId, name);
640            }
641    
642            /**
643            * Returns the group where companyId = &#63; and liveGroupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
644            *
645            * @param companyId the company ID
646            * @param liveGroupId the live group ID
647            * @param name the name
648            * @return the matching group, or <code>null</code> if a matching group could not be found
649            * @throws SystemException if a system exception occurred
650            */
651            public static com.liferay.portal.model.Group fetchByC_L_N(long companyId,
652                    long liveGroupId, java.lang.String name)
653                    throws com.liferay.portal.kernel.exception.SystemException {
654                    return getPersistence().fetchByC_L_N(companyId, liveGroupId, name);
655            }
656    
657            /**
658            * Returns the group where companyId = &#63; and liveGroupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
659            *
660            * @param companyId the company ID
661            * @param liveGroupId the live group ID
662            * @param name the name
663            * @param retrieveFromCache whether to use the finder cache
664            * @return the matching group, or <code>null</code> if a matching group could not be found
665            * @throws SystemException if a system exception occurred
666            */
667            public static com.liferay.portal.model.Group fetchByC_L_N(long companyId,
668                    long liveGroupId, java.lang.String name, boolean retrieveFromCache)
669                    throws com.liferay.portal.kernel.exception.SystemException {
670                    return getPersistence()
671                                       .fetchByC_L_N(companyId, liveGroupId, name, retrieveFromCache);
672            }
673    
674            /**
675            * Returns the group where companyId = &#63; and classNameId = &#63; and liveGroupId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchGroupException} if it could not be found.
676            *
677            * @param companyId the company ID
678            * @param classNameId the class name ID
679            * @param liveGroupId the live group ID
680            * @param name the name
681            * @return the matching group
682            * @throws com.liferay.portal.NoSuchGroupException if a matching group could not be found
683            * @throws SystemException if a system exception occurred
684            */
685            public static com.liferay.portal.model.Group findByC_C_L_N(long companyId,
686                    long classNameId, long liveGroupId, java.lang.String name)
687                    throws com.liferay.portal.NoSuchGroupException,
688                            com.liferay.portal.kernel.exception.SystemException {
689                    return getPersistence()
690                                       .findByC_C_L_N(companyId, classNameId, liveGroupId, name);
691            }
692    
693            /**
694            * Returns the group where companyId = &#63; and classNameId = &#63; and liveGroupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
695            *
696            * @param companyId the company ID
697            * @param classNameId the class name ID
698            * @param liveGroupId the live group ID
699            * @param name the name
700            * @return the matching group, or <code>null</code> if a matching group could not be found
701            * @throws SystemException if a system exception occurred
702            */
703            public static com.liferay.portal.model.Group fetchByC_C_L_N(
704                    long companyId, long classNameId, long liveGroupId,
705                    java.lang.String name)
706                    throws com.liferay.portal.kernel.exception.SystemException {
707                    return getPersistence()
708                                       .fetchByC_C_L_N(companyId, classNameId, liveGroupId, name);
709            }
710    
711            /**
712            * Returns the group where companyId = &#63; and classNameId = &#63; and liveGroupId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
713            *
714            * @param companyId the company ID
715            * @param classNameId the class name ID
716            * @param liveGroupId the live group ID
717            * @param name the name
718            * @param retrieveFromCache whether to use the finder cache
719            * @return the matching group, or <code>null</code> if a matching group could not be found
720            * @throws SystemException if a system exception occurred
721            */
722            public static com.liferay.portal.model.Group fetchByC_C_L_N(
723                    long companyId, long classNameId, long liveGroupId,
724                    java.lang.String name, boolean retrieveFromCache)
725                    throws com.liferay.portal.kernel.exception.SystemException {
726                    return getPersistence()
727                                       .fetchByC_C_L_N(companyId, classNameId, liveGroupId, name,
728                            retrieveFromCache);
729            }
730    
731            /**
732            * Returns all the groups.
733            *
734            * @return the groups
735            * @throws SystemException if a system exception occurred
736            */
737            public static java.util.List<com.liferay.portal.model.Group> findAll()
738                    throws com.liferay.portal.kernel.exception.SystemException {
739                    return getPersistence().findAll();
740            }
741    
742            /**
743            * Returns a range of all the groups.
744            *
745            * <p>
746            * 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.
747            * </p>
748            *
749            * @param start the lower bound of the range of groups
750            * @param end the upper bound of the range of groups (not inclusive)
751            * @return the range of groups
752            * @throws SystemException if a system exception occurred
753            */
754            public static java.util.List<com.liferay.portal.model.Group> findAll(
755                    int start, int end)
756                    throws com.liferay.portal.kernel.exception.SystemException {
757                    return getPersistence().findAll(start, end);
758            }
759    
760            /**
761            * Returns an ordered range of all the groups.
762            *
763            * <p>
764            * 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.
765            * </p>
766            *
767            * @param start the lower bound of the range of groups
768            * @param end the upper bound of the range of groups (not inclusive)
769            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
770            * @return the ordered range of groups
771            * @throws SystemException if a system exception occurred
772            */
773            public static java.util.List<com.liferay.portal.model.Group> findAll(
774                    int start, int end,
775                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
776                    throws com.liferay.portal.kernel.exception.SystemException {
777                    return getPersistence().findAll(start, end, orderByComparator);
778            }
779    
780            /**
781            * Removes all the groups where companyId = &#63; from the database.
782            *
783            * @param companyId the company ID
784            * @throws SystemException if a system exception occurred
785            */
786            public static void removeByCompanyId(long companyId)
787                    throws com.liferay.portal.kernel.exception.SystemException {
788                    getPersistence().removeByCompanyId(companyId);
789            }
790    
791            /**
792            * Removes the group where liveGroupId = &#63; from the database.
793            *
794            * @param liveGroupId the live group ID
795            * @throws SystemException if a system exception occurred
796            */
797            public static void removeByLiveGroupId(long liveGroupId)
798                    throws com.liferay.portal.NoSuchGroupException,
799                            com.liferay.portal.kernel.exception.SystemException {
800                    getPersistence().removeByLiveGroupId(liveGroupId);
801            }
802    
803            /**
804            * Removes the group where companyId = &#63; and name = &#63; from the database.
805            *
806            * @param companyId the company ID
807            * @param name the name
808            * @throws SystemException if a system exception occurred
809            */
810            public static void removeByC_N(long companyId, java.lang.String name)
811                    throws com.liferay.portal.NoSuchGroupException,
812                            com.liferay.portal.kernel.exception.SystemException {
813                    getPersistence().removeByC_N(companyId, name);
814            }
815    
816            /**
817            * Removes the group where companyId = &#63; and friendlyURL = &#63; from the database.
818            *
819            * @param companyId the company ID
820            * @param friendlyURL the friendly u r l
821            * @throws SystemException if a system exception occurred
822            */
823            public static void removeByC_F(long companyId, java.lang.String friendlyURL)
824                    throws com.liferay.portal.NoSuchGroupException,
825                            com.liferay.portal.kernel.exception.SystemException {
826                    getPersistence().removeByC_F(companyId, friendlyURL);
827            }
828    
829            /**
830            * Removes all the groups where type = &#63; and active = &#63; from the database.
831            *
832            * @param type the type
833            * @param active the active
834            * @throws SystemException if a system exception occurred
835            */
836            public static void removeByT_A(int type, boolean active)
837                    throws com.liferay.portal.kernel.exception.SystemException {
838                    getPersistence().removeByT_A(type, active);
839            }
840    
841            /**
842            * Removes the group where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
843            *
844            * @param companyId the company ID
845            * @param classNameId the class name ID
846            * @param classPK the class p k
847            * @throws SystemException if a system exception occurred
848            */
849            public static void removeByC_C_C(long companyId, long classNameId,
850                    long classPK)
851                    throws com.liferay.portal.NoSuchGroupException,
852                            com.liferay.portal.kernel.exception.SystemException {
853                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
854            }
855    
856            /**
857            * Removes the group where companyId = &#63; and liveGroupId = &#63; and name = &#63; from the database.
858            *
859            * @param companyId the company ID
860            * @param liveGroupId the live group ID
861            * @param name the name
862            * @throws SystemException if a system exception occurred
863            */
864            public static void removeByC_L_N(long companyId, long liveGroupId,
865                    java.lang.String name)
866                    throws com.liferay.portal.NoSuchGroupException,
867                            com.liferay.portal.kernel.exception.SystemException {
868                    getPersistence().removeByC_L_N(companyId, liveGroupId, name);
869            }
870    
871            /**
872            * Removes the group where companyId = &#63; and classNameId = &#63; and liveGroupId = &#63; and name = &#63; from the database.
873            *
874            * @param companyId the company ID
875            * @param classNameId the class name ID
876            * @param liveGroupId the live group ID
877            * @param name the name
878            * @throws SystemException if a system exception occurred
879            */
880            public static void removeByC_C_L_N(long companyId, long classNameId,
881                    long liveGroupId, java.lang.String name)
882                    throws com.liferay.portal.NoSuchGroupException,
883                            com.liferay.portal.kernel.exception.SystemException {
884                    getPersistence()
885                            .removeByC_C_L_N(companyId, classNameId, liveGroupId, name);
886            }
887    
888            /**
889            * Removes all the groups from the database.
890            *
891            * @throws SystemException if a system exception occurred
892            */
893            public static void removeAll()
894                    throws com.liferay.portal.kernel.exception.SystemException {
895                    getPersistence().removeAll();
896            }
897    
898            /**
899            * Returns the number of groups where companyId = &#63;.
900            *
901            * @param companyId the company ID
902            * @return the number of matching groups
903            * @throws SystemException if a system exception occurred
904            */
905            public static int countByCompanyId(long companyId)
906                    throws com.liferay.portal.kernel.exception.SystemException {
907                    return getPersistence().countByCompanyId(companyId);
908            }
909    
910            /**
911            * Returns the number of groups where liveGroupId = &#63;.
912            *
913            * @param liveGroupId the live group ID
914            * @return the number of matching groups
915            * @throws SystemException if a system exception occurred
916            */
917            public static int countByLiveGroupId(long liveGroupId)
918                    throws com.liferay.portal.kernel.exception.SystemException {
919                    return getPersistence().countByLiveGroupId(liveGroupId);
920            }
921    
922            /**
923            * Returns the number of groups where companyId = &#63; and name = &#63;.
924            *
925            * @param companyId the company ID
926            * @param name the name
927            * @return the number of matching groups
928            * @throws SystemException if a system exception occurred
929            */
930            public static int countByC_N(long companyId, java.lang.String name)
931                    throws com.liferay.portal.kernel.exception.SystemException {
932                    return getPersistence().countByC_N(companyId, name);
933            }
934    
935            /**
936            * Returns the number of groups where companyId = &#63; and friendlyURL = &#63;.
937            *
938            * @param companyId the company ID
939            * @param friendlyURL the friendly u r l
940            * @return the number of matching groups
941            * @throws SystemException if a system exception occurred
942            */
943            public static int countByC_F(long companyId, java.lang.String friendlyURL)
944                    throws com.liferay.portal.kernel.exception.SystemException {
945                    return getPersistence().countByC_F(companyId, friendlyURL);
946            }
947    
948            /**
949            * Returns the number of groups where type = &#63; and active = &#63;.
950            *
951            * @param type the type
952            * @param active the active
953            * @return the number of matching groups
954            * @throws SystemException if a system exception occurred
955            */
956            public static int countByT_A(int type, boolean active)
957                    throws com.liferay.portal.kernel.exception.SystemException {
958                    return getPersistence().countByT_A(type, active);
959            }
960    
961            /**
962            * Returns the number of groups where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
963            *
964            * @param companyId the company ID
965            * @param classNameId the class name ID
966            * @param classPK the class p k
967            * @return the number of matching groups
968            * @throws SystemException if a system exception occurred
969            */
970            public static int countByC_C_C(long companyId, long classNameId,
971                    long classPK)
972                    throws com.liferay.portal.kernel.exception.SystemException {
973                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
974            }
975    
976            /**
977            * Returns the number of groups where companyId = &#63; and liveGroupId = &#63; and name = &#63;.
978            *
979            * @param companyId the company ID
980            * @param liveGroupId the live group ID
981            * @param name the name
982            * @return the number of matching groups
983            * @throws SystemException if a system exception occurred
984            */
985            public static int countByC_L_N(long companyId, long liveGroupId,
986                    java.lang.String name)
987                    throws com.liferay.portal.kernel.exception.SystemException {
988                    return getPersistence().countByC_L_N(companyId, liveGroupId, name);
989            }
990    
991            /**
992            * Returns the number of groups where companyId = &#63; and classNameId = &#63; and liveGroupId = &#63; and name = &#63;.
993            *
994            * @param companyId the company ID
995            * @param classNameId the class name ID
996            * @param liveGroupId the live group ID
997            * @param name the name
998            * @return the number of matching groups
999            * @throws SystemException if a system exception occurred
1000            */
1001            public static int countByC_C_L_N(long companyId, long classNameId,
1002                    long liveGroupId, java.lang.String name)
1003                    throws com.liferay.portal.kernel.exception.SystemException {
1004                    return getPersistence()
1005                                       .countByC_C_L_N(companyId, classNameId, liveGroupId, name);
1006            }
1007    
1008            /**
1009            * Returns the number of groups.
1010            *
1011            * @return the number of groups
1012            * @throws SystemException if a system exception occurred
1013            */
1014            public static int countAll()
1015                    throws com.liferay.portal.kernel.exception.SystemException {
1016                    return getPersistence().countAll();
1017            }
1018    
1019            /**
1020            * Returns all the organizations associated with the group.
1021            *
1022            * @param pk the primary key of the group
1023            * @return the organizations associated with the group
1024            * @throws SystemException if a system exception occurred
1025            */
1026            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
1027                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1028                    return getPersistence().getOrganizations(pk);
1029            }
1030    
1031            /**
1032            * Returns a range of all the organizations associated with the group.
1033            *
1034            * <p>
1035            * 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.
1036            * </p>
1037            *
1038            * @param pk the primary key of the group
1039            * @param start the lower bound of the range of groups
1040            * @param end the upper bound of the range of groups (not inclusive)
1041            * @return the range of organizations associated with the group
1042            * @throws SystemException if a system exception occurred
1043            */
1044            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
1045                    long pk, int start, int end)
1046                    throws com.liferay.portal.kernel.exception.SystemException {
1047                    return getPersistence().getOrganizations(pk, start, end);
1048            }
1049    
1050            /**
1051            * Returns an ordered range of all the organizations associated with the group.
1052            *
1053            * <p>
1054            * 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.
1055            * </p>
1056            *
1057            * @param pk the primary key of the group
1058            * @param start the lower bound of the range of groups
1059            * @param end the upper bound of the range of groups (not inclusive)
1060            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1061            * @return the ordered range of organizations associated with the group
1062            * @throws SystemException if a system exception occurred
1063            */
1064            public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
1065                    long pk, int start, int end,
1066                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1067                    throws com.liferay.portal.kernel.exception.SystemException {
1068                    return getPersistence()
1069                                       .getOrganizations(pk, start, end, orderByComparator);
1070            }
1071    
1072            /**
1073            * Returns the number of organizations associated with the group.
1074            *
1075            * @param pk the primary key of the group
1076            * @return the number of organizations associated with the group
1077            * @throws SystemException if a system exception occurred
1078            */
1079            public static int getOrganizationsSize(long pk)
1080                    throws com.liferay.portal.kernel.exception.SystemException {
1081                    return getPersistence().getOrganizationsSize(pk);
1082            }
1083    
1084            /**
1085            * Returns <code>true</code> if the organization is associated with the group.
1086            *
1087            * @param pk the primary key of the group
1088            * @param organizationPK the primary key of the organization
1089            * @return <code>true</code> if the organization is associated with the group; <code>false</code> otherwise
1090            * @throws SystemException if a system exception occurred
1091            */
1092            public static boolean containsOrganization(long pk, long organizationPK)
1093                    throws com.liferay.portal.kernel.exception.SystemException {
1094                    return getPersistence().containsOrganization(pk, organizationPK);
1095            }
1096    
1097            /**
1098            * Returns <code>true</code> if the group has any organizations associated with it.
1099            *
1100            * @param pk the primary key of the group to check for associations with organizations
1101            * @return <code>true</code> if the group has any organizations associated with it; <code>false</code> otherwise
1102            * @throws SystemException if a system exception occurred
1103            */
1104            public static boolean containsOrganizations(long pk)
1105                    throws com.liferay.portal.kernel.exception.SystemException {
1106                    return getPersistence().containsOrganizations(pk);
1107            }
1108    
1109            /**
1110            * Adds an association between the group and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1111            *
1112            * @param pk the primary key of the group
1113            * @param organizationPK the primary key of the organization
1114            * @throws SystemException if a system exception occurred
1115            */
1116            public static void addOrganization(long pk, long organizationPK)
1117                    throws com.liferay.portal.kernel.exception.SystemException {
1118                    getPersistence().addOrganization(pk, organizationPK);
1119            }
1120    
1121            /**
1122            * Adds an association between the group and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1123            *
1124            * @param pk the primary key of the group
1125            * @param organization the organization
1126            * @throws SystemException if a system exception occurred
1127            */
1128            public static void addOrganization(long pk,
1129                    com.liferay.portal.model.Organization organization)
1130                    throws com.liferay.portal.kernel.exception.SystemException {
1131                    getPersistence().addOrganization(pk, organization);
1132            }
1133    
1134            /**
1135            * Adds an association between the group and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1136            *
1137            * @param pk the primary key of the group
1138            * @param organizationPKs the primary keys of the organizations
1139            * @throws SystemException if a system exception occurred
1140            */
1141            public static void addOrganizations(long pk, long[] organizationPKs)
1142                    throws com.liferay.portal.kernel.exception.SystemException {
1143                    getPersistence().addOrganizations(pk, organizationPKs);
1144            }
1145    
1146            /**
1147            * Adds an association between the group and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1148            *
1149            * @param pk the primary key of the group
1150            * @param organizations the organizations
1151            * @throws SystemException if a system exception occurred
1152            */
1153            public static void addOrganizations(long pk,
1154                    java.util.List<com.liferay.portal.model.Organization> organizations)
1155                    throws com.liferay.portal.kernel.exception.SystemException {
1156                    getPersistence().addOrganizations(pk, organizations);
1157            }
1158    
1159            /**
1160            * Clears all associations between the group and its organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1161            *
1162            * @param pk the primary key of the group to clear the associated organizations from
1163            * @throws SystemException if a system exception occurred
1164            */
1165            public static void clearOrganizations(long pk)
1166                    throws com.liferay.portal.kernel.exception.SystemException {
1167                    getPersistence().clearOrganizations(pk);
1168            }
1169    
1170            /**
1171            * Removes the association between the group and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1172            *
1173            * @param pk the primary key of the group
1174            * @param organizationPK the primary key of the organization
1175            * @throws SystemException if a system exception occurred
1176            */
1177            public static void removeOrganization(long pk, long organizationPK)
1178                    throws com.liferay.portal.kernel.exception.SystemException {
1179                    getPersistence().removeOrganization(pk, organizationPK);
1180            }
1181    
1182            /**
1183            * Removes the association between the group and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1184            *
1185            * @param pk the primary key of the group
1186            * @param organization the organization
1187            * @throws SystemException if a system exception occurred
1188            */
1189            public static void removeOrganization(long pk,
1190                    com.liferay.portal.model.Organization organization)
1191                    throws com.liferay.portal.kernel.exception.SystemException {
1192                    getPersistence().removeOrganization(pk, organization);
1193            }
1194    
1195            /**
1196            * Removes the association between the group and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1197            *
1198            * @param pk the primary key of the group
1199            * @param organizationPKs the primary keys of the organizations
1200            * @throws SystemException if a system exception occurred
1201            */
1202            public static void removeOrganizations(long pk, long[] organizationPKs)
1203                    throws com.liferay.portal.kernel.exception.SystemException {
1204                    getPersistence().removeOrganizations(pk, organizationPKs);
1205            }
1206    
1207            /**
1208            * Removes the association between the group and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1209            *
1210            * @param pk the primary key of the group
1211            * @param organizations the organizations
1212            * @throws SystemException if a system exception occurred
1213            */
1214            public static void removeOrganizations(long pk,
1215                    java.util.List<com.liferay.portal.model.Organization> organizations)
1216                    throws com.liferay.portal.kernel.exception.SystemException {
1217                    getPersistence().removeOrganizations(pk, organizations);
1218            }
1219    
1220            /**
1221            * Sets the organizations associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1222            *
1223            * @param pk the primary key of the group
1224            * @param organizationPKs the primary keys of the organizations to be associated with the group
1225            * @throws SystemException if a system exception occurred
1226            */
1227            public static void setOrganizations(long pk, long[] organizationPKs)
1228                    throws com.liferay.portal.kernel.exception.SystemException {
1229                    getPersistence().setOrganizations(pk, organizationPKs);
1230            }
1231    
1232            /**
1233            * Sets the organizations associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1234            *
1235            * @param pk the primary key of the group
1236            * @param organizations the organizations to be associated with the group
1237            * @throws SystemException if a system exception occurred
1238            */
1239            public static void setOrganizations(long pk,
1240                    java.util.List<com.liferay.portal.model.Organization> organizations)
1241                    throws com.liferay.portal.kernel.exception.SystemException {
1242                    getPersistence().setOrganizations(pk, organizations);
1243            }
1244    
1245            /**
1246            * Returns all the permissions associated with the group.
1247            *
1248            * @param pk the primary key of the group
1249            * @return the permissions associated with the group
1250            * @throws SystemException if a system exception occurred
1251            */
1252            public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
1253                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1254                    return getPersistence().getPermissions(pk);
1255            }
1256    
1257            /**
1258            * Returns a range of all the permissions associated with the group.
1259            *
1260            * <p>
1261            * 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.
1262            * </p>
1263            *
1264            * @param pk the primary key of the group
1265            * @param start the lower bound of the range of groups
1266            * @param end the upper bound of the range of groups (not inclusive)
1267            * @return the range of permissions associated with the group
1268            * @throws SystemException if a system exception occurred
1269            */
1270            public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
1271                    long pk, int start, int end)
1272                    throws com.liferay.portal.kernel.exception.SystemException {
1273                    return getPersistence().getPermissions(pk, start, end);
1274            }
1275    
1276            /**
1277            * Returns an ordered range of all the permissions associated with the group.
1278            *
1279            * <p>
1280            * 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.
1281            * </p>
1282            *
1283            * @param pk the primary key of the group
1284            * @param start the lower bound of the range of groups
1285            * @param end the upper bound of the range of groups (not inclusive)
1286            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1287            * @return the ordered range of permissions associated with the group
1288            * @throws SystemException if a system exception occurred
1289            */
1290            public static java.util.List<com.liferay.portal.model.Permission> getPermissions(
1291                    long pk, int start, int end,
1292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1293                    throws com.liferay.portal.kernel.exception.SystemException {
1294                    return getPersistence().getPermissions(pk, start, end, orderByComparator);
1295            }
1296    
1297            /**
1298            * Returns the number of permissions associated with the group.
1299            *
1300            * @param pk the primary key of the group
1301            * @return the number of permissions associated with the group
1302            * @throws SystemException if a system exception occurred
1303            */
1304            public static int getPermissionsSize(long pk)
1305                    throws com.liferay.portal.kernel.exception.SystemException {
1306                    return getPersistence().getPermissionsSize(pk);
1307            }
1308    
1309            /**
1310            * Returns <code>true</code> if the permission is associated with the group.
1311            *
1312            * @param pk the primary key of the group
1313            * @param permissionPK the primary key of the permission
1314            * @return <code>true</code> if the permission is associated with the group; <code>false</code> otherwise
1315            * @throws SystemException if a system exception occurred
1316            */
1317            public static boolean containsPermission(long pk, long permissionPK)
1318                    throws com.liferay.portal.kernel.exception.SystemException {
1319                    return getPersistence().containsPermission(pk, permissionPK);
1320            }
1321    
1322            /**
1323            * Returns <code>true</code> if the group has any permissions associated with it.
1324            *
1325            * @param pk the primary key of the group to check for associations with permissions
1326            * @return <code>true</code> if the group has any permissions associated with it; <code>false</code> otherwise
1327            * @throws SystemException if a system exception occurred
1328            */
1329            public static boolean containsPermissions(long pk)
1330                    throws com.liferay.portal.kernel.exception.SystemException {
1331                    return getPersistence().containsPermissions(pk);
1332            }
1333    
1334            /**
1335            * Adds an association between the group and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1336            *
1337            * @param pk the primary key of the group
1338            * @param permissionPK the primary key of the permission
1339            * @throws SystemException if a system exception occurred
1340            */
1341            public static void addPermission(long pk, long permissionPK)
1342                    throws com.liferay.portal.kernel.exception.SystemException {
1343                    getPersistence().addPermission(pk, permissionPK);
1344            }
1345    
1346            /**
1347            * Adds an association between the group and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1348            *
1349            * @param pk the primary key of the group
1350            * @param permission the permission
1351            * @throws SystemException if a system exception occurred
1352            */
1353            public static void addPermission(long pk,
1354                    com.liferay.portal.model.Permission permission)
1355                    throws com.liferay.portal.kernel.exception.SystemException {
1356                    getPersistence().addPermission(pk, permission);
1357            }
1358    
1359            /**
1360            * Adds an association between the group and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1361            *
1362            * @param pk the primary key of the group
1363            * @param permissionPKs the primary keys of the permissions
1364            * @throws SystemException if a system exception occurred
1365            */
1366            public static void addPermissions(long pk, long[] permissionPKs)
1367                    throws com.liferay.portal.kernel.exception.SystemException {
1368                    getPersistence().addPermissions(pk, permissionPKs);
1369            }
1370    
1371            /**
1372            * Adds an association between the group and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1373            *
1374            * @param pk the primary key of the group
1375            * @param permissions the permissions
1376            * @throws SystemException if a system exception occurred
1377            */
1378            public static void addPermissions(long pk,
1379                    java.util.List<com.liferay.portal.model.Permission> permissions)
1380                    throws com.liferay.portal.kernel.exception.SystemException {
1381                    getPersistence().addPermissions(pk, permissions);
1382            }
1383    
1384            /**
1385            * Clears all associations between the group and its permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1386            *
1387            * @param pk the primary key of the group to clear the associated permissions from
1388            * @throws SystemException if a system exception occurred
1389            */
1390            public static void clearPermissions(long pk)
1391                    throws com.liferay.portal.kernel.exception.SystemException {
1392                    getPersistence().clearPermissions(pk);
1393            }
1394    
1395            /**
1396            * Removes the association between the group and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1397            *
1398            * @param pk the primary key of the group
1399            * @param permissionPK the primary key of the permission
1400            * @throws SystemException if a system exception occurred
1401            */
1402            public static void removePermission(long pk, long permissionPK)
1403                    throws com.liferay.portal.kernel.exception.SystemException {
1404                    getPersistence().removePermission(pk, permissionPK);
1405            }
1406    
1407            /**
1408            * Removes the association between the group and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1409            *
1410            * @param pk the primary key of the group
1411            * @param permission the permission
1412            * @throws SystemException if a system exception occurred
1413            */
1414            public static void removePermission(long pk,
1415                    com.liferay.portal.model.Permission permission)
1416                    throws com.liferay.portal.kernel.exception.SystemException {
1417                    getPersistence().removePermission(pk, permission);
1418            }
1419    
1420            /**
1421            * Removes the association between the group and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1422            *
1423            * @param pk the primary key of the group
1424            * @param permissionPKs the primary keys of the permissions
1425            * @throws SystemException if a system exception occurred
1426            */
1427            public static void removePermissions(long pk, long[] permissionPKs)
1428                    throws com.liferay.portal.kernel.exception.SystemException {
1429                    getPersistence().removePermissions(pk, permissionPKs);
1430            }
1431    
1432            /**
1433            * Removes the association between the group and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1434            *
1435            * @param pk the primary key of the group
1436            * @param permissions the permissions
1437            * @throws SystemException if a system exception occurred
1438            */
1439            public static void removePermissions(long pk,
1440                    java.util.List<com.liferay.portal.model.Permission> permissions)
1441                    throws com.liferay.portal.kernel.exception.SystemException {
1442                    getPersistence().removePermissions(pk, permissions);
1443            }
1444    
1445            /**
1446            * Sets the permissions associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1447            *
1448            * @param pk the primary key of the group
1449            * @param permissionPKs the primary keys of the permissions to be associated with the group
1450            * @throws SystemException if a system exception occurred
1451            */
1452            public static void setPermissions(long pk, long[] permissionPKs)
1453                    throws com.liferay.portal.kernel.exception.SystemException {
1454                    getPersistence().setPermissions(pk, permissionPKs);
1455            }
1456    
1457            /**
1458            * Sets the permissions associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1459            *
1460            * @param pk the primary key of the group
1461            * @param permissions the permissions to be associated with the group
1462            * @throws SystemException if a system exception occurred
1463            */
1464            public static void setPermissions(long pk,
1465                    java.util.List<com.liferay.portal.model.Permission> permissions)
1466                    throws com.liferay.portal.kernel.exception.SystemException {
1467                    getPersistence().setPermissions(pk, permissions);
1468            }
1469    
1470            /**
1471            * Returns all the roles associated with the group.
1472            *
1473            * @param pk the primary key of the group
1474            * @return the roles associated with the group
1475            * @throws SystemException if a system exception occurred
1476            */
1477            public static java.util.List<com.liferay.portal.model.Role> getRoles(
1478                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1479                    return getPersistence().getRoles(pk);
1480            }
1481    
1482            /**
1483            * Returns a range of all the roles associated with the group.
1484            *
1485            * <p>
1486            * 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.
1487            * </p>
1488            *
1489            * @param pk the primary key of the group
1490            * @param start the lower bound of the range of groups
1491            * @param end the upper bound of the range of groups (not inclusive)
1492            * @return the range of roles associated with the group
1493            * @throws SystemException if a system exception occurred
1494            */
1495            public static java.util.List<com.liferay.portal.model.Role> getRoles(
1496                    long pk, int start, int end)
1497                    throws com.liferay.portal.kernel.exception.SystemException {
1498                    return getPersistence().getRoles(pk, start, end);
1499            }
1500    
1501            /**
1502            * Returns an ordered range of all the roles associated with the group.
1503            *
1504            * <p>
1505            * 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.
1506            * </p>
1507            *
1508            * @param pk the primary key of the group
1509            * @param start the lower bound of the range of groups
1510            * @param end the upper bound of the range of groups (not inclusive)
1511            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1512            * @return the ordered range of roles associated with the group
1513            * @throws SystemException if a system exception occurred
1514            */
1515            public static java.util.List<com.liferay.portal.model.Role> getRoles(
1516                    long pk, int start, int end,
1517                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1518                    throws com.liferay.portal.kernel.exception.SystemException {
1519                    return getPersistence().getRoles(pk, start, end, orderByComparator);
1520            }
1521    
1522            /**
1523            * Returns the number of roles associated with the group.
1524            *
1525            * @param pk the primary key of the group
1526            * @return the number of roles associated with the group
1527            * @throws SystemException if a system exception occurred
1528            */
1529            public static int getRolesSize(long pk)
1530                    throws com.liferay.portal.kernel.exception.SystemException {
1531                    return getPersistence().getRolesSize(pk);
1532            }
1533    
1534            /**
1535            * Returns <code>true</code> if the role is associated with the group.
1536            *
1537            * @param pk the primary key of the group
1538            * @param rolePK the primary key of the role
1539            * @return <code>true</code> if the role is associated with the group; <code>false</code> otherwise
1540            * @throws SystemException if a system exception occurred
1541            */
1542            public static boolean containsRole(long pk, long rolePK)
1543                    throws com.liferay.portal.kernel.exception.SystemException {
1544                    return getPersistence().containsRole(pk, rolePK);
1545            }
1546    
1547            /**
1548            * Returns <code>true</code> if the group has any roles associated with it.
1549            *
1550            * @param pk the primary key of the group to check for associations with roles
1551            * @return <code>true</code> if the group has any roles associated with it; <code>false</code> otherwise
1552            * @throws SystemException if a system exception occurred
1553            */
1554            public static boolean containsRoles(long pk)
1555                    throws com.liferay.portal.kernel.exception.SystemException {
1556                    return getPersistence().containsRoles(pk);
1557            }
1558    
1559            /**
1560            * Adds an association between the group and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1561            *
1562            * @param pk the primary key of the group
1563            * @param rolePK the primary key of the role
1564            * @throws SystemException if a system exception occurred
1565            */
1566            public static void addRole(long pk, long rolePK)
1567                    throws com.liferay.portal.kernel.exception.SystemException {
1568                    getPersistence().addRole(pk, rolePK);
1569            }
1570    
1571            /**
1572            * Adds an association between the group and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1573            *
1574            * @param pk the primary key of the group
1575            * @param role the role
1576            * @throws SystemException if a system exception occurred
1577            */
1578            public static void addRole(long pk, com.liferay.portal.model.Role role)
1579                    throws com.liferay.portal.kernel.exception.SystemException {
1580                    getPersistence().addRole(pk, role);
1581            }
1582    
1583            /**
1584            * Adds an association between the group and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1585            *
1586            * @param pk the primary key of the group
1587            * @param rolePKs the primary keys of the roles
1588            * @throws SystemException if a system exception occurred
1589            */
1590            public static void addRoles(long pk, long[] rolePKs)
1591                    throws com.liferay.portal.kernel.exception.SystemException {
1592                    getPersistence().addRoles(pk, rolePKs);
1593            }
1594    
1595            /**
1596            * Adds an association between the group and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1597            *
1598            * @param pk the primary key of the group
1599            * @param roles the roles
1600            * @throws SystemException if a system exception occurred
1601            */
1602            public static void addRoles(long pk,
1603                    java.util.List<com.liferay.portal.model.Role> roles)
1604                    throws com.liferay.portal.kernel.exception.SystemException {
1605                    getPersistence().addRoles(pk, roles);
1606            }
1607    
1608            /**
1609            * Clears all associations between the group and its roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1610            *
1611            * @param pk the primary key of the group to clear the associated roles from
1612            * @throws SystemException if a system exception occurred
1613            */
1614            public static void clearRoles(long pk)
1615                    throws com.liferay.portal.kernel.exception.SystemException {
1616                    getPersistence().clearRoles(pk);
1617            }
1618    
1619            /**
1620            * Removes the association between the group and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1621            *
1622            * @param pk the primary key of the group
1623            * @param rolePK the primary key of the role
1624            * @throws SystemException if a system exception occurred
1625            */
1626            public static void removeRole(long pk, long rolePK)
1627                    throws com.liferay.portal.kernel.exception.SystemException {
1628                    getPersistence().removeRole(pk, rolePK);
1629            }
1630    
1631            /**
1632            * Removes the association between the group and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1633            *
1634            * @param pk the primary key of the group
1635            * @param role the role
1636            * @throws SystemException if a system exception occurred
1637            */
1638            public static void removeRole(long pk, com.liferay.portal.model.Role role)
1639                    throws com.liferay.portal.kernel.exception.SystemException {
1640                    getPersistence().removeRole(pk, role);
1641            }
1642    
1643            /**
1644            * Removes the association between the group and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1645            *
1646            * @param pk the primary key of the group
1647            * @param rolePKs the primary keys of the roles
1648            * @throws SystemException if a system exception occurred
1649            */
1650            public static void removeRoles(long pk, long[] rolePKs)
1651                    throws com.liferay.portal.kernel.exception.SystemException {
1652                    getPersistence().removeRoles(pk, rolePKs);
1653            }
1654    
1655            /**
1656            * Removes the association between the group and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1657            *
1658            * @param pk the primary key of the group
1659            * @param roles the roles
1660            * @throws SystemException if a system exception occurred
1661            */
1662            public static void removeRoles(long pk,
1663                    java.util.List<com.liferay.portal.model.Role> roles)
1664                    throws com.liferay.portal.kernel.exception.SystemException {
1665                    getPersistence().removeRoles(pk, roles);
1666            }
1667    
1668            /**
1669            * Sets the roles associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1670            *
1671            * @param pk the primary key of the group
1672            * @param rolePKs the primary keys of the roles to be associated with the group
1673            * @throws SystemException if a system exception occurred
1674            */
1675            public static void setRoles(long pk, long[] rolePKs)
1676                    throws com.liferay.portal.kernel.exception.SystemException {
1677                    getPersistence().setRoles(pk, rolePKs);
1678            }
1679    
1680            /**
1681            * Sets the roles associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1682            *
1683            * @param pk the primary key of the group
1684            * @param roles the roles to be associated with the group
1685            * @throws SystemException if a system exception occurred
1686            */
1687            public static void setRoles(long pk,
1688                    java.util.List<com.liferay.portal.model.Role> roles)
1689                    throws com.liferay.portal.kernel.exception.SystemException {
1690                    getPersistence().setRoles(pk, roles);
1691            }
1692    
1693            /**
1694            * Returns all the user groups associated with the group.
1695            *
1696            * @param pk the primary key of the group
1697            * @return the user groups associated with the group
1698            * @throws SystemException if a system exception occurred
1699            */
1700            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
1701                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1702                    return getPersistence().getUserGroups(pk);
1703            }
1704    
1705            /**
1706            * Returns a range of all the user groups associated with the group.
1707            *
1708            * <p>
1709            * 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.
1710            * </p>
1711            *
1712            * @param pk the primary key of the group
1713            * @param start the lower bound of the range of groups
1714            * @param end the upper bound of the range of groups (not inclusive)
1715            * @return the range of user groups associated with the group
1716            * @throws SystemException if a system exception occurred
1717            */
1718            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
1719                    long pk, int start, int end)
1720                    throws com.liferay.portal.kernel.exception.SystemException {
1721                    return getPersistence().getUserGroups(pk, start, end);
1722            }
1723    
1724            /**
1725            * Returns an ordered range of all the user groups associated with the group.
1726            *
1727            * <p>
1728            * 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.
1729            * </p>
1730            *
1731            * @param pk the primary key of the group
1732            * @param start the lower bound of the range of groups
1733            * @param end the upper bound of the range of groups (not inclusive)
1734            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1735            * @return the ordered range of user groups associated with the group
1736            * @throws SystemException if a system exception occurred
1737            */
1738            public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
1739                    long pk, int start, int end,
1740                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1741                    throws com.liferay.portal.kernel.exception.SystemException {
1742                    return getPersistence().getUserGroups(pk, start, end, orderByComparator);
1743            }
1744    
1745            /**
1746            * Returns the number of user groups associated with the group.
1747            *
1748            * @param pk the primary key of the group
1749            * @return the number of user groups associated with the group
1750            * @throws SystemException if a system exception occurred
1751            */
1752            public static int getUserGroupsSize(long pk)
1753                    throws com.liferay.portal.kernel.exception.SystemException {
1754                    return getPersistence().getUserGroupsSize(pk);
1755            }
1756    
1757            /**
1758            * Returns <code>true</code> if the user group is associated with the group.
1759            *
1760            * @param pk the primary key of the group
1761            * @param userGroupPK the primary key of the user group
1762            * @return <code>true</code> if the user group is associated with the group; <code>false</code> otherwise
1763            * @throws SystemException if a system exception occurred
1764            */
1765            public static boolean containsUserGroup(long pk, long userGroupPK)
1766                    throws com.liferay.portal.kernel.exception.SystemException {
1767                    return getPersistence().containsUserGroup(pk, userGroupPK);
1768            }
1769    
1770            /**
1771            * Returns <code>true</code> if the group has any user groups associated with it.
1772            *
1773            * @param pk the primary key of the group to check for associations with user groups
1774            * @return <code>true</code> if the group has any user groups associated with it; <code>false</code> otherwise
1775            * @throws SystemException if a system exception occurred
1776            */
1777            public static boolean containsUserGroups(long pk)
1778                    throws com.liferay.portal.kernel.exception.SystemException {
1779                    return getPersistence().containsUserGroups(pk);
1780            }
1781    
1782            /**
1783            * Adds an association between the group and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1784            *
1785            * @param pk the primary key of the group
1786            * @param userGroupPK the primary key of the user group
1787            * @throws SystemException if a system exception occurred
1788            */
1789            public static void addUserGroup(long pk, long userGroupPK)
1790                    throws com.liferay.portal.kernel.exception.SystemException {
1791                    getPersistence().addUserGroup(pk, userGroupPK);
1792            }
1793    
1794            /**
1795            * Adds an association between the group and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1796            *
1797            * @param pk the primary key of the group
1798            * @param userGroup the user group
1799            * @throws SystemException if a system exception occurred
1800            */
1801            public static void addUserGroup(long pk,
1802                    com.liferay.portal.model.UserGroup userGroup)
1803                    throws com.liferay.portal.kernel.exception.SystemException {
1804                    getPersistence().addUserGroup(pk, userGroup);
1805            }
1806    
1807            /**
1808            * Adds an association between the group and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1809            *
1810            * @param pk the primary key of the group
1811            * @param userGroupPKs the primary keys of the user groups
1812            * @throws SystemException if a system exception occurred
1813            */
1814            public static void addUserGroups(long pk, long[] userGroupPKs)
1815                    throws com.liferay.portal.kernel.exception.SystemException {
1816                    getPersistence().addUserGroups(pk, userGroupPKs);
1817            }
1818    
1819            /**
1820            * Adds an association between the group and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1821            *
1822            * @param pk the primary key of the group
1823            * @param userGroups the user groups
1824            * @throws SystemException if a system exception occurred
1825            */
1826            public static void addUserGroups(long pk,
1827                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1828                    throws com.liferay.portal.kernel.exception.SystemException {
1829                    getPersistence().addUserGroups(pk, userGroups);
1830            }
1831    
1832            /**
1833            * Clears all associations between the group and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1834            *
1835            * @param pk the primary key of the group to clear the associated user groups from
1836            * @throws SystemException if a system exception occurred
1837            */
1838            public static void clearUserGroups(long pk)
1839                    throws com.liferay.portal.kernel.exception.SystemException {
1840                    getPersistence().clearUserGroups(pk);
1841            }
1842    
1843            /**
1844            * Removes the association between the group and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1845            *
1846            * @param pk the primary key of the group
1847            * @param userGroupPK the primary key of the user group
1848            * @throws SystemException if a system exception occurred
1849            */
1850            public static void removeUserGroup(long pk, long userGroupPK)
1851                    throws com.liferay.portal.kernel.exception.SystemException {
1852                    getPersistence().removeUserGroup(pk, userGroupPK);
1853            }
1854    
1855            /**
1856            * Removes the association between the group and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1857            *
1858            * @param pk the primary key of the group
1859            * @param userGroup the user group
1860            * @throws SystemException if a system exception occurred
1861            */
1862            public static void removeUserGroup(long pk,
1863                    com.liferay.portal.model.UserGroup userGroup)
1864                    throws com.liferay.portal.kernel.exception.SystemException {
1865                    getPersistence().removeUserGroup(pk, userGroup);
1866            }
1867    
1868            /**
1869            * Removes the association between the group and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1870            *
1871            * @param pk the primary key of the group
1872            * @param userGroupPKs the primary keys of the user groups
1873            * @throws SystemException if a system exception occurred
1874            */
1875            public static void removeUserGroups(long pk, long[] userGroupPKs)
1876                    throws com.liferay.portal.kernel.exception.SystemException {
1877                    getPersistence().removeUserGroups(pk, userGroupPKs);
1878            }
1879    
1880            /**
1881            * Removes the association between the group and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1882            *
1883            * @param pk the primary key of the group
1884            * @param userGroups the user groups
1885            * @throws SystemException if a system exception occurred
1886            */
1887            public static void removeUserGroups(long pk,
1888                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1889                    throws com.liferay.portal.kernel.exception.SystemException {
1890                    getPersistence().removeUserGroups(pk, userGroups);
1891            }
1892    
1893            /**
1894            * Sets the user groups associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1895            *
1896            * @param pk the primary key of the group
1897            * @param userGroupPKs the primary keys of the user groups to be associated with the group
1898            * @throws SystemException if a system exception occurred
1899            */
1900            public static void setUserGroups(long pk, long[] userGroupPKs)
1901                    throws com.liferay.portal.kernel.exception.SystemException {
1902                    getPersistence().setUserGroups(pk, userGroupPKs);
1903            }
1904    
1905            /**
1906            * Sets the user groups associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1907            *
1908            * @param pk the primary key of the group
1909            * @param userGroups the user groups to be associated with the group
1910            * @throws SystemException if a system exception occurred
1911            */
1912            public static void setUserGroups(long pk,
1913                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1914                    throws com.liferay.portal.kernel.exception.SystemException {
1915                    getPersistence().setUserGroups(pk, userGroups);
1916            }
1917    
1918            /**
1919            * Returns all the users associated with the group.
1920            *
1921            * @param pk the primary key of the group
1922            * @return the users associated with the group
1923            * @throws SystemException if a system exception occurred
1924            */
1925            public static java.util.List<com.liferay.portal.model.User> getUsers(
1926                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1927                    return getPersistence().getUsers(pk);
1928            }
1929    
1930            /**
1931            * Returns a range of all the users associated with the group.
1932            *
1933            * <p>
1934            * 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.
1935            * </p>
1936            *
1937            * @param pk the primary key of the group
1938            * @param start the lower bound of the range of groups
1939            * @param end the upper bound of the range of groups (not inclusive)
1940            * @return the range of users associated with the group
1941            * @throws SystemException if a system exception occurred
1942            */
1943            public static java.util.List<com.liferay.portal.model.User> getUsers(
1944                    long pk, int start, int end)
1945                    throws com.liferay.portal.kernel.exception.SystemException {
1946                    return getPersistence().getUsers(pk, start, end);
1947            }
1948    
1949            /**
1950            * Returns an ordered range of all the users associated with the group.
1951            *
1952            * <p>
1953            * 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.
1954            * </p>
1955            *
1956            * @param pk the primary key of the group
1957            * @param start the lower bound of the range of groups
1958            * @param end the upper bound of the range of groups (not inclusive)
1959            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1960            * @return the ordered range of users associated with the group
1961            * @throws SystemException if a system exception occurred
1962            */
1963            public static java.util.List<com.liferay.portal.model.User> getUsers(
1964                    long pk, int start, int end,
1965                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1966                    throws com.liferay.portal.kernel.exception.SystemException {
1967                    return getPersistence().getUsers(pk, start, end, orderByComparator);
1968            }
1969    
1970            /**
1971            * Returns the number of users associated with the group.
1972            *
1973            * @param pk the primary key of the group
1974            * @return the number of users associated with the group
1975            * @throws SystemException if a system exception occurred
1976            */
1977            public static int getUsersSize(long pk)
1978                    throws com.liferay.portal.kernel.exception.SystemException {
1979                    return getPersistence().getUsersSize(pk);
1980            }
1981    
1982            /**
1983            * Returns <code>true</code> if the user is associated with the group.
1984            *
1985            * @param pk the primary key of the group
1986            * @param userPK the primary key of the user
1987            * @return <code>true</code> if the user is associated with the group; <code>false</code> otherwise
1988            * @throws SystemException if a system exception occurred
1989            */
1990            public static boolean containsUser(long pk, long userPK)
1991                    throws com.liferay.portal.kernel.exception.SystemException {
1992                    return getPersistence().containsUser(pk, userPK);
1993            }
1994    
1995            /**
1996            * Returns <code>true</code> if the group has any users associated with it.
1997            *
1998            * @param pk the primary key of the group to check for associations with users
1999            * @return <code>true</code> if the group has any users associated with it; <code>false</code> otherwise
2000            * @throws SystemException if a system exception occurred
2001            */
2002            public static boolean containsUsers(long pk)
2003                    throws com.liferay.portal.kernel.exception.SystemException {
2004                    return getPersistence().containsUsers(pk);
2005            }
2006    
2007            /**
2008            * Adds an association between the group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2009            *
2010            * @param pk the primary key of the group
2011            * @param userPK the primary key of the user
2012            * @throws SystemException if a system exception occurred
2013            */
2014            public static void addUser(long pk, long userPK)
2015                    throws com.liferay.portal.kernel.exception.SystemException {
2016                    getPersistence().addUser(pk, userPK);
2017            }
2018    
2019            /**
2020            * Adds an association between the group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2021            *
2022            * @param pk the primary key of the group
2023            * @param user the user
2024            * @throws SystemException if a system exception occurred
2025            */
2026            public static void addUser(long pk, com.liferay.portal.model.User user)
2027                    throws com.liferay.portal.kernel.exception.SystemException {
2028                    getPersistence().addUser(pk, user);
2029            }
2030    
2031            /**
2032            * Adds an association between the group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2033            *
2034            * @param pk the primary key of the group
2035            * @param userPKs the primary keys of the users
2036            * @throws SystemException if a system exception occurred
2037            */
2038            public static void addUsers(long pk, long[] userPKs)
2039                    throws com.liferay.portal.kernel.exception.SystemException {
2040                    getPersistence().addUsers(pk, userPKs);
2041            }
2042    
2043            /**
2044            * Adds an association between the group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2045            *
2046            * @param pk the primary key of the group
2047            * @param users the users
2048            * @throws SystemException if a system exception occurred
2049            */
2050            public static void addUsers(long pk,
2051                    java.util.List<com.liferay.portal.model.User> users)
2052                    throws com.liferay.portal.kernel.exception.SystemException {
2053                    getPersistence().addUsers(pk, users);
2054            }
2055    
2056            /**
2057            * Clears all associations between the group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2058            *
2059            * @param pk the primary key of the group to clear the associated users from
2060            * @throws SystemException if a system exception occurred
2061            */
2062            public static void clearUsers(long pk)
2063                    throws com.liferay.portal.kernel.exception.SystemException {
2064                    getPersistence().clearUsers(pk);
2065            }
2066    
2067            /**
2068            * Removes the association between the group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2069            *
2070            * @param pk the primary key of the group
2071            * @param userPK the primary key of the user
2072            * @throws SystemException if a system exception occurred
2073            */
2074            public static void removeUser(long pk, long userPK)
2075                    throws com.liferay.portal.kernel.exception.SystemException {
2076                    getPersistence().removeUser(pk, userPK);
2077            }
2078    
2079            /**
2080            * Removes the association between the group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2081            *
2082            * @param pk the primary key of the group
2083            * @param user the user
2084            * @throws SystemException if a system exception occurred
2085            */
2086            public static void removeUser(long pk, com.liferay.portal.model.User user)
2087                    throws com.liferay.portal.kernel.exception.SystemException {
2088                    getPersistence().removeUser(pk, user);
2089            }
2090    
2091            /**
2092            * Removes the association between the group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2093            *
2094            * @param pk the primary key of the group
2095            * @param userPKs the primary keys of the users
2096            * @throws SystemException if a system exception occurred
2097            */
2098            public static void removeUsers(long pk, long[] userPKs)
2099                    throws com.liferay.portal.kernel.exception.SystemException {
2100                    getPersistence().removeUsers(pk, userPKs);
2101            }
2102    
2103            /**
2104            * Removes the association between the group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2105            *
2106            * @param pk the primary key of the group
2107            * @param users the users
2108            * @throws SystemException if a system exception occurred
2109            */
2110            public static void removeUsers(long pk,
2111                    java.util.List<com.liferay.portal.model.User> users)
2112                    throws com.liferay.portal.kernel.exception.SystemException {
2113                    getPersistence().removeUsers(pk, users);
2114            }
2115    
2116            /**
2117            * Sets the users associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2118            *
2119            * @param pk the primary key of the group
2120            * @param userPKs the primary keys of the users to be associated with the group
2121            * @throws SystemException if a system exception occurred
2122            */
2123            public static void setUsers(long pk, long[] userPKs)
2124                    throws com.liferay.portal.kernel.exception.SystemException {
2125                    getPersistence().setUsers(pk, userPKs);
2126            }
2127    
2128            /**
2129            * Sets the users associated with the group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2130            *
2131            * @param pk the primary key of the group
2132            * @param users the users to be associated with the group
2133            * @throws SystemException if a system exception occurred
2134            */
2135            public static void setUsers(long pk,
2136                    java.util.List<com.liferay.portal.model.User> users)
2137                    throws com.liferay.portal.kernel.exception.SystemException {
2138                    getPersistence().setUsers(pk, users);
2139            }
2140    
2141            public static GroupPersistence getPersistence() {
2142                    if (_persistence == null) {
2143                            _persistence = (GroupPersistence)PortalBeanLocatorUtil.locate(GroupPersistence.class.getName());
2144    
2145                            ReferenceRegistry.registerReference(GroupUtil.class, "_persistence");
2146                    }
2147    
2148                    return _persistence;
2149            }
2150    
2151            public void setPersistence(GroupPersistence persistence) {
2152                    _persistence = persistence;
2153    
2154                    ReferenceRegistry.registerReference(GroupUtil.class, "_persistence");
2155            }
2156    
2157            private static GroupPersistence _persistence;
2158    }