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