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