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