001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.model.UserGroup;
019    
020    /**
021     * The persistence interface for the user group service.
022     *
023     * <p>
024     * Caching information and settings can be found in <code>portal.properties</code>
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see UserGroupPersistenceImpl
029     * @see UserGroupUtil
030     * @generated
031     */
032    public interface UserGroupPersistence extends BasePersistence<UserGroup> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * Never modify or reference this interface directly. Always use {@link UserGroupUtil} to access the user group persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
037             */
038    
039            /**
040            * Caches the user group in the entity cache if it is enabled.
041            *
042            * @param userGroup the user group
043            */
044            public void cacheResult(com.liferay.portal.model.UserGroup userGroup);
045    
046            /**
047            * Caches the user groups in the entity cache if it is enabled.
048            *
049            * @param userGroups the user groups
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portal.model.UserGroup> userGroups);
053    
054            /**
055            * Creates a new user group with the primary key. Does not add the user group to the database.
056            *
057            * @param userGroupId the primary key for the new user group
058            * @return the new user group
059            */
060            public com.liferay.portal.model.UserGroup create(long userGroupId);
061    
062            /**
063            * Removes the user group with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param userGroupId the primary key of the user group
066            * @return the user group that was removed
067            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
068            * @throws SystemException if a system exception occurred
069            */
070            public com.liferay.portal.model.UserGroup remove(long userGroupId)
071                    throws com.liferay.portal.NoSuchUserGroupException,
072                            com.liferay.portal.kernel.exception.SystemException;
073    
074            public com.liferay.portal.model.UserGroup updateImpl(
075                    com.liferay.portal.model.UserGroup userGroup, boolean merge)
076                    throws com.liferay.portal.kernel.exception.SystemException;
077    
078            /**
079            * Returns the user group with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
080            *
081            * @param userGroupId the primary key of the user group
082            * @return the user group
083            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
084            * @throws SystemException if a system exception occurred
085            */
086            public com.liferay.portal.model.UserGroup findByPrimaryKey(long userGroupId)
087                    throws com.liferay.portal.NoSuchUserGroupException,
088                            com.liferay.portal.kernel.exception.SystemException;
089    
090            /**
091            * Returns the user group with the primary key or returns <code>null</code> if it could not be found.
092            *
093            * @param userGroupId the primary key of the user group
094            * @return the user group, or <code>null</code> if a user group with the primary key could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.UserGroup fetchByPrimaryKey(
098                    long userGroupId)
099                    throws com.liferay.portal.kernel.exception.SystemException;
100    
101            /**
102            * Returns all the user groups where companyId = &#63;.
103            *
104            * @param companyId the company ID
105            * @return the matching user groups
106            * @throws SystemException if a system exception occurred
107            */
108            public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
109                    long companyId)
110                    throws com.liferay.portal.kernel.exception.SystemException;
111    
112            /**
113            * Returns a range of all the user groups where companyId = &#63;.
114            *
115            * <p>
116            * 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.
117            * </p>
118            *
119            * @param companyId the company ID
120            * @param start the lower bound of the range of user groups
121            * @param end the upper bound of the range of user groups (not inclusive)
122            * @return the range of matching user groups
123            * @throws SystemException if a system exception occurred
124            */
125            public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
126                    long companyId, int start, int end)
127                    throws com.liferay.portal.kernel.exception.SystemException;
128    
129            /**
130            * Returns an ordered range of all the user groups where companyId = &#63;.
131            *
132            * <p>
133            * 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.
134            * </p>
135            *
136            * @param companyId the company ID
137            * @param start the lower bound of the range of user groups
138            * @param end the upper bound of the range of user groups (not inclusive)
139            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
140            * @return the ordered range of matching user groups
141            * @throws SystemException if a system exception occurred
142            */
143            public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
144                    long companyId, int start, int end,
145                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
146                    throws com.liferay.portal.kernel.exception.SystemException;
147    
148            /**
149            * Returns the first user group in the ordered set where companyId = &#63;.
150            *
151            * <p>
152            * 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.
153            * </p>
154            *
155            * @param companyId the company ID
156            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
157            * @return the first matching user group
158            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            public com.liferay.portal.model.UserGroup findByCompanyId_First(
162                    long companyId,
163                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164                    throws com.liferay.portal.NoSuchUserGroupException,
165                            com.liferay.portal.kernel.exception.SystemException;
166    
167            /**
168            * Returns the last user group in the ordered set where companyId = &#63;.
169            *
170            * <p>
171            * 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.
172            * </p>
173            *
174            * @param companyId the company ID
175            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
176            * @return the last matching user group
177            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
178            * @throws SystemException if a system exception occurred
179            */
180            public com.liferay.portal.model.UserGroup findByCompanyId_Last(
181                    long companyId,
182                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
183                    throws com.liferay.portal.NoSuchUserGroupException,
184                            com.liferay.portal.kernel.exception.SystemException;
185    
186            /**
187            * Returns the user groups before and after the current user group in the ordered set where companyId = &#63;.
188            *
189            * <p>
190            * 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.
191            * </p>
192            *
193            * @param userGroupId the primary key of the current user group
194            * @param companyId the company ID
195            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
196            * @return the previous, current, and next user group
197            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
198            * @throws SystemException if a system exception occurred
199            */
200            public com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
201                    long userGroupId, long companyId,
202                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203                    throws com.liferay.portal.NoSuchUserGroupException,
204                            com.liferay.portal.kernel.exception.SystemException;
205    
206            /**
207            * Returns all the user groups that the user has permission to view where companyId = &#63;.
208            *
209            * @param companyId the company ID
210            * @return the matching user groups that the user has permission to view
211            * @throws SystemException if a system exception occurred
212            */
213            public java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
214                    long companyId)
215                    throws com.liferay.portal.kernel.exception.SystemException;
216    
217            /**
218            * Returns a range of all the user groups that the user has permission to view where companyId = &#63;.
219            *
220            * <p>
221            * 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.
222            * </p>
223            *
224            * @param companyId the company ID
225            * @param start the lower bound of the range of user groups
226            * @param end the upper bound of the range of user groups (not inclusive)
227            * @return the range of matching user groups that the user has permission to view
228            * @throws SystemException if a system exception occurred
229            */
230            public java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
231                    long companyId, int start, int end)
232                    throws com.liferay.portal.kernel.exception.SystemException;
233    
234            /**
235            * Returns an ordered range of all the user groups that the user has permissions to view where companyId = &#63;.
236            *
237            * <p>
238            * 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.
239            * </p>
240            *
241            * @param companyId the company ID
242            * @param start the lower bound of the range of user groups
243            * @param end the upper bound of the range of user groups (not inclusive)
244            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
245            * @return the ordered range of matching user groups that the user has permission to view
246            * @throws SystemException if a system exception occurred
247            */
248            public java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId(
249                    long companyId, int start, int end,
250                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251                    throws com.liferay.portal.kernel.exception.SystemException;
252    
253            /**
254            * 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;.
255            *
256            * @param userGroupId the primary key of the current user group
257            * @param companyId the company ID
258            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
259            * @return the previous, current, and next user group
260            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
261            * @throws SystemException if a system exception occurred
262            */
263            public com.liferay.portal.model.UserGroup[] filterFindByCompanyId_PrevAndNext(
264                    long userGroupId, long companyId,
265                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266                    throws com.liferay.portal.NoSuchUserGroupException,
267                            com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Returns all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
271            *
272            * @param companyId the company ID
273            * @param parentUserGroupId the parent user group ID
274            * @return the matching user groups
275            * @throws SystemException if a system exception occurred
276            */
277            public java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
278                    long companyId, long parentUserGroupId)
279                    throws com.liferay.portal.kernel.exception.SystemException;
280    
281            /**
282            * Returns a range of all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
283            *
284            * <p>
285            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
286            * </p>
287            *
288            * @param companyId the company ID
289            * @param parentUserGroupId the parent user group ID
290            * @param start the lower bound of the range of user groups
291            * @param end the upper bound of the range of user groups (not inclusive)
292            * @return the range of matching user groups
293            * @throws SystemException if a system exception occurred
294            */
295            public java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
296                    long companyId, long parentUserGroupId, int start, int end)
297                    throws com.liferay.portal.kernel.exception.SystemException;
298    
299            /**
300            * Returns an ordered range of all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
301            *
302            * <p>
303            * 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.
304            * </p>
305            *
306            * @param companyId the company ID
307            * @param parentUserGroupId the parent user group ID
308            * @param start the lower bound of the range of user groups
309            * @param end the upper bound of the range of user groups (not inclusive)
310            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
311            * @return the ordered range of matching user groups
312            * @throws SystemException if a system exception occurred
313            */
314            public java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
315                    long companyId, long parentUserGroupId, int start, int end,
316                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
317                    throws com.liferay.portal.kernel.exception.SystemException;
318    
319            /**
320            * Returns the first user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
321            *
322            * <p>
323            * 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.
324            * </p>
325            *
326            * @param companyId the company ID
327            * @param parentUserGroupId the parent user group ID
328            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
329            * @return the first matching user group
330            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
331            * @throws SystemException if a system exception occurred
332            */
333            public com.liferay.portal.model.UserGroup findByC_P_First(long companyId,
334                    long parentUserGroupId,
335                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
336                    throws com.liferay.portal.NoSuchUserGroupException,
337                            com.liferay.portal.kernel.exception.SystemException;
338    
339            /**
340            * Returns the last user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
341            *
342            * <p>
343            * 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.
344            * </p>
345            *
346            * @param companyId the company ID
347            * @param parentUserGroupId the parent user group ID
348            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
349            * @return the last matching user group
350            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
351            * @throws SystemException if a system exception occurred
352            */
353            public com.liferay.portal.model.UserGroup findByC_P_Last(long companyId,
354                    long parentUserGroupId,
355                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
356                    throws com.liferay.portal.NoSuchUserGroupException,
357                            com.liferay.portal.kernel.exception.SystemException;
358    
359            /**
360            * Returns the user groups before and after the current user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
361            *
362            * <p>
363            * 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.
364            * </p>
365            *
366            * @param userGroupId the primary key of the current user group
367            * @param companyId the company ID
368            * @param parentUserGroupId the parent user group ID
369            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
370            * @return the previous, current, and next user group
371            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
372            * @throws SystemException if a system exception occurred
373            */
374            public com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
375                    long userGroupId, long companyId, long parentUserGroupId,
376                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
377                    throws com.liferay.portal.NoSuchUserGroupException,
378                            com.liferay.portal.kernel.exception.SystemException;
379    
380            /**
381            * Returns all the user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
382            *
383            * @param companyId the company ID
384            * @param parentUserGroupId the parent user group ID
385            * @return the matching user groups that the user has permission to view
386            * @throws SystemException if a system exception occurred
387            */
388            public java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
389                    long companyId, long parentUserGroupId)
390                    throws com.liferay.portal.kernel.exception.SystemException;
391    
392            /**
393            * Returns a range of all the user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
394            *
395            * <p>
396            * 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.
397            * </p>
398            *
399            * @param companyId the company ID
400            * @param parentUserGroupId the parent user group ID
401            * @param start the lower bound of the range of user groups
402            * @param end the upper bound of the range of user groups (not inclusive)
403            * @return the range of matching user groups that the user has permission to view
404            * @throws SystemException if a system exception occurred
405            */
406            public java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
407                    long companyId, long parentUserGroupId, int start, int end)
408                    throws com.liferay.portal.kernel.exception.SystemException;
409    
410            /**
411            * Returns an ordered range of all the user groups that the user has permissions to view where companyId = &#63; and parentUserGroupId = &#63;.
412            *
413            * <p>
414            * 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.
415            * </p>
416            *
417            * @param companyId the company ID
418            * @param parentUserGroupId the parent user group ID
419            * @param start the lower bound of the range of user groups
420            * @param end the upper bound of the range of user groups (not inclusive)
421            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
422            * @return the ordered range of matching user groups that the user has permission to view
423            * @throws SystemException if a system exception occurred
424            */
425            public java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P(
426                    long companyId, long parentUserGroupId, int start, int end,
427                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
428                    throws com.liferay.portal.kernel.exception.SystemException;
429    
430            /**
431            * 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;.
432            *
433            * @param userGroupId the primary key of the current user group
434            * @param companyId the company ID
435            * @param parentUserGroupId the parent user group ID
436            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
437            * @return the previous, current, and next user group
438            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
439            * @throws SystemException if a system exception occurred
440            */
441            public com.liferay.portal.model.UserGroup[] filterFindByC_P_PrevAndNext(
442                    long userGroupId, long companyId, long parentUserGroupId,
443                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
444                    throws com.liferay.portal.NoSuchUserGroupException,
445                            com.liferay.portal.kernel.exception.SystemException;
446    
447            /**
448            * Returns the user group where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
449            *
450            * @param companyId the company ID
451            * @param name the name
452            * @return the matching user group
453            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
454            * @throws SystemException if a system exception occurred
455            */
456            public com.liferay.portal.model.UserGroup findByC_N(long companyId,
457                    java.lang.String name)
458                    throws com.liferay.portal.NoSuchUserGroupException,
459                            com.liferay.portal.kernel.exception.SystemException;
460    
461            /**
462            * 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.
463            *
464            * @param companyId the company ID
465            * @param name the name
466            * @return the matching user group, or <code>null</code> if a matching user group could not be found
467            * @throws SystemException if a system exception occurred
468            */
469            public com.liferay.portal.model.UserGroup fetchByC_N(long companyId,
470                    java.lang.String name)
471                    throws com.liferay.portal.kernel.exception.SystemException;
472    
473            /**
474            * 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.
475            *
476            * @param companyId the company ID
477            * @param name the name
478            * @param retrieveFromCache whether to use the finder cache
479            * @return the matching user group, or <code>null</code> if a matching user group could not be found
480            * @throws SystemException if a system exception occurred
481            */
482            public com.liferay.portal.model.UserGroup fetchByC_N(long companyId,
483                    java.lang.String name, boolean retrieveFromCache)
484                    throws com.liferay.portal.kernel.exception.SystemException;
485    
486            /**
487            * Returns all the user groups.
488            *
489            * @return the user groups
490            * @throws SystemException if a system exception occurred
491            */
492            public java.util.List<com.liferay.portal.model.UserGroup> findAll()
493                    throws com.liferay.portal.kernel.exception.SystemException;
494    
495            /**
496            * Returns a range of all the user groups.
497            *
498            * <p>
499            * 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.
500            * </p>
501            *
502            * @param start the lower bound of the range of user groups
503            * @param end the upper bound of the range of user groups (not inclusive)
504            * @return the range of user groups
505            * @throws SystemException if a system exception occurred
506            */
507            public java.util.List<com.liferay.portal.model.UserGroup> findAll(
508                    int start, int end)
509                    throws com.liferay.portal.kernel.exception.SystemException;
510    
511            /**
512            * Returns an ordered range of all the user groups.
513            *
514            * <p>
515            * 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.
516            * </p>
517            *
518            * @param start the lower bound of the range of user groups
519            * @param end the upper bound of the range of user groups (not inclusive)
520            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
521            * @return the ordered range of user groups
522            * @throws SystemException if a system exception occurred
523            */
524            public java.util.List<com.liferay.portal.model.UserGroup> findAll(
525                    int start, int end,
526                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
527                    throws com.liferay.portal.kernel.exception.SystemException;
528    
529            /**
530            * Removes all the user groups where companyId = &#63; from the database.
531            *
532            * @param companyId the company ID
533            * @throws SystemException if a system exception occurred
534            */
535            public void removeByCompanyId(long companyId)
536                    throws com.liferay.portal.kernel.exception.SystemException;
537    
538            /**
539            * Removes all the user groups where companyId = &#63; and parentUserGroupId = &#63; from the database.
540            *
541            * @param companyId the company ID
542            * @param parentUserGroupId the parent user group ID
543            * @throws SystemException if a system exception occurred
544            */
545            public void removeByC_P(long companyId, long parentUserGroupId)
546                    throws com.liferay.portal.kernel.exception.SystemException;
547    
548            /**
549            * Removes the user group where companyId = &#63; and name = &#63; from the database.
550            *
551            * @param companyId the company ID
552            * @param name the name
553            * @throws SystemException if a system exception occurred
554            */
555            public void removeByC_N(long companyId, java.lang.String name)
556                    throws com.liferay.portal.NoSuchUserGroupException,
557                            com.liferay.portal.kernel.exception.SystemException;
558    
559            /**
560            * Removes all the user groups from the database.
561            *
562            * @throws SystemException if a system exception occurred
563            */
564            public void removeAll()
565                    throws com.liferay.portal.kernel.exception.SystemException;
566    
567            /**
568            * Returns the number of user groups where companyId = &#63;.
569            *
570            * @param companyId the company ID
571            * @return the number of matching user groups
572            * @throws SystemException if a system exception occurred
573            */
574            public int countByCompanyId(long companyId)
575                    throws com.liferay.portal.kernel.exception.SystemException;
576    
577            /**
578            * Returns the number of user groups that the user has permission to view where companyId = &#63;.
579            *
580            * @param companyId the company ID
581            * @return the number of matching user groups that the user has permission to view
582            * @throws SystemException if a system exception occurred
583            */
584            public int filterCountByCompanyId(long companyId)
585                    throws com.liferay.portal.kernel.exception.SystemException;
586    
587            /**
588            * Returns the number of user groups where companyId = &#63; and parentUserGroupId = &#63;.
589            *
590            * @param companyId the company ID
591            * @param parentUserGroupId the parent user group ID
592            * @return the number of matching user groups
593            * @throws SystemException if a system exception occurred
594            */
595            public int countByC_P(long companyId, long parentUserGroupId)
596                    throws com.liferay.portal.kernel.exception.SystemException;
597    
598            /**
599            * Returns the number of user groups that the user has permission to view where companyId = &#63; and parentUserGroupId = &#63;.
600            *
601            * @param companyId the company ID
602            * @param parentUserGroupId the parent user group ID
603            * @return the number of matching user groups that the user has permission to view
604            * @throws SystemException if a system exception occurred
605            */
606            public int filterCountByC_P(long companyId, long parentUserGroupId)
607                    throws com.liferay.portal.kernel.exception.SystemException;
608    
609            /**
610            * Returns the number of user groups where companyId = &#63; and name = &#63;.
611            *
612            * @param companyId the company ID
613            * @param name the name
614            * @return the number of matching user groups
615            * @throws SystemException if a system exception occurred
616            */
617            public int countByC_N(long companyId, java.lang.String name)
618                    throws com.liferay.portal.kernel.exception.SystemException;
619    
620            /**
621            * Returns the number of user groups.
622            *
623            * @return the number of user groups
624            * @throws SystemException if a system exception occurred
625            */
626            public int countAll()
627                    throws com.liferay.portal.kernel.exception.SystemException;
628    
629            /**
630            * Returns all the groups associated with the user group.
631            *
632            * @param pk the primary key of the user group
633            * @return the groups associated with the user group
634            * @throws SystemException if a system exception occurred
635            */
636            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk)
637                    throws com.liferay.portal.kernel.exception.SystemException;
638    
639            /**
640            * Returns a range of all the groups associated with the user group.
641            *
642            * <p>
643            * 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.
644            * </p>
645            *
646            * @param pk the primary key of the user group
647            * @param start the lower bound of the range of user groups
648            * @param end the upper bound of the range of user groups (not inclusive)
649            * @return the range of groups associated with the user group
650            * @throws SystemException if a system exception occurred
651            */
652            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
653                    int start, int end)
654                    throws com.liferay.portal.kernel.exception.SystemException;
655    
656            /**
657            * Returns an ordered range of all the groups associated with the user group.
658            *
659            * <p>
660            * 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.
661            * </p>
662            *
663            * @param pk the primary key of the user group
664            * @param start the lower bound of the range of user groups
665            * @param end the upper bound of the range of user groups (not inclusive)
666            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
667            * @return the ordered range of groups associated with the user group
668            * @throws SystemException if a system exception occurred
669            */
670            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
671                    int start, int end,
672                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
673                    throws com.liferay.portal.kernel.exception.SystemException;
674    
675            /**
676            * Returns the number of groups associated with the user group.
677            *
678            * @param pk the primary key of the user group
679            * @return the number of groups associated with the user group
680            * @throws SystemException if a system exception occurred
681            */
682            public int getGroupsSize(long pk)
683                    throws com.liferay.portal.kernel.exception.SystemException;
684    
685            /**
686            * Returns <code>true</code> if the group is associated with the user group.
687            *
688            * @param pk the primary key of the user group
689            * @param groupPK the primary key of the group
690            * @return <code>true</code> if the group is associated with the user group; <code>false</code> otherwise
691            * @throws SystemException if a system exception occurred
692            */
693            public boolean containsGroup(long pk, long groupPK)
694                    throws com.liferay.portal.kernel.exception.SystemException;
695    
696            /**
697            * Returns <code>true</code> if the user group has any groups associated with it.
698            *
699            * @param pk the primary key of the user group to check for associations with groups
700            * @return <code>true</code> if the user group has any groups associated with it; <code>false</code> otherwise
701            * @throws SystemException if a system exception occurred
702            */
703            public boolean containsGroups(long pk)
704                    throws com.liferay.portal.kernel.exception.SystemException;
705    
706            /**
707            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
708            *
709            * @param pk the primary key of the user group
710            * @param groupPK the primary key of the group
711            * @throws SystemException if a system exception occurred
712            */
713            public void addGroup(long pk, long groupPK)
714                    throws com.liferay.portal.kernel.exception.SystemException;
715    
716            /**
717            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
718            *
719            * @param pk the primary key of the user group
720            * @param group the group
721            * @throws SystemException if a system exception occurred
722            */
723            public void addGroup(long pk, com.liferay.portal.model.Group group)
724                    throws com.liferay.portal.kernel.exception.SystemException;
725    
726            /**
727            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
728            *
729            * @param pk the primary key of the user group
730            * @param groupPKs the primary keys of the groups
731            * @throws SystemException if a system exception occurred
732            */
733            public void addGroups(long pk, long[] groupPKs)
734                    throws com.liferay.portal.kernel.exception.SystemException;
735    
736            /**
737            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
738            *
739            * @param pk the primary key of the user group
740            * @param groups the groups
741            * @throws SystemException if a system exception occurred
742            */
743            public void addGroups(long pk,
744                    java.util.List<com.liferay.portal.model.Group> groups)
745                    throws com.liferay.portal.kernel.exception.SystemException;
746    
747            /**
748            * Clears all associations between the user group and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
749            *
750            * @param pk the primary key of the user group to clear the associated groups from
751            * @throws SystemException if a system exception occurred
752            */
753            public void clearGroups(long pk)
754                    throws com.liferay.portal.kernel.exception.SystemException;
755    
756            /**
757            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
758            *
759            * @param pk the primary key of the user group
760            * @param groupPK the primary key of the group
761            * @throws SystemException if a system exception occurred
762            */
763            public void removeGroup(long pk, long groupPK)
764                    throws com.liferay.portal.kernel.exception.SystemException;
765    
766            /**
767            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
768            *
769            * @param pk the primary key of the user group
770            * @param group the group
771            * @throws SystemException if a system exception occurred
772            */
773            public void removeGroup(long pk, com.liferay.portal.model.Group group)
774                    throws com.liferay.portal.kernel.exception.SystemException;
775    
776            /**
777            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
778            *
779            * @param pk the primary key of the user group
780            * @param groupPKs the primary keys of the groups
781            * @throws SystemException if a system exception occurred
782            */
783            public void removeGroups(long pk, long[] groupPKs)
784                    throws com.liferay.portal.kernel.exception.SystemException;
785    
786            /**
787            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
788            *
789            * @param pk the primary key of the user group
790            * @param groups the groups
791            * @throws SystemException if a system exception occurred
792            */
793            public void removeGroups(long pk,
794                    java.util.List<com.liferay.portal.model.Group> groups)
795                    throws com.liferay.portal.kernel.exception.SystemException;
796    
797            /**
798            * 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.
799            *
800            * @param pk the primary key of the user group
801            * @param groupPKs the primary keys of the groups to be associated with the user group
802            * @throws SystemException if a system exception occurred
803            */
804            public void setGroups(long pk, long[] groupPKs)
805                    throws com.liferay.portal.kernel.exception.SystemException;
806    
807            /**
808            * 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.
809            *
810            * @param pk the primary key of the user group
811            * @param groups the groups to be associated with the user group
812            * @throws SystemException if a system exception occurred
813            */
814            public void setGroups(long pk,
815                    java.util.List<com.liferay.portal.model.Group> groups)
816                    throws com.liferay.portal.kernel.exception.SystemException;
817    
818            /**
819            * Returns all the teams associated with the user group.
820            *
821            * @param pk the primary key of the user group
822            * @return the teams associated with the user group
823            * @throws SystemException if a system exception occurred
824            */
825            public java.util.List<com.liferay.portal.model.Team> getTeams(long pk)
826                    throws com.liferay.portal.kernel.exception.SystemException;
827    
828            /**
829            * Returns a range of all the teams associated with the user group.
830            *
831            * <p>
832            * 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.
833            * </p>
834            *
835            * @param pk the primary key of the user group
836            * @param start the lower bound of the range of user groups
837            * @param end the upper bound of the range of user groups (not inclusive)
838            * @return the range of teams associated with the user group
839            * @throws SystemException if a system exception occurred
840            */
841            public java.util.List<com.liferay.portal.model.Team> getTeams(long pk,
842                    int start, int end)
843                    throws com.liferay.portal.kernel.exception.SystemException;
844    
845            /**
846            * Returns an ordered range of all the teams associated with the user group.
847            *
848            * <p>
849            * 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.
850            * </p>
851            *
852            * @param pk the primary key of the user group
853            * @param start the lower bound of the range of user groups
854            * @param end the upper bound of the range of user groups (not inclusive)
855            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
856            * @return the ordered range of teams associated with the user group
857            * @throws SystemException if a system exception occurred
858            */
859            public java.util.List<com.liferay.portal.model.Team> getTeams(long pk,
860                    int start, int end,
861                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
862                    throws com.liferay.portal.kernel.exception.SystemException;
863    
864            /**
865            * Returns the number of teams associated with the user group.
866            *
867            * @param pk the primary key of the user group
868            * @return the number of teams associated with the user group
869            * @throws SystemException if a system exception occurred
870            */
871            public int getTeamsSize(long pk)
872                    throws com.liferay.portal.kernel.exception.SystemException;
873    
874            /**
875            * Returns <code>true</code> if the team is associated with the user group.
876            *
877            * @param pk the primary key of the user group
878            * @param teamPK the primary key of the team
879            * @return <code>true</code> if the team is associated with the user group; <code>false</code> otherwise
880            * @throws SystemException if a system exception occurred
881            */
882            public boolean containsTeam(long pk, long teamPK)
883                    throws com.liferay.portal.kernel.exception.SystemException;
884    
885            /**
886            * Returns <code>true</code> if the user group has any teams associated with it.
887            *
888            * @param pk the primary key of the user group to check for associations with teams
889            * @return <code>true</code> if the user group has any teams associated with it; <code>false</code> otherwise
890            * @throws SystemException if a system exception occurred
891            */
892            public boolean containsTeams(long pk)
893                    throws com.liferay.portal.kernel.exception.SystemException;
894    
895            /**
896            * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
897            *
898            * @param pk the primary key of the user group
899            * @param teamPK the primary key of the team
900            * @throws SystemException if a system exception occurred
901            */
902            public void addTeam(long pk, long teamPK)
903                    throws com.liferay.portal.kernel.exception.SystemException;
904    
905            /**
906            * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
907            *
908            * @param pk the primary key of the user group
909            * @param team the team
910            * @throws SystemException if a system exception occurred
911            */
912            public void addTeam(long pk, com.liferay.portal.model.Team team)
913                    throws com.liferay.portal.kernel.exception.SystemException;
914    
915            /**
916            * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
917            *
918            * @param pk the primary key of the user group
919            * @param teamPKs the primary keys of the teams
920            * @throws SystemException if a system exception occurred
921            */
922            public void addTeams(long pk, long[] teamPKs)
923                    throws com.liferay.portal.kernel.exception.SystemException;
924    
925            /**
926            * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
927            *
928            * @param pk the primary key of the user group
929            * @param teams the teams
930            * @throws SystemException if a system exception occurred
931            */
932            public void addTeams(long pk,
933                    java.util.List<com.liferay.portal.model.Team> teams)
934                    throws com.liferay.portal.kernel.exception.SystemException;
935    
936            /**
937            * Clears all associations between the user group and its teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
938            *
939            * @param pk the primary key of the user group to clear the associated teams from
940            * @throws SystemException if a system exception occurred
941            */
942            public void clearTeams(long pk)
943                    throws com.liferay.portal.kernel.exception.SystemException;
944    
945            /**
946            * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
947            *
948            * @param pk the primary key of the user group
949            * @param teamPK the primary key of the team
950            * @throws SystemException if a system exception occurred
951            */
952            public void removeTeam(long pk, long teamPK)
953                    throws com.liferay.portal.kernel.exception.SystemException;
954    
955            /**
956            * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
957            *
958            * @param pk the primary key of the user group
959            * @param team the team
960            * @throws SystemException if a system exception occurred
961            */
962            public void removeTeam(long pk, com.liferay.portal.model.Team team)
963                    throws com.liferay.portal.kernel.exception.SystemException;
964    
965            /**
966            * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
967            *
968            * @param pk the primary key of the user group
969            * @param teamPKs the primary keys of the teams
970            * @throws SystemException if a system exception occurred
971            */
972            public void removeTeams(long pk, long[] teamPKs)
973                    throws com.liferay.portal.kernel.exception.SystemException;
974    
975            /**
976            * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
977            *
978            * @param pk the primary key of the user group
979            * @param teams the teams
980            * @throws SystemException if a system exception occurred
981            */
982            public void removeTeams(long pk,
983                    java.util.List<com.liferay.portal.model.Team> teams)
984                    throws com.liferay.portal.kernel.exception.SystemException;
985    
986            /**
987            * 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.
988            *
989            * @param pk the primary key of the user group
990            * @param teamPKs the primary keys of the teams to be associated with the user group
991            * @throws SystemException if a system exception occurred
992            */
993            public void setTeams(long pk, long[] teamPKs)
994                    throws com.liferay.portal.kernel.exception.SystemException;
995    
996            /**
997            * 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.
998            *
999            * @param pk the primary key of the user group
1000            * @param teams the teams to be associated with the user group
1001            * @throws SystemException if a system exception occurred
1002            */
1003            public void setTeams(long pk,
1004                    java.util.List<com.liferay.portal.model.Team> teams)
1005                    throws com.liferay.portal.kernel.exception.SystemException;
1006    
1007            /**
1008            * Returns all the users associated with the user group.
1009            *
1010            * @param pk the primary key of the user group
1011            * @return the users associated with the user group
1012            * @throws SystemException if a system exception occurred
1013            */
1014            public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
1015                    throws com.liferay.portal.kernel.exception.SystemException;
1016    
1017            /**
1018            * Returns a range of all the users associated with the user group.
1019            *
1020            * <p>
1021            * 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.
1022            * </p>
1023            *
1024            * @param pk the primary key of the user group
1025            * @param start the lower bound of the range of user groups
1026            * @param end the upper bound of the range of user groups (not inclusive)
1027            * @return the range of users associated with the user group
1028            * @throws SystemException if a system exception occurred
1029            */
1030            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
1031                    int start, int end)
1032                    throws com.liferay.portal.kernel.exception.SystemException;
1033    
1034            /**
1035            * Returns an ordered range of all the users associated with the user group.
1036            *
1037            * <p>
1038            * 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.
1039            * </p>
1040            *
1041            * @param pk the primary key of the user group
1042            * @param start the lower bound of the range of user groups
1043            * @param end the upper bound of the range of user groups (not inclusive)
1044            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1045            * @return the ordered range of users associated with the user group
1046            * @throws SystemException if a system exception occurred
1047            */
1048            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
1049                    int start, int end,
1050                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1051                    throws com.liferay.portal.kernel.exception.SystemException;
1052    
1053            /**
1054            * Returns the number of users associated with the user group.
1055            *
1056            * @param pk the primary key of the user group
1057            * @return the number of users associated with the user group
1058            * @throws SystemException if a system exception occurred
1059            */
1060            public int getUsersSize(long pk)
1061                    throws com.liferay.portal.kernel.exception.SystemException;
1062    
1063            /**
1064            * Returns <code>true</code> if the user is associated with the user group.
1065            *
1066            * @param pk the primary key of the user group
1067            * @param userPK the primary key of the user
1068            * @return <code>true</code> if the user is associated with the user group; <code>false</code> otherwise
1069            * @throws SystemException if a system exception occurred
1070            */
1071            public boolean containsUser(long pk, long userPK)
1072                    throws com.liferay.portal.kernel.exception.SystemException;
1073    
1074            /**
1075            * Returns <code>true</code> if the user group has any users associated with it.
1076            *
1077            * @param pk the primary key of the user group to check for associations with users
1078            * @return <code>true</code> if the user group has any users associated with it; <code>false</code> otherwise
1079            * @throws SystemException if a system exception occurred
1080            */
1081            public boolean containsUsers(long pk)
1082                    throws com.liferay.portal.kernel.exception.SystemException;
1083    
1084            /**
1085            * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1086            *
1087            * @param pk the primary key of the user group
1088            * @param userPK the primary key of the user
1089            * @throws SystemException if a system exception occurred
1090            */
1091            public void addUser(long pk, long userPK)
1092                    throws com.liferay.portal.kernel.exception.SystemException;
1093    
1094            /**
1095            * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1096            *
1097            * @param pk the primary key of the user group
1098            * @param user the user
1099            * @throws SystemException if a system exception occurred
1100            */
1101            public void addUser(long pk, com.liferay.portal.model.User user)
1102                    throws com.liferay.portal.kernel.exception.SystemException;
1103    
1104            /**
1105            * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1106            *
1107            * @param pk the primary key of the user group
1108            * @param userPKs the primary keys of the users
1109            * @throws SystemException if a system exception occurred
1110            */
1111            public void addUsers(long pk, long[] userPKs)
1112                    throws com.liferay.portal.kernel.exception.SystemException;
1113    
1114            /**
1115            * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1116            *
1117            * @param pk the primary key of the user group
1118            * @param users the users
1119            * @throws SystemException if a system exception occurred
1120            */
1121            public void addUsers(long pk,
1122                    java.util.List<com.liferay.portal.model.User> users)
1123                    throws com.liferay.portal.kernel.exception.SystemException;
1124    
1125            /**
1126            * Clears all associations between the user group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1127            *
1128            * @param pk the primary key of the user group to clear the associated users from
1129            * @throws SystemException if a system exception occurred
1130            */
1131            public void clearUsers(long pk)
1132                    throws com.liferay.portal.kernel.exception.SystemException;
1133    
1134            /**
1135            * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1136            *
1137            * @param pk the primary key of the user group
1138            * @param userPK the primary key of the user
1139            * @throws SystemException if a system exception occurred
1140            */
1141            public void removeUser(long pk, long userPK)
1142                    throws com.liferay.portal.kernel.exception.SystemException;
1143    
1144            /**
1145            * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1146            *
1147            * @param pk the primary key of the user group
1148            * @param user the user
1149            * @throws SystemException if a system exception occurred
1150            */
1151            public void removeUser(long pk, com.liferay.portal.model.User user)
1152                    throws com.liferay.portal.kernel.exception.SystemException;
1153    
1154            /**
1155            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1156            *
1157            * @param pk the primary key of the user group
1158            * @param userPKs the primary keys of the users
1159            * @throws SystemException if a system exception occurred
1160            */
1161            public void removeUsers(long pk, long[] userPKs)
1162                    throws com.liferay.portal.kernel.exception.SystemException;
1163    
1164            /**
1165            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1166            *
1167            * @param pk the primary key of the user group
1168            * @param users the users
1169            * @throws SystemException if a system exception occurred
1170            */
1171            public void removeUsers(long pk,
1172                    java.util.List<com.liferay.portal.model.User> users)
1173                    throws com.liferay.portal.kernel.exception.SystemException;
1174    
1175            /**
1176            * 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.
1177            *
1178            * @param pk the primary key of the user group
1179            * @param userPKs the primary keys of the users to be associated with the user group
1180            * @throws SystemException if a system exception occurred
1181            */
1182            public void setUsers(long pk, long[] userPKs)
1183                    throws com.liferay.portal.kernel.exception.SystemException;
1184    
1185            /**
1186            * 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.
1187            *
1188            * @param pk the primary key of the user group
1189            * @param users the users to be associated with the user group
1190            * @throws SystemException if a system exception occurred
1191            */
1192            public void setUsers(long pk,
1193                    java.util.List<com.liferay.portal.model.User> users)
1194                    throws com.liferay.portal.kernel.exception.SystemException;
1195    
1196            public UserGroup remove(UserGroup userGroup) throws SystemException;
1197    }