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