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