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