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