001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.UserGroup;
018    
019    /**
020     * The persistence interface for the user group service.
021     *
022     * <p>
023     * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface.
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see UserGroupPersistenceImpl
028     * @see UserGroupUtil
029     * @generated
030     */
031    public interface UserGroupPersistence extends BasePersistence<UserGroup> {
032            /**
033            * Caches the user group in the entity cache if it is enabled.
034            *
035            * @param userGroup the user group to cache
036            */
037            public void cacheResult(com.liferay.portal.model.UserGroup userGroup);
038    
039            /**
040            * Caches the user groups in the entity cache if it is enabled.
041            *
042            * @param userGroups the user groups to cache
043            */
044            public void cacheResult(
045                    java.util.List<com.liferay.portal.model.UserGroup> userGroups);
046    
047            /**
048            * Creates a new user group with the primary key.
049            *
050            * @param userGroupId the primary key for the new user group
051            * @return the new user group
052            */
053            public com.liferay.portal.model.UserGroup create(long userGroupId);
054    
055            /**
056            * Removes the user group with the primary key from the database. Also notifies the appropriate model listeners.
057            *
058            * @param userGroupId the primary key of the user group to remove
059            * @return the user group that was removed
060            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public com.liferay.portal.model.UserGroup remove(long userGroupId)
064                    throws com.liferay.portal.NoSuchUserGroupException,
065                            com.liferay.portal.kernel.exception.SystemException;
066    
067            public com.liferay.portal.model.UserGroup updateImpl(
068                    com.liferay.portal.model.UserGroup userGroup, boolean merge)
069                    throws com.liferay.portal.kernel.exception.SystemException;
070    
071            /**
072            * Finds the user group with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
073            *
074            * @param userGroupId the primary key of the user group to find
075            * @return the user group
076            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
077            * @throws SystemException if a system exception occurred
078            */
079            public com.liferay.portal.model.UserGroup findByPrimaryKey(long userGroupId)
080                    throws com.liferay.portal.NoSuchUserGroupException,
081                            com.liferay.portal.kernel.exception.SystemException;
082    
083            /**
084            * Finds the user group with the primary key or returns <code>null</code> if it could not be found.
085            *
086            * @param userGroupId the primary key of the user group to find
087            * @return the user group, or <code>null</code> if a user group with the primary key could not be found
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portal.model.UserGroup fetchByPrimaryKey(
091                    long userGroupId)
092                    throws com.liferay.portal.kernel.exception.SystemException;
093    
094            /**
095            * Finds all the user groups where companyId = &#63;.
096            *
097            * @param companyId the company id to search with
098            * @return the matching user groups
099            * @throws SystemException if a system exception occurred
100            */
101            public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
102                    long companyId)
103                    throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Finds a range of all the user groups where companyId = &#63;.
107            *
108            * <p>
109            * 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.
110            * </p>
111            *
112            * @param companyId the company id to search with
113            * @param start the lower bound of the range of user groups to return
114            * @param end the upper bound of the range of user groups to return (not inclusive)
115            * @return the range of matching user groups
116            * @throws SystemException if a system exception occurred
117            */
118            public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
119                    long companyId, int start, int end)
120                    throws com.liferay.portal.kernel.exception.SystemException;
121    
122            /**
123            * Finds an ordered range of all the user groups where companyId = &#63;.
124            *
125            * <p>
126            * 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.
127            * </p>
128            *
129            * @param companyId the company id to search with
130            * @param start the lower bound of the range of user groups to return
131            * @param end the upper bound of the range of user groups to return (not inclusive)
132            * @param orderByComparator the comparator to order the results by
133            * @return the ordered range of matching user groups
134            * @throws SystemException if a system exception occurred
135            */
136            public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
137                    long companyId, int start, int end,
138                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139                    throws com.liferay.portal.kernel.exception.SystemException;
140    
141            /**
142            * Finds the first user group in the ordered set where companyId = &#63;.
143            *
144            * <p>
145            * 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.
146            * </p>
147            *
148            * @param companyId the company id to search with
149            * @param orderByComparator the comparator to order the set by
150            * @return the first matching user group
151            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public com.liferay.portal.model.UserGroup findByCompanyId_First(
155                    long companyId,
156                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157                    throws com.liferay.portal.NoSuchUserGroupException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Finds the last user group in the ordered set where companyId = &#63;.
162            *
163            * <p>
164            * 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.
165            * </p>
166            *
167            * @param companyId the company id to search with
168            * @param orderByComparator the comparator to order the set by
169            * @return the last matching user group
170            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public com.liferay.portal.model.UserGroup findByCompanyId_Last(
174                    long companyId,
175                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176                    throws com.liferay.portal.NoSuchUserGroupException,
177                            com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Finds the user groups before and after the current user group in the ordered set where companyId = &#63;.
181            *
182            * <p>
183            * 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.
184            * </p>
185            *
186            * @param userGroupId the primary key of the current user group
187            * @param companyId the company id to search with
188            * @param orderByComparator the comparator to order the set by
189            * @return the previous, current, and next user group
190            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
191            * @throws SystemException if a system exception occurred
192            */
193            public com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
194                    long userGroupId, long companyId,
195                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
196                    throws com.liferay.portal.NoSuchUserGroupException,
197                            com.liferay.portal.kernel.exception.SystemException;
198    
199            /**
200            * Finds all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
201            *
202            * @param companyId the company id to search with
203            * @param parentUserGroupId the parent user group id to search with
204            * @return the matching user groups
205            * @throws SystemException if a system exception occurred
206            */
207            public java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
208                    long companyId, long parentUserGroupId)
209                    throws com.liferay.portal.kernel.exception.SystemException;
210    
211            /**
212            * Finds a range of all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
213            *
214            * <p>
215            * 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.
216            * </p>
217            *
218            * @param companyId the company id to search with
219            * @param parentUserGroupId the parent user group id to search with
220            * @param start the lower bound of the range of user groups to return
221            * @param end the upper bound of the range of user groups to return (not inclusive)
222            * @return the range of matching user groups
223            * @throws SystemException if a system exception occurred
224            */
225            public java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
226                    long companyId, long parentUserGroupId, int start, int end)
227                    throws com.liferay.portal.kernel.exception.SystemException;
228    
229            /**
230            * Finds an ordered range of all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
231            *
232            * <p>
233            * 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.
234            * </p>
235            *
236            * @param companyId the company id to search with
237            * @param parentUserGroupId the parent user group id to search with
238            * @param start the lower bound of the range of user groups to return
239            * @param end the upper bound of the range of user groups to return (not inclusive)
240            * @param orderByComparator the comparator to order the results by
241            * @return the ordered range of matching user groups
242            * @throws SystemException if a system exception occurred
243            */
244            public java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
245                    long companyId, long parentUserGroupId, int start, int end,
246                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Finds the first user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
251            *
252            * <p>
253            * 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.
254            * </p>
255            *
256            * @param companyId the company id to search with
257            * @param parentUserGroupId the parent user group id to search with
258            * @param orderByComparator the comparator to order the set by
259            * @return the first matching user group
260            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
261            * @throws SystemException if a system exception occurred
262            */
263            public com.liferay.portal.model.UserGroup findByC_P_First(long companyId,
264                    long parentUserGroupId,
265                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266                    throws com.liferay.portal.NoSuchUserGroupException,
267                            com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Finds the last user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
271            *
272            * <p>
273            * 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.
274            * </p>
275            *
276            * @param companyId the company id to search with
277            * @param parentUserGroupId the parent user group id to search with
278            * @param orderByComparator the comparator to order the set by
279            * @return the last matching user group
280            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public com.liferay.portal.model.UserGroup findByC_P_Last(long companyId,
284                    long parentUserGroupId,
285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286                    throws com.liferay.portal.NoSuchUserGroupException,
287                            com.liferay.portal.kernel.exception.SystemException;
288    
289            /**
290            * Finds the user groups before and after the current user group in the ordered set where companyId = &#63; and parentUserGroupId = &#63;.
291            *
292            * <p>
293            * 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.
294            * </p>
295            *
296            * @param userGroupId the primary key of the current user group
297            * @param companyId the company id to search with
298            * @param parentUserGroupId the parent user group id to search with
299            * @param orderByComparator the comparator to order the set by
300            * @return the previous, current, and next user group
301            * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
305                    long userGroupId, long companyId, long parentUserGroupId,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.NoSuchUserGroupException,
308                            com.liferay.portal.kernel.exception.SystemException;
309    
310            /**
311            * Finds the user group where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found.
312            *
313            * @param companyId the company id to search with
314            * @param name the name to search with
315            * @return the matching user group
316            * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found
317            * @throws SystemException if a system exception occurred
318            */
319            public com.liferay.portal.model.UserGroup findByC_N(long companyId,
320                    java.lang.String name)
321                    throws com.liferay.portal.NoSuchUserGroupException,
322                            com.liferay.portal.kernel.exception.SystemException;
323    
324            /**
325            * Finds the user group where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
326            *
327            * @param companyId the company id to search with
328            * @param name the name to search with
329            * @return the matching user group, or <code>null</code> if a matching user group could not be found
330            * @throws SystemException if a system exception occurred
331            */
332            public com.liferay.portal.model.UserGroup fetchByC_N(long companyId,
333                    java.lang.String name)
334                    throws com.liferay.portal.kernel.exception.SystemException;
335    
336            /**
337            * Finds 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.
338            *
339            * @param companyId the company id to search with
340            * @param name the name to search with
341            * @return the matching user group, or <code>null</code> if a matching user group could not be found
342            * @throws SystemException if a system exception occurred
343            */
344            public com.liferay.portal.model.UserGroup fetchByC_N(long companyId,
345                    java.lang.String name, boolean retrieveFromCache)
346                    throws com.liferay.portal.kernel.exception.SystemException;
347    
348            /**
349            * Finds all the user groups.
350            *
351            * @return the user groups
352            * @throws SystemException if a system exception occurred
353            */
354            public java.util.List<com.liferay.portal.model.UserGroup> findAll()
355                    throws com.liferay.portal.kernel.exception.SystemException;
356    
357            /**
358            * Finds a range of all the user groups.
359            *
360            * <p>
361            * 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.
362            * </p>
363            *
364            * @param start the lower bound of the range of user groups to return
365            * @param end the upper bound of the range of user groups to return (not inclusive)
366            * @return the range of user groups
367            * @throws SystemException if a system exception occurred
368            */
369            public java.util.List<com.liferay.portal.model.UserGroup> findAll(
370                    int start, int end)
371                    throws com.liferay.portal.kernel.exception.SystemException;
372    
373            /**
374            * Finds an ordered range of all the user groups.
375            *
376            * <p>
377            * 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.
378            * </p>
379            *
380            * @param start the lower bound of the range of user groups to return
381            * @param end the upper bound of the range of user groups to return (not inclusive)
382            * @param orderByComparator the comparator to order the results by
383            * @return the ordered range of user groups
384            * @throws SystemException if a system exception occurred
385            */
386            public java.util.List<com.liferay.portal.model.UserGroup> findAll(
387                    int start, int end,
388                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
389                    throws com.liferay.portal.kernel.exception.SystemException;
390    
391            /**
392            * Removes all the user groups where companyId = &#63; from the database.
393            *
394            * @param companyId the company id to search with
395            * @throws SystemException if a system exception occurred
396            */
397            public void removeByCompanyId(long companyId)
398                    throws com.liferay.portal.kernel.exception.SystemException;
399    
400            /**
401            * Removes all the user groups where companyId = &#63; and parentUserGroupId = &#63; from the database.
402            *
403            * @param companyId the company id to search with
404            * @param parentUserGroupId the parent user group id to search with
405            * @throws SystemException if a system exception occurred
406            */
407            public void removeByC_P(long companyId, long parentUserGroupId)
408                    throws com.liferay.portal.kernel.exception.SystemException;
409    
410            /**
411            * Removes the user group where companyId = &#63; and name = &#63; from the database.
412            *
413            * @param companyId the company id to search with
414            * @param name the name to search with
415            * @throws SystemException if a system exception occurred
416            */
417            public void removeByC_N(long companyId, java.lang.String name)
418                    throws com.liferay.portal.NoSuchUserGroupException,
419                            com.liferay.portal.kernel.exception.SystemException;
420    
421            /**
422            * Removes all the user groups from the database.
423            *
424            * @throws SystemException if a system exception occurred
425            */
426            public void removeAll()
427                    throws com.liferay.portal.kernel.exception.SystemException;
428    
429            /**
430            * Counts all the user groups where companyId = &#63;.
431            *
432            * @param companyId the company id to search with
433            * @return the number of matching user groups
434            * @throws SystemException if a system exception occurred
435            */
436            public int countByCompanyId(long companyId)
437                    throws com.liferay.portal.kernel.exception.SystemException;
438    
439            /**
440            * Counts all the user groups where companyId = &#63; and parentUserGroupId = &#63;.
441            *
442            * @param companyId the company id to search with
443            * @param parentUserGroupId the parent user group id to search with
444            * @return the number of matching user groups
445            * @throws SystemException if a system exception occurred
446            */
447            public int countByC_P(long companyId, long parentUserGroupId)
448                    throws com.liferay.portal.kernel.exception.SystemException;
449    
450            /**
451            * Counts all the user groups where companyId = &#63; and name = &#63;.
452            *
453            * @param companyId the company id to search with
454            * @param name the name to search with
455            * @return the number of matching user groups
456            * @throws SystemException if a system exception occurred
457            */
458            public int countByC_N(long companyId, java.lang.String name)
459                    throws com.liferay.portal.kernel.exception.SystemException;
460    
461            /**
462            * Counts all the user groups.
463            *
464            * @return the number of user groups
465            * @throws SystemException if a system exception occurred
466            */
467            public int countAll()
468                    throws com.liferay.portal.kernel.exception.SystemException;
469    
470            /**
471            * Gets all the groups associated with the user group.
472            *
473            * @param pk the primary key of the user group to get the associated groups for
474            * @return the groups associated with the user group
475            * @throws SystemException if a system exception occurred
476            */
477            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk)
478                    throws com.liferay.portal.kernel.exception.SystemException;
479    
480            /**
481            * Gets a range of all the groups associated with the user group.
482            *
483            * <p>
484            * 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.
485            * </p>
486            *
487            * @param pk the primary key of the user group to get the associated groups for
488            * @param start the lower bound of the range of user groups to return
489            * @param end the upper bound of the range of user groups to return (not inclusive)
490            * @return the range of groups associated with the user group
491            * @throws SystemException if a system exception occurred
492            */
493            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
494                    int start, int end)
495                    throws com.liferay.portal.kernel.exception.SystemException;
496    
497            /**
498            * Gets an ordered range of all the groups associated with the user group.
499            *
500            * <p>
501            * 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.
502            * </p>
503            *
504            * @param pk the primary key of the user group to get the associated groups for
505            * @param start the lower bound of the range of user groups to return
506            * @param end the upper bound of the range of user groups to return (not inclusive)
507            * @param orderByComparator the comparator to order the results by
508            * @return the ordered range of groups associated with the user group
509            * @throws SystemException if a system exception occurred
510            */
511            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
512                    int start, int end,
513                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
514                    throws com.liferay.portal.kernel.exception.SystemException;
515    
516            /**
517            * Gets the number of groups associated with the user group.
518            *
519            * @param pk the primary key of the user group to get the number of associated groups for
520            * @return the number of groups associated with the user group
521            * @throws SystemException if a system exception occurred
522            */
523            public int getGroupsSize(long pk)
524                    throws com.liferay.portal.kernel.exception.SystemException;
525    
526            /**
527            * Determines whether the group is associated with the user group.
528            *
529            * @param pk the primary key of the user group
530            * @param groupPK the primary key of the group
531            * @return whether the group is associated with the user group
532            * @throws SystemException if a system exception occurred
533            */
534            public boolean containsGroup(long pk, long groupPK)
535                    throws com.liferay.portal.kernel.exception.SystemException;
536    
537            /**
538            * Determines whether the user group has any groups associated with it.
539            *
540            * @param pk the primary key of the user group to check for associations with groups
541            * @return whether the user group has any groups associated with it
542            * @throws SystemException if a system exception occurred
543            */
544            public boolean containsGroups(long pk)
545                    throws com.liferay.portal.kernel.exception.SystemException;
546    
547            /**
548            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
549            *
550            * @param pk the primary key of the user group
551            * @param groupPK the primary key of the group
552            * @throws SystemException if a system exception occurred
553            */
554            public void addGroup(long pk, long groupPK)
555                    throws com.liferay.portal.kernel.exception.SystemException;
556    
557            /**
558            * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
559            *
560            * @param pk the primary key of the user group
561            * @param group the group
562            * @throws SystemException if a system exception occurred
563            */
564            public void addGroup(long pk, com.liferay.portal.model.Group group)
565                    throws com.liferay.portal.kernel.exception.SystemException;
566    
567            /**
568            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
569            *
570            * @param pk the primary key of the user group
571            * @param groupPKs the primary keys of the groups
572            * @throws SystemException if a system exception occurred
573            */
574            public void addGroups(long pk, long[] groupPKs)
575                    throws com.liferay.portal.kernel.exception.SystemException;
576    
577            /**
578            * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
579            *
580            * @param pk the primary key of the user group
581            * @param groups the groups
582            * @throws SystemException if a system exception occurred
583            */
584            public void addGroups(long pk,
585                    java.util.List<com.liferay.portal.model.Group> groups)
586                    throws com.liferay.portal.kernel.exception.SystemException;
587    
588            /**
589            * Clears all associations between the user group and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
590            *
591            * @param pk the primary key of the user group to clear the associated groups from
592            * @throws SystemException if a system exception occurred
593            */
594            public void clearGroups(long pk)
595                    throws com.liferay.portal.kernel.exception.SystemException;
596    
597            /**
598            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
599            *
600            * @param pk the primary key of the user group
601            * @param groupPK the primary key of the group
602            * @throws SystemException if a system exception occurred
603            */
604            public void removeGroup(long pk, long groupPK)
605                    throws com.liferay.portal.kernel.exception.SystemException;
606    
607            /**
608            * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
609            *
610            * @param pk the primary key of the user group
611            * @param group the group
612            * @throws SystemException if a system exception occurred
613            */
614            public void removeGroup(long pk, com.liferay.portal.model.Group group)
615                    throws com.liferay.portal.kernel.exception.SystemException;
616    
617            /**
618            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
619            *
620            * @param pk the primary key of the user group
621            * @param groupPKs the primary keys of the groups
622            * @throws SystemException if a system exception occurred
623            */
624            public void removeGroups(long pk, long[] groupPKs)
625                    throws com.liferay.portal.kernel.exception.SystemException;
626    
627            /**
628            * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
629            *
630            * @param pk the primary key of the user group
631            * @param groups the groups
632            * @throws SystemException if a system exception occurred
633            */
634            public void removeGroups(long pk,
635                    java.util.List<com.liferay.portal.model.Group> groups)
636                    throws com.liferay.portal.kernel.exception.SystemException;
637    
638            /**
639            * 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.
640            *
641            * @param pk the primary key of the user group to set the associations for
642            * @param groupPKs the primary keys of the groups to be associated with the user group
643            * @throws SystemException if a system exception occurred
644            */
645            public void setGroups(long pk, long[] groupPKs)
646                    throws com.liferay.portal.kernel.exception.SystemException;
647    
648            /**
649            * 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.
650            *
651            * @param pk the primary key of the user group to set the associations for
652            * @param groups the groups to be associated with the user group
653            * @throws SystemException if a system exception occurred
654            */
655            public void setGroups(long pk,
656                    java.util.List<com.liferay.portal.model.Group> groups)
657                    throws com.liferay.portal.kernel.exception.SystemException;
658    
659            /**
660            * Gets all the users associated with the user group.
661            *
662            * @param pk the primary key of the user group to get the associated users for
663            * @return the users associated with the user group
664            * @throws SystemException if a system exception occurred
665            */
666            public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
667                    throws com.liferay.portal.kernel.exception.SystemException;
668    
669            /**
670            * Gets a range of all the users associated with the user group.
671            *
672            * <p>
673            * 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.
674            * </p>
675            *
676            * @param pk the primary key of the user group to get the associated users for
677            * @param start the lower bound of the range of user groups to return
678            * @param end the upper bound of the range of user groups to return (not inclusive)
679            * @return the range of users associated with the user group
680            * @throws SystemException if a system exception occurred
681            */
682            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
683                    int start, int end)
684                    throws com.liferay.portal.kernel.exception.SystemException;
685    
686            /**
687            * Gets an ordered range of all the users associated with the user group.
688            *
689            * <p>
690            * 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.
691            * </p>
692            *
693            * @param pk the primary key of the user group to get the associated users for
694            * @param start the lower bound of the range of user groups to return
695            * @param end the upper bound of the range of user groups to return (not inclusive)
696            * @param orderByComparator the comparator to order the results by
697            * @return the ordered range of users associated with the user group
698            * @throws SystemException if a system exception occurred
699            */
700            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
701                    int start, int end,
702                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
703                    throws com.liferay.portal.kernel.exception.SystemException;
704    
705            /**
706            * Gets the number of users associated with the user group.
707            *
708            * @param pk the primary key of the user group to get the number of associated users for
709            * @return the number of users associated with the user group
710            * @throws SystemException if a system exception occurred
711            */
712            public int getUsersSize(long pk)
713                    throws com.liferay.portal.kernel.exception.SystemException;
714    
715            /**
716            * Determines whether the user is associated with the user group.
717            *
718            * @param pk the primary key of the user group
719            * @param userPK the primary key of the user
720            * @return whether the user is associated with the user group
721            * @throws SystemException if a system exception occurred
722            */
723            public boolean containsUser(long pk, long userPK)
724                    throws com.liferay.portal.kernel.exception.SystemException;
725    
726            /**
727            * Determines whether the user group has any users associated with it.
728            *
729            * @param pk the primary key of the user group to check for associations with users
730            * @return whether the user group has any users associated with it
731            * @throws SystemException if a system exception occurred
732            */
733            public boolean containsUsers(long pk)
734                    throws com.liferay.portal.kernel.exception.SystemException;
735    
736            /**
737            * Adds an association between the user group and the user. 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 userPK the primary key of the user
741            * @throws SystemException if a system exception occurred
742            */
743            public void addUser(long pk, long userPK)
744                    throws com.liferay.portal.kernel.exception.SystemException;
745    
746            /**
747            * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
748            *
749            * @param pk the primary key of the user group
750            * @param user the user
751            * @throws SystemException if a system exception occurred
752            */
753            public void addUser(long pk, com.liferay.portal.model.User user)
754                    throws com.liferay.portal.kernel.exception.SystemException;
755    
756            /**
757            * Adds an association between the user group and the users. 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 userPKs the primary keys of the users
761            * @throws SystemException if a system exception occurred
762            */
763            public void addUsers(long pk, long[] userPKs)
764                    throws com.liferay.portal.kernel.exception.SystemException;
765    
766            /**
767            * Adds an association between the user group and the users. 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 users the users
771            * @throws SystemException if a system exception occurred
772            */
773            public void addUsers(long pk,
774                    java.util.List<com.liferay.portal.model.User> users)
775                    throws com.liferay.portal.kernel.exception.SystemException;
776    
777            /**
778            * Clears all associations between the user group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
779            *
780            * @param pk the primary key of the user group to clear the associated users from
781            * @throws SystemException if a system exception occurred
782            */
783            public void clearUsers(long pk)
784                    throws com.liferay.portal.kernel.exception.SystemException;
785    
786            /**
787            * Removes the association between the user group and the user. 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 userPK the primary key of the user
791            * @throws SystemException if a system exception occurred
792            */
793            public void removeUser(long pk, long userPK)
794                    throws com.liferay.portal.kernel.exception.SystemException;
795    
796            /**
797            * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
798            *
799            * @param pk the primary key of the user group
800            * @param user the user
801            * @throws SystemException if a system exception occurred
802            */
803            public void removeUser(long pk, com.liferay.portal.model.User user)
804                    throws com.liferay.portal.kernel.exception.SystemException;
805    
806            /**
807            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
808            *
809            * @param pk the primary key of the user group
810            * @param userPKs the primary keys of the users
811            * @throws SystemException if a system exception occurred
812            */
813            public void removeUsers(long pk, long[] userPKs)
814                    throws com.liferay.portal.kernel.exception.SystemException;
815    
816            /**
817            * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
818            *
819            * @param pk the primary key of the user group
820            * @param users the users
821            * @throws SystemException if a system exception occurred
822            */
823            public void removeUsers(long pk,
824                    java.util.List<com.liferay.portal.model.User> users)
825                    throws com.liferay.portal.kernel.exception.SystemException;
826    
827            /**
828            * 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.
829            *
830            * @param pk the primary key of the user group to set the associations for
831            * @param userPKs the primary keys of the users to be associated with the user group
832            * @throws SystemException if a system exception occurred
833            */
834            public void setUsers(long pk, long[] userPKs)
835                    throws com.liferay.portal.kernel.exception.SystemException;
836    
837            /**
838            * 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.
839            *
840            * @param pk the primary key of the user group to set the associations for
841            * @param users the users to be associated with the user group
842            * @throws SystemException if a system exception occurred
843            */
844            public void setUsers(long pk,
845                    java.util.List<com.liferay.portal.model.User> users)
846                    throws com.liferay.portal.kernel.exception.SystemException;
847    }