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.UserGroup;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the user group service. This utility wraps {@link UserGroupPersistenceImpl} 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 UserGroupPersistence
036     * @see UserGroupPersistenceImpl
037     * @generated
038     */
039    public class UserGroupUtil {
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(UserGroup userGroup) {
057                    getPersistence().clearCache(userGroup);
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<UserGroup> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) 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<UserGroup> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<UserGroup> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static UserGroup update(UserGroup userGroup)
100                    throws SystemException {
101                    return getPersistence().update(userGroup);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static UserGroup update(UserGroup userGroup,
108                    ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(userGroup, serviceContext);
110            }
111    
112            /**
113            * Returns all the user groups where companyId = &#63;.
114            *
115            * @param companyId the company ID
116            * @return the matching user groups
117            * @throws SystemException if a system exception occurred
118            */
119            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
120                    long companyId)
121                    throws com.liferay.portal.kernel.exception.SystemException {
122                    return getPersistence().findByCompanyId(companyId);
123            }
124    
125            /**
126            * Returns a range of all the user groups where companyId = &#63;.
127            *
128            * <p>
129            * 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.UserGroupModelImpl}. 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.
130            * </p>
131            *
132            * @param companyId the company ID
133            * @param start the lower bound of the range of user groups
134            * @param end the upper bound of the range of user groups (not inclusive)
135            * @return the range of matching user groups
136            * @throws SystemException if a system exception occurred
137            */
138            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
139                    long companyId, int start, int end)
140                    throws com.liferay.portal.kernel.exception.SystemException {
141                    return getPersistence().findByCompanyId(companyId, start, end);
142            }
143    
144            /**
145            * Returns an ordered range of all the user groups where companyId = &#63;.
146            *
147            * <p>
148            * 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.UserGroupModelImpl}. 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.
149            * </p>
150            *
151            * @param companyId the company ID
152            * @param start the lower bound of the range of user groups
153            * @param end the upper bound of the range of user groups (not inclusive)
154            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
155            * @return the ordered range of matching user groups
156            * @throws SystemException if a system exception occurred
157            */
158            public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
159                    long companyId, int start, int end,
160                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence()
163                                       .findByCompanyId(companyId, start, end, orderByComparator);
164            }
165    
166            /**
167            * Returns the first user group in the ordered set where companyId = &#63;.
168            *
169            * @param companyId the company ID
170            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
171            * @return the first matching user group
172            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portal.model.UserGroup findByCompanyId_First(
176                    long companyId,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.NoSuchUserGroupException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getPersistence()
181                                       .findByCompanyId_First(companyId, orderByComparator);
182            }
183    
184            /**
185            * Returns the first user group in the ordered set where companyId = &#63;.
186            *
187            * @param companyId the company ID
188            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
189            * @return the first matching user group, or <code>null</code> if a matching user group could not be found
190            * @throws SystemException if a system exception occurred
191            */
192            public static com.liferay.portal.model.UserGroup fetchByCompanyId_First(
193                    long companyId,
194                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getPersistence()
197                                       .fetchByCompanyId_First(companyId, orderByComparator);
198            }
199    
200            /**
201            * Returns the last user group in the ordered set where companyId = &#63;.
202            *
203            * @param companyId the company ID
204            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
205            * @return the last matching user group
206            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
207            * @throws SystemException if a system exception occurred
208            */
209            public static com.liferay.portal.model.UserGroup findByCompanyId_Last(
210                    long companyId,
211                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212                    throws com.liferay.portal.NoSuchUserGroupException,
213                            com.liferay.portal.kernel.exception.SystemException {
214                    return getPersistence()
215                                       .findByCompanyId_Last(companyId, orderByComparator);
216            }
217    
218            /**
219            * Returns the last user group in the ordered set where companyId = &#63;.
220            *
221            * @param companyId the company ID
222            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
223            * @return the last matching user group, or <code>null</code> if a matching user group could not be found
224            * @throws SystemException if a system exception occurred
225            */
226            public static com.liferay.portal.model.UserGroup fetchByCompanyId_Last(
227                    long companyId,
228                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
229                    throws com.liferay.portal.kernel.exception.SystemException {
230                    return getPersistence()
231                                       .fetchByCompanyId_Last(companyId, orderByComparator);
232            }
233    
234            /**
235            * Returns the user groups before and after the current user group in the ordered set where companyId = &#63;.
236            *
237            * @param userGroupId the primary key of the current user group
238            * @param companyId the company ID
239            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
240            * @return the previous, current, and next user group
241            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
242            * @throws SystemException if a system exception occurred
243            */
244            public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
245                    long userGroupId, long companyId,
246                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247                    throws com.liferay.portal.NoSuchUserGroupException,
248                            com.liferay.portal.kernel.exception.SystemException {
249                    return getPersistence()
250                                       .findByCompanyId_PrevAndNext(userGroupId, companyId,
251                            orderByComparator);
252            }
253    
254            /**
255            * Returns all the user groups that the user has permission to view where companyId = &#63;.
256            *
257            * @param companyId the company ID
258            * @return the matching user groups that the user has permission to view
259            * @throws SystemException if a system exception occurred
260            */
261            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
262                    long companyId)
263                    throws com.liferay.portal.kernel.exception.SystemException {
264                    return getPersistence().filterFindByCompanyId(companyId);
265            }
266    
267            /**
268            * Returns a range of all the user groups that the user has permission to view where companyId = &#63;.
269            *
270            * <p>
271            * 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.UserGroupModelImpl}. 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.
272            * </p>
273            *
274            * @param companyId the company ID
275            * @param start the lower bound of the range of user groups
276            * @param end the upper bound of the range of user groups (not inclusive)
277            * @return the range of matching user groups that the user has permission to view
278            * @throws SystemException if a system exception occurred
279            */
280            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
281                    long companyId, int start, int end)
282                    throws com.liferay.portal.kernel.exception.SystemException {
283                    return getPersistence().filterFindByCompanyId(companyId, start, end);
284            }
285    
286            /**
287            * Returns an ordered range of all the user groups that the user has permissions to view where companyId = &#63;.
288            *
289            * <p>
290            * 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.UserGroupModelImpl}. 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.
291            * </p>
292            *
293            * @param companyId the company ID
294            * @param start the lower bound of the range of user groups
295            * @param end the upper bound of the range of user groups (not inclusive)
296            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
297            * @return the ordered range of matching user groups that the user has permission to view
298            * @throws SystemException if a system exception occurred
299            */
300            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
301                    long companyId, int start, int end,
302                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
303                    throws com.liferay.portal.kernel.exception.SystemException {
304                    return getPersistence()
305                                       .filterFindByCompanyId(companyId, start, end,
306                            orderByComparator);
307            }
308    
309            /**
310            * Returns the user groups before and after the current user group in the ordered set of user groups that the user has permission to view where companyId = &#63;.
311            *
312            * @param userGroupId the primary key of the current user group
313            * @param companyId the company ID
314            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
315            * @return the previous, current, and next user group
316            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
317            * @throws SystemException if a system exception occurred
318            */
319            public static com.liferay.portal.model.UserGroup[] filterFindByCompanyId_PrevAndNext(
320                    long userGroupId, long companyId,
321                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
322                    throws com.liferay.portal.NoSuchUserGroupException,
323                            com.liferay.portal.kernel.exception.SystemException {
324                    return getPersistence()
325                                       .filterFindByCompanyId_PrevAndNext(userGroupId, companyId,
326                            orderByComparator);
327            }
328    
329            /**
330            * Removes all the user groups where companyId = &#63; from the database.
331            *
332            * @param companyId the company ID
333            * @throws SystemException if a system exception occurred
334            */
335            public static void removeByCompanyId(long companyId)
336                    throws com.liferay.portal.kernel.exception.SystemException {
337                    getPersistence().removeByCompanyId(companyId);
338            }
339    
340            /**
341            * Returns the number of user groups where companyId = &#63;.
342            *
343            * @param companyId the company ID
344            * @return the number of matching user groups
345            * @throws SystemException if a system exception occurred
346            */
347            public static int countByCompanyId(long companyId)
348                    throws com.liferay.portal.kernel.exception.SystemException {
349                    return getPersistence().countByCompanyId(companyId);
350            }
351    
352            /**
353            * Returns the number of user groups that the user has permission to view where companyId = &#63;.
354            *
355            * @param companyId the company ID
356            * @return the number of matching user groups that the user has permission to view
357            * @throws SystemException if a system exception occurred
358            */
359            public static int filterCountByCompanyId(long companyId)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence().filterCountByCompanyId(companyId);
362            }
363    
364            /**
365            * Returns all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
366            *
367            * @param companyId the company ID
368            * @param parentUserGroupId the parent user group ID
369            * @return the matching user groups
370            * @throws SystemException if a system exception occurred
371            */
372            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
373                    long companyId, long parentUserGroupId)
374                    throws com.liferay.portal.kernel.exception.SystemException {
375                    return getPersistence().findByC_P(companyId, parentUserGroupId);
376            }
377    
378            /**
379            * Returns a range of all the user groups where companyId = &#63; and parentUserGroupId = &#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.UserGroupModelImpl}. 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 parentUserGroupId the parent user group ID
387            * @param start the lower bound of the range of user groups
388            * @param end the upper bound of the range of user groups (not inclusive)
389            * @return the range of matching user groups
390            * @throws SystemException if a system exception occurred
391            */
392            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
393                    long companyId, long parentUserGroupId, int start, int end)
394                    throws com.liferay.portal.kernel.exception.SystemException {
395                    return getPersistence()
396                                       .findByC_P(companyId, parentUserGroupId, start, end);
397            }
398    
399            /**
400            * Returns an ordered range of all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
401            *
402            * <p>
403            * 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.UserGroupModelImpl}. 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.
404            * </p>
405            *
406            * @param companyId the company ID
407            * @param parentUserGroupId the parent user group ID
408            * @param start the lower bound of the range of user groups
409            * @param end the upper bound of the range of user groups (not inclusive)
410            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
411            * @return the ordered range of matching user groups
412            * @throws SystemException if a system exception occurred
413            */
414            public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
415                    long companyId, long parentUserGroupId, int start, int end,
416                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
417                    throws com.liferay.portal.kernel.exception.SystemException {
418                    return getPersistence()
419                                       .findByC_P(companyId, parentUserGroupId, start, end,
420                            orderByComparator);
421            }
422    
423            /**
424            * Returns the first user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
425            *
426            * @param companyId the company ID
427            * @param parentUserGroupId the parent user group ID
428            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
429            * @return the first matching user group
430            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
431            * @throws SystemException if a system exception occurred
432            */
433            public static com.liferay.portal.model.UserGroup findByC_P_First(
434                    long companyId, long parentUserGroupId,
435                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
436                    throws com.liferay.portal.NoSuchUserGroupException,
437                            com.liferay.portal.kernel.exception.SystemException {
438                    return getPersistence()
439                                       .findByC_P_First(companyId, parentUserGroupId,
440                            orderByComparator);
441            }
442    
443            /**
444            * Returns the first user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
445            *
446            * @param companyId the company ID
447            * @param parentUserGroupId the parent user group ID
448            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
449            * @return the first matching user group, or <code>null</code> if a matching user group could not be found
450            * @throws SystemException if a system exception occurred
451            */
452            public static com.liferay.portal.model.UserGroup fetchByC_P_First(
453                    long companyId, long parentUserGroupId,
454                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
455                    throws com.liferay.portal.kernel.exception.SystemException {
456                    return getPersistence()
457                                       .fetchByC_P_First(companyId, parentUserGroupId,
458                            orderByComparator);
459            }
460    
461            /**
462            * Returns the last user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
463            *
464            * @param companyId the company ID
465            * @param parentUserGroupId the parent user group ID
466            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
467            * @return the last matching user group
468            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
469            * @throws SystemException if a system exception occurred
470            */
471            public static com.liferay.portal.model.UserGroup findByC_P_Last(
472                    long companyId, long parentUserGroupId,
473                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
474                    throws com.liferay.portal.NoSuchUserGroupException,
475                            com.liferay.portal.kernel.exception.SystemException {
476                    return getPersistence()
477                                       .findByC_P_Last(companyId, parentUserGroupId,
478                            orderByComparator);
479            }
480    
481            /**
482            * Returns the last user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
483            *
484            * @param companyId the company ID
485            * @param parentUserGroupId the parent user group ID
486            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
487            * @return the last matching user group, or <code>null</code> if a matching user group could not be found
488            * @throws SystemException if a system exception occurred
489            */
490            public static com.liferay.portal.model.UserGroup fetchByC_P_Last(
491                    long companyId, long parentUserGroupId,
492                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
493                    throws com.liferay.portal.kernel.exception.SystemException {
494                    return getPersistence()
495                                       .fetchByC_P_Last(companyId, parentUserGroupId,
496                            orderByComparator);
497            }
498    
499            /**
500            * Returns the user groups before and after the current user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
501            *
502            * @param userGroupId the primary key of the current user group
503            * @param companyId the company ID
504            * @param parentUserGroupId the parent user group ID
505            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
506            * @return the previous, current, and next user group
507            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
508            * @throws SystemException if a system exception occurred
509            */
510            public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
511                    long userGroupId, long companyId, long parentUserGroupId,
512                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
513                    throws com.liferay.portal.NoSuchUserGroupException,
514                            com.liferay.portal.kernel.exception.SystemException {
515                    return getPersistence()
516                                       .findByC_P_PrevAndNext(userGroupId, companyId,
517                            parentUserGroupId, orderByComparator);
518            }
519    
520            /**
521            * Returns all the user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
522            *
523            * @param companyId the company ID
524            * @param parentUserGroupId the parent user group ID
525            * @return the matching user groups that the user has permission to view
526            * @throws SystemException if a system exception occurred
527            */
528            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
529                    long companyId, long parentUserGroupId)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return getPersistence().filterFindByC_P(companyId, parentUserGroupId);
532            }
533    
534            /**
535            * Returns a range of all the user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
536            *
537            * <p>
538            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
539            * </p>
540            *
541            * @param companyId the company ID
542            * @param parentUserGroupId the parent user group ID
543            * @param start the lower bound of the range of user groups
544            * @param end the upper bound of the range of user groups (not inclusive)
545            * @return the range of matching user groups that the user has permission to view
546            * @throws SystemException if a system exception occurred
547            */
548            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
549                    long companyId, long parentUserGroupId, int start, int end)
550                    throws com.liferay.portal.kernel.exception.SystemException {
551                    return getPersistence()
552                                       .filterFindByC_P(companyId, parentUserGroupId, start, end);
553            }
554    
555            /**
556            * Returns an ordered range of all the user groups that the user has permissions to view where companyId = &#63; and parentUserGroupId = &#63;.
557            *
558            * <p>
559            * 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.UserGroupModelImpl}. 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.
560            * </p>
561            *
562            * @param companyId the company ID
563            * @param parentUserGroupId the parent user group ID
564            * @param start the lower bound of the range of user groups
565            * @param end the upper bound of the range of user groups (not inclusive)
566            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
567            * @return the ordered range of matching user groups that the user has permission to view
568            * @throws SystemException if a system exception occurred
569            */
570            public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
571                    long companyId, long parentUserGroupId, int start, int end,
572                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
573                    throws com.liferay.portal.kernel.exception.SystemException {
574                    return getPersistence()
575                                       .filterFindByC_P(companyId, parentUserGroupId, start, end,
576                            orderByComparator);
577            }
578    
579            /**
580            * Returns the user groups before and after the current user group in the ordered set of user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
581            *
582            * @param userGroupId the primary key of the current user group
583            * @param companyId the company ID
584            * @param parentUserGroupId the parent user group ID
585            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
586            * @return the previous, current, and next user group
587            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
588            * @throws SystemException if a system exception occurred
589            */
590            public static com.liferay.portal.model.UserGroup[] filterFindByC_P_PrevAndNext(
591                    long userGroupId, long companyId, long parentUserGroupId,
592                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
593                    throws com.liferay.portal.NoSuchUserGroupException,
594                            com.liferay.portal.kernel.exception.SystemException {
595                    return getPersistence()
596                                       .filterFindByC_P_PrevAndNext(userGroupId, companyId,
597                            parentUserGroupId, orderByComparator);
598            }
599    
600            /**
601            * Removes all the user groups where companyId = &#63; and parentUserGroupId = &#63; from the database.
602            *
603            * @param companyId the company ID
604            * @param parentUserGroupId the parent user group ID
605            * @throws SystemException if a system exception occurred
606            */
607            public static void removeByC_P(long companyId, long parentUserGroupId)
608                    throws com.liferay.portal.kernel.exception.SystemException {
609                    getPersistence().removeByC_P(companyId, parentUserGroupId);
610            }
611    
612            /**
613            * Returns the number of user groups where companyId = &#63; and parentUserGroupId = &#63;.
614            *
615            * @param companyId the company ID
616            * @param parentUserGroupId the parent user group ID
617            * @return the number of matching user groups
618            * @throws SystemException if a system exception occurred
619            */
620            public static int countByC_P(long companyId, long parentUserGroupId)
621                    throws com.liferay.portal.kernel.exception.SystemException {
622                    return getPersistence().countByC_P(companyId, parentUserGroupId);
623            }
624    
625            /**
626            * Returns the number of user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
627            *
628            * @param companyId the company ID
629            * @param parentUserGroupId the parent user group ID
630            * @return the number of matching user groups that the user has permission to view
631            * @throws SystemException if a system exception occurred
632            */
633            public static int filterCountByC_P(long companyId, long parentUserGroupId)
634                    throws com.liferay.portal.kernel.exception.SystemException {
635                    return getPersistence().filterCountByC_P(companyId, parentUserGroupId);
636            }
637    
638            /**
639            * Returns the user group where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
640            *
641            * @param companyId the company ID
642            * @param name the name
643            * @return the matching user group
644            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
645            * @throws SystemException if a system exception occurred
646            */
647            public static com.liferay.portal.model.UserGroup findByC_N(long companyId,
648                    java.lang.String name)
649                    throws com.liferay.portal.NoSuchUserGroupException,
650                            com.liferay.portal.kernel.exception.SystemException {
651                    return getPersistence().findByC_N(companyId, name);
652            }
653    
654            /**
655            * Returns the user group where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
656            *
657            * @param companyId the company ID
658            * @param name the name
659            * @return the matching user group, or <code>null</code> if a matching user group could not be found
660            * @throws SystemException if a system exception occurred
661            */
662            public static com.liferay.portal.model.UserGroup fetchByC_N(
663                    long companyId, java.lang.String name)
664                    throws com.liferay.portal.kernel.exception.SystemException {
665                    return getPersistence().fetchByC_N(companyId, name);
666            }
667    
668            /**
669            * Returns the user group where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
670            *
671            * @param companyId the company ID
672            * @param name the name
673            * @param retrieveFromCache whether to use the finder cache
674            * @return the matching user group, or <code>null</code> if a matching user group could not be found
675            * @throws SystemException if a system exception occurred
676            */
677            public static com.liferay.portal.model.UserGroup fetchByC_N(
678                    long companyId, java.lang.String name, boolean retrieveFromCache)
679                    throws com.liferay.portal.kernel.exception.SystemException {
680                    return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
681            }
682    
683            /**
684            * Removes the user group where companyId = &#63; and name = &#63; from the database.
685            *
686            * @param companyId the company ID
687            * @param name the name
688            * @return the user group that was removed
689            * @throws SystemException if a system exception occurred
690            */
691            public static com.liferay.portal.model.UserGroup removeByC_N(
692                    long companyId, java.lang.String name)
693                    throws com.liferay.portal.NoSuchUserGroupException,
694                            com.liferay.portal.kernel.exception.SystemException {
695                    return getPersistence().removeByC_N(companyId, name);
696            }
697    
698            /**
699            * Returns the number of user groups where companyId = &#63; and name = &#63;.
700            *
701            * @param companyId the company ID
702            * @param name the name
703            * @return the number of matching user groups
704            * @throws SystemException if a system exception occurred
705            */
706            public static int countByC_N(long companyId, java.lang.String name)
707                    throws com.liferay.portal.kernel.exception.SystemException {
708                    return getPersistence().countByC_N(companyId, name);
709            }
710    
711            /**
712            * Caches the user group in the entity cache if it is enabled.
713            *
714            * @param userGroup the user group
715            */
716            public static void cacheResult(com.liferay.portal.model.UserGroup userGroup) {
717                    getPersistence().cacheResult(userGroup);
718            }
719    
720            /**
721            * Caches the user groups in the entity cache if it is enabled.
722            *
723            * @param userGroups the user groups
724            */
725            public static void cacheResult(
726                    java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
727                    getPersistence().cacheResult(userGroups);
728            }
729    
730            /**
731            * Creates a new user group with the primary key. Does not add the user group to the database.
732            *
733            * @param userGroupId the primary key for the new user group
734            * @return the new user group
735            */
736            public static com.liferay.portal.model.UserGroup create(long userGroupId) {
737                    return getPersistence().create(userGroupId);
738            }
739    
740            /**
741            * Removes the user group with the primary key from the database. Also notifies the appropriate model listeners.
742            *
743            * @param userGroupId the primary key of the user group
744            * @return the user group that was removed
745            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
746            * @throws SystemException if a system exception occurred
747            */
748            public static com.liferay.portal.model.UserGroup remove(long userGroupId)
749                    throws com.liferay.portal.NoSuchUserGroupException,
750                            com.liferay.portal.kernel.exception.SystemException {
751                    return getPersistence().remove(userGroupId);
752            }
753    
754            public static com.liferay.portal.model.UserGroup updateImpl(
755                    com.liferay.portal.model.UserGroup userGroup)
756                    throws com.liferay.portal.kernel.exception.SystemException {
757                    return getPersistence().updateImpl(userGroup);
758            }
759    
760            /**
761            * Returns the user group with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
762            *
763            * @param userGroupId the primary key of the user group
764            * @return the user group
765            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
766            * @throws SystemException if a system exception occurred
767            */
768            public static com.liferay.portal.model.UserGroup findByPrimaryKey(
769                    long userGroupId)
770                    throws com.liferay.portal.NoSuchUserGroupException,
771                            com.liferay.portal.kernel.exception.SystemException {
772                    return getPersistence().findByPrimaryKey(userGroupId);
773            }
774    
775            /**
776            * Returns the user group with the primary key or returns <code>null</code> if it could not be found.
777            *
778            * @param userGroupId the primary key of the user group
779            * @return the user group, or <code>null</code> if a user group with the primary key could not be found
780            * @throws SystemException if a system exception occurred
781            */
782            public static com.liferay.portal.model.UserGroup fetchByPrimaryKey(
783                    long userGroupId)
784                    throws com.liferay.portal.kernel.exception.SystemException {
785                    return getPersistence().fetchByPrimaryKey(userGroupId);
786            }
787    
788            /**
789            * Returns all the user groups.
790            *
791            * @return the user groups
792            * @throws SystemException if a system exception occurred
793            */
794            public static java.util.List<com.liferay.portal.model.UserGroup> findAll()
795                    throws com.liferay.portal.kernel.exception.SystemException {
796                    return getPersistence().findAll();
797            }
798    
799            /**
800            * Returns a range of all the user groups.
801            *
802            * <p>
803            * 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.UserGroupModelImpl}. 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.
804            * </p>
805            *
806            * @param start the lower bound of the range of user groups
807            * @param end the upper bound of the range of user groups (not inclusive)
808            * @return the range of user groups
809            * @throws SystemException if a system exception occurred
810            */
811            public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
812                    int start, int end)
813                    throws com.liferay.portal.kernel.exception.SystemException {
814                    return getPersistence().findAll(start, end);
815            }
816    
817            /**
818            * Returns an ordered range of all the user groups.
819            *
820            * <p>
821            * 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.UserGroupModelImpl}. 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.
822            * </p>
823            *
824            * @param start the lower bound of the range of user groups
825            * @param end the upper bound of the range of user groups (not inclusive)
826            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
827            * @return the ordered range of user groups
828            * @throws SystemException if a system exception occurred
829            */
830            public static java.util.List<com.liferay.portal.model.UserGroup> findAll(
831                    int start, int end,
832                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
833                    throws com.liferay.portal.kernel.exception.SystemException {
834                    return getPersistence().findAll(start, end, orderByComparator);
835            }
836    
837            /**
838            * Removes all the user groups from the database.
839            *
840            * @throws SystemException if a system exception occurred
841            */
842            public static void removeAll()
843                    throws com.liferay.portal.kernel.exception.SystemException {
844                    getPersistence().removeAll();
845            }
846    
847            /**
848            * Returns the number of user groups.
849            *
850            * @return the number of user groups
851            * @throws SystemException if a system exception occurred
852            */
853            public static int countAll()
854                    throws com.liferay.portal.kernel.exception.SystemException {
855                    return getPersistence().countAll();
856            }
857    
858            /**
859            * Returns all the groups associated with the user group.
860            *
861            * @param pk the primary key of the user group
862            * @return the groups associated with the user group
863            * @throws SystemException if a system exception occurred
864            */
865            public static java.util.List<com.liferay.portal.model.Group> getGroups(
866                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
867                    return getPersistence().getGroups(pk);
868            }
869    
870            /**
871            * Returns a range of all the groups associated with the user group.
872            *
873            * <p>
874            * 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.UserGroupModelImpl}. 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.
875            * </p>
876            *
877            * @param pk the primary key of the user group
878            * @param start the lower bound of the range of user groups
879            * @param end the upper bound of the range of user groups (not inclusive)
880            * @return the range of groups associated with the user group
881            * @throws SystemException if a system exception occurred
882            */
883            public static java.util.List<com.liferay.portal.model.Group> getGroups(
884                    long pk, int start, int end)
885                    throws com.liferay.portal.kernel.exception.SystemException {
886                    return getPersistence().getGroups(pk, start, end);
887            }
888    
889            /**
890            * Returns an ordered range of all the groups associated with the user group.
891            *
892            * <p>
893            * 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.UserGroupModelImpl}. 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.
894            * </p>
895            *
896            * @param pk the primary key of the user group
897            * @param start the lower bound of the range of user groups
898            * @param end the upper bound of the range of user groups (not inclusive)
899            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
900            * @return the ordered range of groups associated with the user group
901            * @throws SystemException if a system exception occurred
902            */
903            public static java.util.List<com.liferay.portal.model.Group> getGroups(
904                    long pk, int start, int end,
905                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
906                    throws com.liferay.portal.kernel.exception.SystemException {
907                    return getPersistence().getGroups(pk, start, end, orderByComparator);
908            }
909    
910            /**
911            * Returns the number of groups associated with the user group.
912            *
913            * @param pk the primary key of the user group
914            * @return the number of groups associated with the user group
915            * @throws SystemException if a system exception occurred
916            */
917            public static int getGroupsSize(long pk)
918                    throws com.liferay.portal.kernel.exception.SystemException {
919                    return getPersistence().getGroupsSize(pk);
920            }
921    
922            /**
923            * Returns <code>true</code> if the group is associated with the user group.
924            *
925            * @param pk the primary key of the user group
926            * @param groupPK the primary key of the group
927            * @return <code>true</code> if the group is associated with the user group; <code>false</code> otherwise
928            * @throws SystemException if a system exception occurred
929            */
930            public static boolean containsGroup(long pk, long groupPK)
931                    throws com.liferay.portal.kernel.exception.SystemException {
932                    return getPersistence().containsGroup(pk, groupPK);
933            }
934    
935            /**
936            * Returns <code>true</code> if the user group has any groups associated with it.
937            *
938            * @param pk the primary key of the user group to check for associations with groups
939            * @return <code>true</code> if the user group has any groups associated with it; <code>false</code> otherwise
940            * @throws SystemException if a system exception occurred
941            */
942            public static boolean containsGroups(long pk)
943                    throws com.liferay.portal.kernel.exception.SystemException {
944                    return getPersistence().containsGroups(pk);
945            }
946    
947            /**
948            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
949            *
950            * @param pk the primary key of the user group
951            * @param groupPK the primary key of the group
952            * @throws SystemException if a system exception occurred
953            */
954            public static void addGroup(long pk, long groupPK)
955                    throws com.liferay.portal.kernel.exception.SystemException {
956                    getPersistence().addGroup(pk, groupPK);
957            }
958    
959            /**
960            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
961            *
962            * @param pk the primary key of the user group
963            * @param group the group
964            * @throws SystemException if a system exception occurred
965            */
966            public static void addGroup(long pk, com.liferay.portal.model.Group group)
967                    throws com.liferay.portal.kernel.exception.SystemException {
968                    getPersistence().addGroup(pk, group);
969            }
970    
971            /**
972            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
973            *
974            * @param pk the primary key of the user group
975            * @param groupPKs the primary keys of the groups
976            * @throws SystemException if a system exception occurred
977            */
978            public static void addGroups(long pk, long[] groupPKs)
979                    throws com.liferay.portal.kernel.exception.SystemException {
980                    getPersistence().addGroups(pk, groupPKs);
981            }
982    
983            /**
984            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
985            *
986            * @param pk the primary key of the user group
987            * @param groups the groups
988            * @throws SystemException if a system exception occurred
989            */
990            public static void addGroups(long pk,
991                    java.util.List<com.liferay.portal.model.Group> groups)
992                    throws com.liferay.portal.kernel.exception.SystemException {
993                    getPersistence().addGroups(pk, groups);
994            }
995    
996            /**
997            * Clears all associations between the user group and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
998            *
999            * @param pk the primary key of the user group to clear the associated groups from
1000            * @throws SystemException if a system exception occurred
1001            */
1002            public static void clearGroups(long pk)
1003                    throws com.liferay.portal.kernel.exception.SystemException {
1004                    getPersistence().clearGroups(pk);
1005            }
1006    
1007            /**
1008            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1009            *
1010            * @param pk the primary key of the user group
1011            * @param groupPK the primary key of the group
1012            * @throws SystemException if a system exception occurred
1013            */
1014            public static void removeGroup(long pk, long groupPK)
1015                    throws com.liferay.portal.kernel.exception.SystemException {
1016                    getPersistence().removeGroup(pk, groupPK);
1017            }
1018    
1019            /**
1020            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1021            *
1022            * @param pk the primary key of the user group
1023            * @param group the group
1024            * @throws SystemException if a system exception occurred
1025            */
1026            public static void removeGroup(long pk, com.liferay.portal.model.Group group)
1027                    throws com.liferay.portal.kernel.exception.SystemException {
1028                    getPersistence().removeGroup(pk, group);
1029            }
1030    
1031            /**
1032            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1033            *
1034            * @param pk the primary key of the user group
1035            * @param groupPKs the primary keys of the groups
1036            * @throws SystemException if a system exception occurred
1037            */
1038            public static void removeGroups(long pk, long[] groupPKs)
1039                    throws com.liferay.portal.kernel.exception.SystemException {
1040                    getPersistence().removeGroups(pk, groupPKs);
1041            }
1042    
1043            /**
1044            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1045            *
1046            * @param pk the primary key of the user group
1047            * @param groups the groups
1048            * @throws SystemException if a system exception occurred
1049            */
1050            public static void removeGroups(long pk,
1051                    java.util.List<com.liferay.portal.model.Group> groups)
1052                    throws com.liferay.portal.kernel.exception.SystemException {
1053                    getPersistence().removeGroups(pk, groups);
1054            }
1055    
1056            /**
1057            * Sets the groups associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1058            *
1059            * @param pk the primary key of the user group
1060            * @param groupPKs the primary keys of the groups to be associated with the user group
1061            * @throws SystemException if a system exception occurred
1062            */
1063            public static void setGroups(long pk, long[] groupPKs)
1064                    throws com.liferay.portal.kernel.exception.SystemException {
1065                    getPersistence().setGroups(pk, groupPKs);
1066            }
1067    
1068            /**
1069            * Sets the groups associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1070            *
1071            * @param pk the primary key of the user group
1072            * @param groups the groups to be associated with the user group
1073            * @throws SystemException if a system exception occurred
1074            */
1075            public static void setGroups(long pk,
1076                    java.util.List<com.liferay.portal.model.Group> groups)
1077                    throws com.liferay.portal.kernel.exception.SystemException {
1078                    getPersistence().setGroups(pk, groups);
1079            }
1080    
1081            /**
1082            * Returns all the teams associated with the user group.
1083            *
1084            * @param pk the primary key of the user group
1085            * @return the teams associated with the user group
1086            * @throws SystemException if a system exception occurred
1087            */
1088            public static java.util.List<com.liferay.portal.model.Team> getTeams(
1089                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1090                    return getPersistence().getTeams(pk);
1091            }
1092    
1093            /**
1094            * Returns a range of all the teams associated with the user group.
1095            *
1096            * <p>
1097            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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.UserGroupModelImpl}. 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.
1098            * </p>
1099            *
1100            * @param pk the primary key of the user group
1101            * @param start the lower bound of the range of user groups
1102            * @param end the upper bound of the range of user groups (not inclusive)
1103            * @return the range of teams associated with the user group
1104            * @throws SystemException if a system exception occurred
1105            */
1106            public static java.util.List<com.liferay.portal.model.Team> getTeams(
1107                    long pk, int start, int end)
1108                    throws com.liferay.portal.kernel.exception.SystemException {
1109                    return getPersistence().getTeams(pk, start, end);
1110            }
1111    
1112            /**
1113            * Returns an ordered range of all the teams associated with the user group.
1114            *
1115            * <p>
1116            * 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.UserGroupModelImpl}. 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.
1117            * </p>
1118            *
1119            * @param pk the primary key of the user group
1120            * @param start the lower bound of the range of user groups
1121            * @param end the upper bound of the range of user groups (not inclusive)
1122            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1123            * @return the ordered range of teams associated with the user group
1124            * @throws SystemException if a system exception occurred
1125            */
1126            public static java.util.List<com.liferay.portal.model.Team> getTeams(
1127                    long pk, int start, int end,
1128                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1129                    throws com.liferay.portal.kernel.exception.SystemException {
1130                    return getPersistence().getTeams(pk, start, end, orderByComparator);
1131            }
1132    
1133            /**
1134            * Returns the number of teams associated with the user group.
1135            *
1136            * @param pk the primary key of the user group
1137            * @return the number of teams associated with the user group
1138            * @throws SystemException if a system exception occurred
1139            */
1140            public static int getTeamsSize(long pk)
1141                    throws com.liferay.portal.kernel.exception.SystemException {
1142                    return getPersistence().getTeamsSize(pk);
1143            }
1144    
1145            /**
1146            * Returns <code>true</code> if the team is associated with the user group.
1147            *
1148            * @param pk the primary key of the user group
1149            * @param teamPK the primary key of the team
1150            * @return <code>true</code> if the team is associated with the user group; <code>false</code> otherwise
1151            * @throws SystemException if a system exception occurred
1152            */
1153            public static boolean containsTeam(long pk, long teamPK)
1154                    throws com.liferay.portal.kernel.exception.SystemException {
1155                    return getPersistence().containsTeam(pk, teamPK);
1156            }
1157    
1158            /**
1159            * Returns <code>true</code> if the user group has any teams associated with it.
1160            *
1161            * @param pk the primary key of the user group to check for associations with teams
1162            * @return <code>true</code> if the user group has any teams associated with it; <code>false</code> otherwise
1163            * @throws SystemException if a system exception occurred
1164            */
1165            public static boolean containsTeams(long pk)
1166                    throws com.liferay.portal.kernel.exception.SystemException {
1167                    return getPersistence().containsTeams(pk);
1168            }
1169    
1170            /**
1171            * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1172            *
1173            * @param pk the primary key of the user group
1174            * @param teamPK the primary key of the team
1175            * @throws SystemException if a system exception occurred
1176            */
1177            public static void addTeam(long pk, long teamPK)
1178                    throws com.liferay.portal.kernel.exception.SystemException {
1179                    getPersistence().addTeam(pk, teamPK);
1180            }
1181    
1182            /**
1183            * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1184            *
1185            * @param pk the primary key of the user group
1186            * @param team the team
1187            * @throws SystemException if a system exception occurred
1188            */
1189            public static void addTeam(long pk, com.liferay.portal.model.Team team)
1190                    throws com.liferay.portal.kernel.exception.SystemException {
1191                    getPersistence().addTeam(pk, team);
1192            }
1193    
1194            /**
1195            * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1196            *
1197            * @param pk the primary key of the user group
1198            * @param teamPKs the primary keys of the teams
1199            * @throws SystemException if a system exception occurred
1200            */
1201            public static void addTeams(long pk, long[] teamPKs)
1202                    throws com.liferay.portal.kernel.exception.SystemException {
1203                    getPersistence().addTeams(pk, teamPKs);
1204            }
1205    
1206            /**
1207            * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1208            *
1209            * @param pk the primary key of the user group
1210            * @param teams the teams
1211            * @throws SystemException if a system exception occurred
1212            */
1213            public static void addTeams(long pk,
1214                    java.util.List<com.liferay.portal.model.Team> teams)
1215                    throws com.liferay.portal.kernel.exception.SystemException {
1216                    getPersistence().addTeams(pk, teams);
1217            }
1218    
1219            /**
1220            * Clears all associations between the user group and its teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1221            *
1222            * @param pk the primary key of the user group to clear the associated teams from
1223            * @throws SystemException if a system exception occurred
1224            */
1225            public static void clearTeams(long pk)
1226                    throws com.liferay.portal.kernel.exception.SystemException {
1227                    getPersistence().clearTeams(pk);
1228            }
1229    
1230            /**
1231            * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1232            *
1233            * @param pk the primary key of the user group
1234            * @param teamPK the primary key of the team
1235            * @throws SystemException if a system exception occurred
1236            */
1237            public static void removeTeam(long pk, long teamPK)
1238                    throws com.liferay.portal.kernel.exception.SystemException {
1239                    getPersistence().removeTeam(pk, teamPK);
1240            }
1241    
1242            /**
1243            * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1244            *
1245            * @param pk the primary key of the user group
1246            * @param team the team
1247            * @throws SystemException if a system exception occurred
1248            */
1249            public static void removeTeam(long pk, com.liferay.portal.model.Team team)
1250                    throws com.liferay.portal.kernel.exception.SystemException {
1251                    getPersistence().removeTeam(pk, team);
1252            }
1253    
1254            /**
1255            * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1256            *
1257            * @param pk the primary key of the user group
1258            * @param teamPKs the primary keys of the teams
1259            * @throws SystemException if a system exception occurred
1260            */
1261            public static void removeTeams(long pk, long[] teamPKs)
1262                    throws com.liferay.portal.kernel.exception.SystemException {
1263                    getPersistence().removeTeams(pk, teamPKs);
1264            }
1265    
1266            /**
1267            * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1268            *
1269            * @param pk the primary key of the user group
1270            * @param teams the teams
1271            * @throws SystemException if a system exception occurred
1272            */
1273            public static void removeTeams(long pk,
1274                    java.util.List<com.liferay.portal.model.Team> teams)
1275                    throws com.liferay.portal.kernel.exception.SystemException {
1276                    getPersistence().removeTeams(pk, teams);
1277            }
1278    
1279            /**
1280            * Sets the teams associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1281            *
1282            * @param pk the primary key of the user group
1283            * @param teamPKs the primary keys of the teams to be associated with the user group
1284            * @throws SystemException if a system exception occurred
1285            */
1286            public static void setTeams(long pk, long[] teamPKs)
1287                    throws com.liferay.portal.kernel.exception.SystemException {
1288                    getPersistence().setTeams(pk, teamPKs);
1289            }
1290    
1291            /**
1292            * Sets the teams associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1293            *
1294            * @param pk the primary key of the user group
1295            * @param teams the teams to be associated with the user group
1296            * @throws SystemException if a system exception occurred
1297            */
1298            public static void setTeams(long pk,
1299                    java.util.List<com.liferay.portal.model.Team> teams)
1300                    throws com.liferay.portal.kernel.exception.SystemException {
1301                    getPersistence().setTeams(pk, teams);
1302            }
1303    
1304            /**
1305            * Returns all the users associated with the user group.
1306            *
1307            * @param pk the primary key of the user group
1308            * @return the users associated with the user group
1309            * @throws SystemException if a system exception occurred
1310            */
1311            public static java.util.List<com.liferay.portal.model.User> getUsers(
1312                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1313                    return getPersistence().getUsers(pk);
1314            }
1315    
1316            /**
1317            * Returns a range of all the users associated with the user group.
1318            *
1319            * <p>
1320            * 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.UserGroupModelImpl}. 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.
1321            * </p>
1322            *
1323            * @param pk the primary key of the user group
1324            * @param start the lower bound of the range of user groups
1325            * @param end the upper bound of the range of user groups (not inclusive)
1326            * @return the range of users associated with the user group
1327            * @throws SystemException if a system exception occurred
1328            */
1329            public static java.util.List<com.liferay.portal.model.User> getUsers(
1330                    long pk, int start, int end)
1331                    throws com.liferay.portal.kernel.exception.SystemException {
1332                    return getPersistence().getUsers(pk, start, end);
1333            }
1334    
1335            /**
1336            * Returns an ordered range of all the users associated with the user group.
1337            *
1338            * <p>
1339            * 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.UserGroupModelImpl}. 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.
1340            * </p>
1341            *
1342            * @param pk the primary key of the user group
1343            * @param start the lower bound of the range of user groups
1344            * @param end the upper bound of the range of user groups (not inclusive)
1345            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1346            * @return the ordered range of users associated with the user group
1347            * @throws SystemException if a system exception occurred
1348            */
1349            public static java.util.List<com.liferay.portal.model.User> getUsers(
1350                    long pk, int start, int end,
1351                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1352                    throws com.liferay.portal.kernel.exception.SystemException {
1353                    return getPersistence().getUsers(pk, start, end, orderByComparator);
1354            }
1355    
1356            /**
1357            * Returns the number of users associated with the user group.
1358            *
1359            * @param pk the primary key of the user group
1360            * @return the number of users associated with the user group
1361            * @throws SystemException if a system exception occurred
1362            */
1363            public static int getUsersSize(long pk)
1364                    throws com.liferay.portal.kernel.exception.SystemException {
1365                    return getPersistence().getUsersSize(pk);
1366            }
1367    
1368            /**
1369            * Returns <code>true</code> if the user is associated with the user group.
1370            *
1371            * @param pk the primary key of the user group
1372            * @param userPK the primary key of the user
1373            * @return <code>true</code> if the user is associated with the user group; <code>false</code> otherwise
1374            * @throws SystemException if a system exception occurred
1375            */
1376            public static boolean containsUser(long pk, long userPK)
1377                    throws com.liferay.portal.kernel.exception.SystemException {
1378                    return getPersistence().containsUser(pk, userPK);
1379            }
1380    
1381            /**
1382            * Returns <code>true</code> if the user group has any users associated with it.
1383            *
1384            * @param pk the primary key of the user group to check for associations with users
1385            * @return <code>true</code> if the user group has any users associated with it; <code>false</code> otherwise
1386            * @throws SystemException if a system exception occurred
1387            */
1388            public static boolean containsUsers(long pk)
1389                    throws com.liferay.portal.kernel.exception.SystemException {
1390                    return getPersistence().containsUsers(pk);
1391            }
1392    
1393            /**
1394            * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1395            *
1396            * @param pk the primary key of the user group
1397            * @param userPK the primary key of the user
1398            * @throws SystemException if a system exception occurred
1399            */
1400            public static void addUser(long pk, long userPK)
1401                    throws com.liferay.portal.kernel.exception.SystemException {
1402                    getPersistence().addUser(pk, userPK);
1403            }
1404    
1405            /**
1406            * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1407            *
1408            * @param pk the primary key of the user group
1409            * @param user the user
1410            * @throws SystemException if a system exception occurred
1411            */
1412            public static void addUser(long pk, com.liferay.portal.model.User user)
1413                    throws com.liferay.portal.kernel.exception.SystemException {
1414                    getPersistence().addUser(pk, user);
1415            }
1416    
1417            /**
1418            * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1419            *
1420            * @param pk the primary key of the user group
1421            * @param userPKs the primary keys of the users
1422            * @throws SystemException if a system exception occurred
1423            */
1424            public static void addUsers(long pk, long[] userPKs)
1425                    throws com.liferay.portal.kernel.exception.SystemException {
1426                    getPersistence().addUsers(pk, userPKs);
1427            }
1428    
1429            /**
1430            * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1431            *
1432            * @param pk the primary key of the user group
1433            * @param users the users
1434            * @throws SystemException if a system exception occurred
1435            */
1436            public static void addUsers(long pk,
1437                    java.util.List<com.liferay.portal.model.User> users)
1438                    throws com.liferay.portal.kernel.exception.SystemException {
1439                    getPersistence().addUsers(pk, users);
1440            }
1441    
1442            /**
1443            * Clears all associations between the user group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1444            *
1445            * @param pk the primary key of the user group to clear the associated users from
1446            * @throws SystemException if a system exception occurred
1447            */
1448            public static void clearUsers(long pk)
1449                    throws com.liferay.portal.kernel.exception.SystemException {
1450                    getPersistence().clearUsers(pk);
1451            }
1452    
1453            /**
1454            * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1455            *
1456            * @param pk the primary key of the user group
1457            * @param userPK the primary key of the user
1458            * @throws SystemException if a system exception occurred
1459            */
1460            public static void removeUser(long pk, long userPK)
1461                    throws com.liferay.portal.kernel.exception.SystemException {
1462                    getPersistence().removeUser(pk, userPK);
1463            }
1464    
1465            /**
1466            * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1467            *
1468            * @param pk the primary key of the user group
1469            * @param user the user
1470            * @throws SystemException if a system exception occurred
1471            */
1472            public static void removeUser(long pk, com.liferay.portal.model.User user)
1473                    throws com.liferay.portal.kernel.exception.SystemException {
1474                    getPersistence().removeUser(pk, user);
1475            }
1476    
1477            /**
1478            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1479            *
1480            * @param pk the primary key of the user group
1481            * @param userPKs the primary keys of the users
1482            * @throws SystemException if a system exception occurred
1483            */
1484            public static void removeUsers(long pk, long[] userPKs)
1485                    throws com.liferay.portal.kernel.exception.SystemException {
1486                    getPersistence().removeUsers(pk, userPKs);
1487            }
1488    
1489            /**
1490            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1491            *
1492            * @param pk the primary key of the user group
1493            * @param users the users
1494            * @throws SystemException if a system exception occurred
1495            */
1496            public static void removeUsers(long pk,
1497                    java.util.List<com.liferay.portal.model.User> users)
1498                    throws com.liferay.portal.kernel.exception.SystemException {
1499                    getPersistence().removeUsers(pk, users);
1500            }
1501    
1502            /**
1503            * Sets the users associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1504            *
1505            * @param pk the primary key of the user group
1506            * @param userPKs the primary keys of the users to be associated with the user group
1507            * @throws SystemException if a system exception occurred
1508            */
1509            public static void setUsers(long pk, long[] userPKs)
1510                    throws com.liferay.portal.kernel.exception.SystemException {
1511                    getPersistence().setUsers(pk, userPKs);
1512            }
1513    
1514            /**
1515            * Sets the users associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1516            *
1517            * @param pk the primary key of the user group
1518            * @param users the users to be associated with the user group
1519            * @throws SystemException if a system exception occurred
1520            */
1521            public static void setUsers(long pk,
1522                    java.util.List<com.liferay.portal.model.User> users)
1523                    throws com.liferay.portal.kernel.exception.SystemException {
1524                    getPersistence().setUsers(pk, users);
1525            }
1526    
1527            public static UserGroupPersistence getPersistence() {
1528                    if (_persistence == null) {
1529                            _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName());
1530    
1531                            ReferenceRegistry.registerReference(UserGroupUtil.class,
1532                                    "_persistence");
1533                    }
1534    
1535                    return _persistence;
1536            }
1537    
1538            /**
1539             * @deprecated
1540             */
1541            public void setPersistence(UserGroupPersistence persistence) {
1542            }
1543    
1544            private static UserGroupPersistence _persistence;
1545    }