001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.model.User;
019    
020    /**
021     * The persistence interface for the user service.
022     *
023     * <p>
024     * Caching information and settings can be found in <code>portal.properties</code>
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see UserPersistenceImpl
029     * @see UserUtil
030     * @generated
031     */
032    public interface UserPersistence extends BasePersistence<User> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * Never modify or reference this interface directly. Always use {@link UserUtil} to access the user persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
037             */
038    
039            /**
040            * Caches the user in the entity cache if it is enabled.
041            *
042            * @param user the user to cache
043            */
044            public void cacheResult(com.liferay.portal.model.User user);
045    
046            /**
047            * Caches the users in the entity cache if it is enabled.
048            *
049            * @param users the users to cache
050            */
051            public void cacheResult(java.util.List<com.liferay.portal.model.User> users);
052    
053            /**
054            * Creates a new user with the primary key. Does not add the user to the database.
055            *
056            * @param userId the primary key for the new user
057            * @return the new user
058            */
059            public com.liferay.portal.model.User create(long userId);
060    
061            /**
062            * Removes the user with the primary key from the database. Also notifies the appropriate model listeners.
063            *
064            * @param userId the primary key of the user to remove
065            * @return the user that was removed
066            * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found
067            * @throws SystemException if a system exception occurred
068            */
069            public com.liferay.portal.model.User remove(long userId)
070                    throws com.liferay.portal.NoSuchUserException,
071                            com.liferay.portal.kernel.exception.SystemException;
072    
073            public com.liferay.portal.model.User updateImpl(
074                    com.liferay.portal.model.User user, boolean merge)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Finds the user with the primary key or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found.
079            *
080            * @param userId the primary key of the user to find
081            * @return the user
082            * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found
083            * @throws SystemException if a system exception occurred
084            */
085            public com.liferay.portal.model.User findByPrimaryKey(long userId)
086                    throws com.liferay.portal.NoSuchUserException,
087                            com.liferay.portal.kernel.exception.SystemException;
088    
089            /**
090            * Finds the user with the primary key or returns <code>null</code> if it could not be found.
091            *
092            * @param userId the primary key of the user to find
093            * @return the user, or <code>null</code> if a user with the primary key could not be found
094            * @throws SystemException if a system exception occurred
095            */
096            public com.liferay.portal.model.User fetchByPrimaryKey(long userId)
097                    throws com.liferay.portal.kernel.exception.SystemException;
098    
099            /**
100            * Finds all the users where uuid = &#63;.
101            *
102            * @param uuid the uuid to search with
103            * @return the matching users
104            * @throws SystemException if a system exception occurred
105            */
106            public java.util.List<com.liferay.portal.model.User> findByUuid(
107                    java.lang.String uuid)
108                    throws com.liferay.portal.kernel.exception.SystemException;
109    
110            /**
111            * Finds a range of all the users where uuid = &#63;.
112            *
113            * <p>
114            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
115            * </p>
116            *
117            * @param uuid the uuid to search with
118            * @param start the lower bound of the range of users to return
119            * @param end the upper bound of the range of users to return (not inclusive)
120            * @return the range of matching users
121            * @throws SystemException if a system exception occurred
122            */
123            public java.util.List<com.liferay.portal.model.User> findByUuid(
124                    java.lang.String uuid, int start, int end)
125                    throws com.liferay.portal.kernel.exception.SystemException;
126    
127            /**
128            * Finds an ordered range of all the users where uuid = &#63;.
129            *
130            * <p>
131            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
132            * </p>
133            *
134            * @param uuid the uuid to search with
135            * @param start the lower bound of the range of users to return
136            * @param end the upper bound of the range of users to return (not inclusive)
137            * @param orderByComparator the comparator to order the results by
138            * @return the ordered range of matching users
139            * @throws SystemException if a system exception occurred
140            */
141            public java.util.List<com.liferay.portal.model.User> findByUuid(
142                    java.lang.String uuid, int start, int end,
143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Finds the first user in the ordered set where uuid = &#63;.
148            *
149            * <p>
150            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
151            * </p>
152            *
153            * @param uuid the uuid to search with
154            * @param orderByComparator the comparator to order the set by
155            * @return the first matching user
156            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            public com.liferay.portal.model.User findByUuid_First(
160                    java.lang.String uuid,
161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162                    throws com.liferay.portal.NoSuchUserException,
163                            com.liferay.portal.kernel.exception.SystemException;
164    
165            /**
166            * Finds the last user in the ordered set where uuid = &#63;.
167            *
168            * <p>
169            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
170            * </p>
171            *
172            * @param uuid the uuid to search with
173            * @param orderByComparator the comparator to order the set by
174            * @return the last matching user
175            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public com.liferay.portal.model.User findByUuid_Last(
179                    java.lang.String uuid,
180                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181                    throws com.liferay.portal.NoSuchUserException,
182                            com.liferay.portal.kernel.exception.SystemException;
183    
184            /**
185            * Finds the users before and after the current user in the ordered set where uuid = &#63;.
186            *
187            * <p>
188            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
189            * </p>
190            *
191            * @param userId the primary key of the current user
192            * @param uuid the uuid to search with
193            * @param orderByComparator the comparator to order the set by
194            * @return the previous, current, and next user
195            * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found
196            * @throws SystemException if a system exception occurred
197            */
198            public com.liferay.portal.model.User[] findByUuid_PrevAndNext(long userId,
199                    java.lang.String uuid,
200                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201                    throws com.liferay.portal.NoSuchUserException,
202                            com.liferay.portal.kernel.exception.SystemException;
203    
204            /**
205            * Finds all the users where companyId = &#63;.
206            *
207            * @param companyId the company ID to search with
208            * @return the matching users
209            * @throws SystemException if a system exception occurred
210            */
211            public java.util.List<com.liferay.portal.model.User> findByCompanyId(
212                    long companyId)
213                    throws com.liferay.portal.kernel.exception.SystemException;
214    
215            /**
216            * Finds a range of all the users where companyId = &#63;.
217            *
218            * <p>
219            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
220            * </p>
221            *
222            * @param companyId the company ID to search with
223            * @param start the lower bound of the range of users to return
224            * @param end the upper bound of the range of users to return (not inclusive)
225            * @return the range of matching users
226            * @throws SystemException if a system exception occurred
227            */
228            public java.util.List<com.liferay.portal.model.User> findByCompanyId(
229                    long companyId, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException;
231    
232            /**
233            * Finds an ordered range of all the users where companyId = &#63;.
234            *
235            * <p>
236            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
237            * </p>
238            *
239            * @param companyId the company ID to search with
240            * @param start the lower bound of the range of users to return
241            * @param end the upper bound of the range of users to return (not inclusive)
242            * @param orderByComparator the comparator to order the results by
243            * @return the ordered range of matching users
244            * @throws SystemException if a system exception occurred
245            */
246            public java.util.List<com.liferay.portal.model.User> findByCompanyId(
247                    long companyId, int start, int end,
248                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            /**
252            * Finds the first user in the ordered set where companyId = &#63;.
253            *
254            * <p>
255            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
256            * </p>
257            *
258            * @param companyId the company ID to search with
259            * @param orderByComparator the comparator to order the set by
260            * @return the first matching user
261            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
262            * @throws SystemException if a system exception occurred
263            */
264            public com.liferay.portal.model.User findByCompanyId_First(long companyId,
265                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266                    throws com.liferay.portal.NoSuchUserException,
267                            com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Finds the last user in the ordered set where companyId = &#63;.
271            *
272            * <p>
273            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
274            * </p>
275            *
276            * @param companyId the company ID to search with
277            * @param orderByComparator the comparator to order the set by
278            * @return the last matching user
279            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public com.liferay.portal.model.User findByCompanyId_Last(long companyId,
283                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
284                    throws com.liferay.portal.NoSuchUserException,
285                            com.liferay.portal.kernel.exception.SystemException;
286    
287            /**
288            * Finds the users before and after the current user in the ordered set where companyId = &#63;.
289            *
290            * <p>
291            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
292            * </p>
293            *
294            * @param userId the primary key of the current user
295            * @param companyId the company ID to search with
296            * @param orderByComparator the comparator to order the set by
297            * @return the previous, current, and next user
298            * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found
299            * @throws SystemException if a system exception occurred
300            */
301            public com.liferay.portal.model.User[] findByCompanyId_PrevAndNext(
302                    long userId, long companyId,
303                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
304                    throws com.liferay.portal.NoSuchUserException,
305                            com.liferay.portal.kernel.exception.SystemException;
306    
307            /**
308            * Finds the user where contactId = &#63; or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found.
309            *
310            * @param contactId the contact ID to search with
311            * @return the matching user
312            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
313            * @throws SystemException if a system exception occurred
314            */
315            public com.liferay.portal.model.User findByContactId(long contactId)
316                    throws com.liferay.portal.NoSuchUserException,
317                            com.liferay.portal.kernel.exception.SystemException;
318    
319            /**
320            * Finds the user where contactId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
321            *
322            * @param contactId the contact ID to search with
323            * @return the matching user, or <code>null</code> if a matching user could not be found
324            * @throws SystemException if a system exception occurred
325            */
326            public com.liferay.portal.model.User fetchByContactId(long contactId)
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * Finds the user where contactId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
331            *
332            * @param contactId the contact ID to search with
333            * @return the matching user, or <code>null</code> if a matching user could not be found
334            * @throws SystemException if a system exception occurred
335            */
336            public com.liferay.portal.model.User fetchByContactId(long contactId,
337                    boolean retrieveFromCache)
338                    throws com.liferay.portal.kernel.exception.SystemException;
339    
340            /**
341            * Finds all the users where emailAddress = &#63;.
342            *
343            * @param emailAddress the email address to search with
344            * @return the matching users
345            * @throws SystemException if a system exception occurred
346            */
347            public java.util.List<com.liferay.portal.model.User> findByEmailAddress(
348                    java.lang.String emailAddress)
349                    throws com.liferay.portal.kernel.exception.SystemException;
350    
351            /**
352            * Finds a range of all the users where emailAddress = &#63;.
353            *
354            * <p>
355            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
356            * </p>
357            *
358            * @param emailAddress the email address to search with
359            * @param start the lower bound of the range of users to return
360            * @param end the upper bound of the range of users to return (not inclusive)
361            * @return the range of matching users
362            * @throws SystemException if a system exception occurred
363            */
364            public java.util.List<com.liferay.portal.model.User> findByEmailAddress(
365                    java.lang.String emailAddress, int start, int end)
366                    throws com.liferay.portal.kernel.exception.SystemException;
367    
368            /**
369            * Finds an ordered range of all the users where emailAddress = &#63;.
370            *
371            * <p>
372            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
373            * </p>
374            *
375            * @param emailAddress the email address to search with
376            * @param start the lower bound of the range of users to return
377            * @param end the upper bound of the range of users to return (not inclusive)
378            * @param orderByComparator the comparator to order the results by
379            * @return the ordered range of matching users
380            * @throws SystemException if a system exception occurred
381            */
382            public java.util.List<com.liferay.portal.model.User> findByEmailAddress(
383                    java.lang.String emailAddress, int start, int end,
384                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
385                    throws com.liferay.portal.kernel.exception.SystemException;
386    
387            /**
388            * Finds the first user in the ordered set where emailAddress = &#63;.
389            *
390            * <p>
391            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
392            * </p>
393            *
394            * @param emailAddress the email address to search with
395            * @param orderByComparator the comparator to order the set by
396            * @return the first matching user
397            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
398            * @throws SystemException if a system exception occurred
399            */
400            public com.liferay.portal.model.User findByEmailAddress_First(
401                    java.lang.String emailAddress,
402                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
403                    throws com.liferay.portal.NoSuchUserException,
404                            com.liferay.portal.kernel.exception.SystemException;
405    
406            /**
407            * Finds the last user in the ordered set where emailAddress = &#63;.
408            *
409            * <p>
410            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
411            * </p>
412            *
413            * @param emailAddress the email address to search with
414            * @param orderByComparator the comparator to order the set by
415            * @return the last matching user
416            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
417            * @throws SystemException if a system exception occurred
418            */
419            public com.liferay.portal.model.User findByEmailAddress_Last(
420                    java.lang.String emailAddress,
421                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
422                    throws com.liferay.portal.NoSuchUserException,
423                            com.liferay.portal.kernel.exception.SystemException;
424    
425            /**
426            * Finds the users before and after the current user in the ordered set where emailAddress = &#63;.
427            *
428            * <p>
429            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
430            * </p>
431            *
432            * @param userId the primary key of the current user
433            * @param emailAddress the email address to search with
434            * @param orderByComparator the comparator to order the set by
435            * @return the previous, current, and next user
436            * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found
437            * @throws SystemException if a system exception occurred
438            */
439            public com.liferay.portal.model.User[] findByEmailAddress_PrevAndNext(
440                    long userId, java.lang.String emailAddress,
441                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
442                    throws com.liferay.portal.NoSuchUserException,
443                            com.liferay.portal.kernel.exception.SystemException;
444    
445            /**
446            * Finds the user where portraitId = &#63; or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found.
447            *
448            * @param portraitId the portrait ID to search with
449            * @return the matching user
450            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
451            * @throws SystemException if a system exception occurred
452            */
453            public com.liferay.portal.model.User findByPortraitId(long portraitId)
454                    throws com.liferay.portal.NoSuchUserException,
455                            com.liferay.portal.kernel.exception.SystemException;
456    
457            /**
458            * Finds the user where portraitId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
459            *
460            * @param portraitId the portrait ID to search with
461            * @return the matching user, or <code>null</code> if a matching user could not be found
462            * @throws SystemException if a system exception occurred
463            */
464            public com.liferay.portal.model.User fetchByPortraitId(long portraitId)
465                    throws com.liferay.portal.kernel.exception.SystemException;
466    
467            /**
468            * Finds the user where portraitId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
469            *
470            * @param portraitId the portrait ID to search with
471            * @return the matching user, or <code>null</code> if a matching user could not be found
472            * @throws SystemException if a system exception occurred
473            */
474            public com.liferay.portal.model.User fetchByPortraitId(long portraitId,
475                    boolean retrieveFromCache)
476                    throws com.liferay.portal.kernel.exception.SystemException;
477    
478            /**
479            * Finds the user where companyId = &#63; and userId = &#63; or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found.
480            *
481            * @param companyId the company ID to search with
482            * @param userId the user ID to search with
483            * @return the matching user
484            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
485            * @throws SystemException if a system exception occurred
486            */
487            public com.liferay.portal.model.User findByC_U(long companyId, long userId)
488                    throws com.liferay.portal.NoSuchUserException,
489                            com.liferay.portal.kernel.exception.SystemException;
490    
491            /**
492            * Finds the user where companyId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
493            *
494            * @param companyId the company ID to search with
495            * @param userId the user ID to search with
496            * @return the matching user, or <code>null</code> if a matching user could not be found
497            * @throws SystemException if a system exception occurred
498            */
499            public com.liferay.portal.model.User fetchByC_U(long companyId, long userId)
500                    throws com.liferay.portal.kernel.exception.SystemException;
501    
502            /**
503            * Finds the user where companyId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
504            *
505            * @param companyId the company ID to search with
506            * @param userId the user ID to search with
507            * @return the matching user, or <code>null</code> if a matching user could not be found
508            * @throws SystemException if a system exception occurred
509            */
510            public com.liferay.portal.model.User fetchByC_U(long companyId,
511                    long userId, boolean retrieveFromCache)
512                    throws com.liferay.portal.kernel.exception.SystemException;
513    
514            /**
515            * Finds the user where companyId = &#63; and defaultUser = &#63; or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found.
516            *
517            * @param companyId the company ID to search with
518            * @param defaultUser the default user to search with
519            * @return the matching user
520            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
521            * @throws SystemException if a system exception occurred
522            */
523            public com.liferay.portal.model.User findByC_DU(long companyId,
524                    boolean defaultUser)
525                    throws com.liferay.portal.NoSuchUserException,
526                            com.liferay.portal.kernel.exception.SystemException;
527    
528            /**
529            * Finds the user where companyId = &#63; and defaultUser = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
530            *
531            * @param companyId the company ID to search with
532            * @param defaultUser the default user to search with
533            * @return the matching user, or <code>null</code> if a matching user could not be found
534            * @throws SystemException if a system exception occurred
535            */
536            public com.liferay.portal.model.User fetchByC_DU(long companyId,
537                    boolean defaultUser)
538                    throws com.liferay.portal.kernel.exception.SystemException;
539    
540            /**
541            * Finds the user where companyId = &#63; and defaultUser = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
542            *
543            * @param companyId the company ID to search with
544            * @param defaultUser the default user to search with
545            * @return the matching user, or <code>null</code> if a matching user could not be found
546            * @throws SystemException if a system exception occurred
547            */
548            public com.liferay.portal.model.User fetchByC_DU(long companyId,
549                    boolean defaultUser, boolean retrieveFromCache)
550                    throws com.liferay.portal.kernel.exception.SystemException;
551    
552            /**
553            * Finds the user where companyId = &#63; and screenName = &#63; or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found.
554            *
555            * @param companyId the company ID to search with
556            * @param screenName the screen name to search with
557            * @return the matching user
558            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
559            * @throws SystemException if a system exception occurred
560            */
561            public com.liferay.portal.model.User findByC_SN(long companyId,
562                    java.lang.String screenName)
563                    throws com.liferay.portal.NoSuchUserException,
564                            com.liferay.portal.kernel.exception.SystemException;
565    
566            /**
567            * Finds the user where companyId = &#63; and screenName = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
568            *
569            * @param companyId the company ID to search with
570            * @param screenName the screen name to search with
571            * @return the matching user, or <code>null</code> if a matching user could not be found
572            * @throws SystemException if a system exception occurred
573            */
574            public com.liferay.portal.model.User fetchByC_SN(long companyId,
575                    java.lang.String screenName)
576                    throws com.liferay.portal.kernel.exception.SystemException;
577    
578            /**
579            * Finds the user where companyId = &#63; and screenName = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
580            *
581            * @param companyId the company ID to search with
582            * @param screenName the screen name to search with
583            * @return the matching user, or <code>null</code> if a matching user could not be found
584            * @throws SystemException if a system exception occurred
585            */
586            public com.liferay.portal.model.User fetchByC_SN(long companyId,
587                    java.lang.String screenName, boolean retrieveFromCache)
588                    throws com.liferay.portal.kernel.exception.SystemException;
589    
590            /**
591            * Finds the user where companyId = &#63; and emailAddress = &#63; or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found.
592            *
593            * @param companyId the company ID to search with
594            * @param emailAddress the email address to search with
595            * @return the matching user
596            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
597            * @throws SystemException if a system exception occurred
598            */
599            public com.liferay.portal.model.User findByC_EA(long companyId,
600                    java.lang.String emailAddress)
601                    throws com.liferay.portal.NoSuchUserException,
602                            com.liferay.portal.kernel.exception.SystemException;
603    
604            /**
605            * Finds the user where companyId = &#63; and emailAddress = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
606            *
607            * @param companyId the company ID to search with
608            * @param emailAddress the email address to search with
609            * @return the matching user, or <code>null</code> if a matching user could not be found
610            * @throws SystemException if a system exception occurred
611            */
612            public com.liferay.portal.model.User fetchByC_EA(long companyId,
613                    java.lang.String emailAddress)
614                    throws com.liferay.portal.kernel.exception.SystemException;
615    
616            /**
617            * Finds the user where companyId = &#63; and emailAddress = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
618            *
619            * @param companyId the company ID to search with
620            * @param emailAddress the email address to search with
621            * @return the matching user, or <code>null</code> if a matching user could not be found
622            * @throws SystemException if a system exception occurred
623            */
624            public com.liferay.portal.model.User fetchByC_EA(long companyId,
625                    java.lang.String emailAddress, boolean retrieveFromCache)
626                    throws com.liferay.portal.kernel.exception.SystemException;
627    
628            /**
629            * Finds the user where companyId = &#63; and facebookId = &#63; or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found.
630            *
631            * @param companyId the company ID to search with
632            * @param facebookId the facebook ID to search with
633            * @return the matching user
634            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
635            * @throws SystemException if a system exception occurred
636            */
637            public com.liferay.portal.model.User findByC_FID(long companyId,
638                    long facebookId)
639                    throws com.liferay.portal.NoSuchUserException,
640                            com.liferay.portal.kernel.exception.SystemException;
641    
642            /**
643            * Finds the user where companyId = &#63; and facebookId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
644            *
645            * @param companyId the company ID to search with
646            * @param facebookId the facebook ID to search with
647            * @return the matching user, or <code>null</code> if a matching user could not be found
648            * @throws SystemException if a system exception occurred
649            */
650            public com.liferay.portal.model.User fetchByC_FID(long companyId,
651                    long facebookId)
652                    throws com.liferay.portal.kernel.exception.SystemException;
653    
654            /**
655            * Finds the user where companyId = &#63; and facebookId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
656            *
657            * @param companyId the company ID to search with
658            * @param facebookId the facebook ID to search with
659            * @return the matching user, or <code>null</code> if a matching user could not be found
660            * @throws SystemException if a system exception occurred
661            */
662            public com.liferay.portal.model.User fetchByC_FID(long companyId,
663                    long facebookId, boolean retrieveFromCache)
664                    throws com.liferay.portal.kernel.exception.SystemException;
665    
666            /**
667            * Finds the user where companyId = &#63; and openId = &#63; or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found.
668            *
669            * @param companyId the company ID to search with
670            * @param openId the open ID to search with
671            * @return the matching user
672            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
673            * @throws SystemException if a system exception occurred
674            */
675            public com.liferay.portal.model.User findByC_O(long companyId,
676                    java.lang.String openId)
677                    throws com.liferay.portal.NoSuchUserException,
678                            com.liferay.portal.kernel.exception.SystemException;
679    
680            /**
681            * Finds the user where companyId = &#63; and openId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
682            *
683            * @param companyId the company ID to search with
684            * @param openId the open ID to search with
685            * @return the matching user, or <code>null</code> if a matching user could not be found
686            * @throws SystemException if a system exception occurred
687            */
688            public com.liferay.portal.model.User fetchByC_O(long companyId,
689                    java.lang.String openId)
690                    throws com.liferay.portal.kernel.exception.SystemException;
691    
692            /**
693            * Finds the user where companyId = &#63; and openId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
694            *
695            * @param companyId the company ID to search with
696            * @param openId the open ID to search with
697            * @return the matching user, or <code>null</code> if a matching user could not be found
698            * @throws SystemException if a system exception occurred
699            */
700            public com.liferay.portal.model.User fetchByC_O(long companyId,
701                    java.lang.String openId, boolean retrieveFromCache)
702                    throws com.liferay.portal.kernel.exception.SystemException;
703    
704            /**
705            * Finds all the users where companyId = &#63; and active = &#63;.
706            *
707            * @param companyId the company ID to search with
708            * @param active the active to search with
709            * @return the matching users
710            * @throws SystemException if a system exception occurred
711            */
712            public java.util.List<com.liferay.portal.model.User> findByC_A(
713                    long companyId, boolean active)
714                    throws com.liferay.portal.kernel.exception.SystemException;
715    
716            /**
717            * Finds a range of all the users where companyId = &#63; and active = &#63;.
718            *
719            * <p>
720            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
721            * </p>
722            *
723            * @param companyId the company ID to search with
724            * @param active the active to search with
725            * @param start the lower bound of the range of users to return
726            * @param end the upper bound of the range of users to return (not inclusive)
727            * @return the range of matching users
728            * @throws SystemException if a system exception occurred
729            */
730            public java.util.List<com.liferay.portal.model.User> findByC_A(
731                    long companyId, boolean active, int start, int end)
732                    throws com.liferay.portal.kernel.exception.SystemException;
733    
734            /**
735            * Finds an ordered range of all the users where companyId = &#63; and active = &#63;.
736            *
737            * <p>
738            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
739            * </p>
740            *
741            * @param companyId the company ID to search with
742            * @param active the active to search with
743            * @param start the lower bound of the range of users to return
744            * @param end the upper bound of the range of users to return (not inclusive)
745            * @param orderByComparator the comparator to order the results by
746            * @return the ordered range of matching users
747            * @throws SystemException if a system exception occurred
748            */
749            public java.util.List<com.liferay.portal.model.User> findByC_A(
750                    long companyId, boolean active, int start, int end,
751                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
752                    throws com.liferay.portal.kernel.exception.SystemException;
753    
754            /**
755            * Finds the first user in the ordered set where companyId = &#63; and active = &#63;.
756            *
757            * <p>
758            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
759            * </p>
760            *
761            * @param companyId the company ID to search with
762            * @param active the active to search with
763            * @param orderByComparator the comparator to order the set by
764            * @return the first matching user
765            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
766            * @throws SystemException if a system exception occurred
767            */
768            public com.liferay.portal.model.User findByC_A_First(long companyId,
769                    boolean active,
770                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
771                    throws com.liferay.portal.NoSuchUserException,
772                            com.liferay.portal.kernel.exception.SystemException;
773    
774            /**
775            * Finds the last user in the ordered set where companyId = &#63; and active = &#63;.
776            *
777            * <p>
778            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
779            * </p>
780            *
781            * @param companyId the company ID to search with
782            * @param active the active to search with
783            * @param orderByComparator the comparator to order the set by
784            * @return the last matching user
785            * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found
786            * @throws SystemException if a system exception occurred
787            */
788            public com.liferay.portal.model.User findByC_A_Last(long companyId,
789                    boolean active,
790                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
791                    throws com.liferay.portal.NoSuchUserException,
792                            com.liferay.portal.kernel.exception.SystemException;
793    
794            /**
795            * Finds the users before and after the current user in the ordered set where companyId = &#63; and active = &#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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
799            * </p>
800            *
801            * @param userId the primary key of the current user
802            * @param companyId the company ID to search with
803            * @param active the active to search with
804            * @param orderByComparator the comparator to order the set by
805            * @return the previous, current, and next user
806            * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found
807            * @throws SystemException if a system exception occurred
808            */
809            public com.liferay.portal.model.User[] findByC_A_PrevAndNext(long userId,
810                    long companyId, boolean active,
811                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
812                    throws com.liferay.portal.NoSuchUserException,
813                            com.liferay.portal.kernel.exception.SystemException;
814    
815            /**
816            * Finds all the users.
817            *
818            * @return the users
819            * @throws SystemException if a system exception occurred
820            */
821            public java.util.List<com.liferay.portal.model.User> findAll()
822                    throws com.liferay.portal.kernel.exception.SystemException;
823    
824            /**
825            * Finds a range of all the users.
826            *
827            * <p>
828            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
829            * </p>
830            *
831            * @param start the lower bound of the range of users to return
832            * @param end the upper bound of the range of users to return (not inclusive)
833            * @return the range of users
834            * @throws SystemException if a system exception occurred
835            */
836            public java.util.List<com.liferay.portal.model.User> findAll(int start,
837                    int end) throws com.liferay.portal.kernel.exception.SystemException;
838    
839            /**
840            * Finds an ordered range of all the users.
841            *
842            * <p>
843            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
844            * </p>
845            *
846            * @param start the lower bound of the range of users to return
847            * @param end the upper bound of the range of users to return (not inclusive)
848            * @param orderByComparator the comparator to order the results by
849            * @return the ordered range of users
850            * @throws SystemException if a system exception occurred
851            */
852            public java.util.List<com.liferay.portal.model.User> findAll(int start,
853                    int end,
854                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
855                    throws com.liferay.portal.kernel.exception.SystemException;
856    
857            /**
858            * Removes all the users where uuid = &#63; from the database.
859            *
860            * @param uuid the uuid to search with
861            * @throws SystemException if a system exception occurred
862            */
863            public void removeByUuid(java.lang.String uuid)
864                    throws com.liferay.portal.kernel.exception.SystemException;
865    
866            /**
867            * Removes all the users where companyId = &#63; from the database.
868            *
869            * @param companyId the company ID to search with
870            * @throws SystemException if a system exception occurred
871            */
872            public void removeByCompanyId(long companyId)
873                    throws com.liferay.portal.kernel.exception.SystemException;
874    
875            /**
876            * Removes the user where contactId = &#63; from the database.
877            *
878            * @param contactId the contact ID to search with
879            * @throws SystemException if a system exception occurred
880            */
881            public void removeByContactId(long contactId)
882                    throws com.liferay.portal.NoSuchUserException,
883                            com.liferay.portal.kernel.exception.SystemException;
884    
885            /**
886            * Removes all the users where emailAddress = &#63; from the database.
887            *
888            * @param emailAddress the email address to search with
889            * @throws SystemException if a system exception occurred
890            */
891            public void removeByEmailAddress(java.lang.String emailAddress)
892                    throws com.liferay.portal.kernel.exception.SystemException;
893    
894            /**
895            * Removes the user where portraitId = &#63; from the database.
896            *
897            * @param portraitId the portrait ID to search with
898            * @throws SystemException if a system exception occurred
899            */
900            public void removeByPortraitId(long portraitId)
901                    throws com.liferay.portal.NoSuchUserException,
902                            com.liferay.portal.kernel.exception.SystemException;
903    
904            /**
905            * Removes the user where companyId = &#63; and userId = &#63; from the database.
906            *
907            * @param companyId the company ID to search with
908            * @param userId the user ID to search with
909            * @throws SystemException if a system exception occurred
910            */
911            public void removeByC_U(long companyId, long userId)
912                    throws com.liferay.portal.NoSuchUserException,
913                            com.liferay.portal.kernel.exception.SystemException;
914    
915            /**
916            * Removes the user where companyId = &#63; and defaultUser = &#63; from the database.
917            *
918            * @param companyId the company ID to search with
919            * @param defaultUser the default user to search with
920            * @throws SystemException if a system exception occurred
921            */
922            public void removeByC_DU(long companyId, boolean defaultUser)
923                    throws com.liferay.portal.NoSuchUserException,
924                            com.liferay.portal.kernel.exception.SystemException;
925    
926            /**
927            * Removes the user where companyId = &#63; and screenName = &#63; from the database.
928            *
929            * @param companyId the company ID to search with
930            * @param screenName the screen name to search with
931            * @throws SystemException if a system exception occurred
932            */
933            public void removeByC_SN(long companyId, java.lang.String screenName)
934                    throws com.liferay.portal.NoSuchUserException,
935                            com.liferay.portal.kernel.exception.SystemException;
936    
937            /**
938            * Removes the user where companyId = &#63; and emailAddress = &#63; from the database.
939            *
940            * @param companyId the company ID to search with
941            * @param emailAddress the email address to search with
942            * @throws SystemException if a system exception occurred
943            */
944            public void removeByC_EA(long companyId, java.lang.String emailAddress)
945                    throws com.liferay.portal.NoSuchUserException,
946                            com.liferay.portal.kernel.exception.SystemException;
947    
948            /**
949            * Removes the user where companyId = &#63; and facebookId = &#63; from the database.
950            *
951            * @param companyId the company ID to search with
952            * @param facebookId the facebook ID to search with
953            * @throws SystemException if a system exception occurred
954            */
955            public void removeByC_FID(long companyId, long facebookId)
956                    throws com.liferay.portal.NoSuchUserException,
957                            com.liferay.portal.kernel.exception.SystemException;
958    
959            /**
960            * Removes the user where companyId = &#63; and openId = &#63; from the database.
961            *
962            * @param companyId the company ID to search with
963            * @param openId the open ID to search with
964            * @throws SystemException if a system exception occurred
965            */
966            public void removeByC_O(long companyId, java.lang.String openId)
967                    throws com.liferay.portal.NoSuchUserException,
968                            com.liferay.portal.kernel.exception.SystemException;
969    
970            /**
971            * Removes all the users where companyId = &#63; and active = &#63; from the database.
972            *
973            * @param companyId the company ID to search with
974            * @param active the active to search with
975            * @throws SystemException if a system exception occurred
976            */
977            public void removeByC_A(long companyId, boolean active)
978                    throws com.liferay.portal.kernel.exception.SystemException;
979    
980            /**
981            * Removes all the users from the database.
982            *
983            * @throws SystemException if a system exception occurred
984            */
985            public void removeAll()
986                    throws com.liferay.portal.kernel.exception.SystemException;
987    
988            /**
989            * Counts all the users where uuid = &#63;.
990            *
991            * @param uuid the uuid to search with
992            * @return the number of matching users
993            * @throws SystemException if a system exception occurred
994            */
995            public int countByUuid(java.lang.String uuid)
996                    throws com.liferay.portal.kernel.exception.SystemException;
997    
998            /**
999            * Counts all the users where companyId = &#63;.
1000            *
1001            * @param companyId the company ID to search with
1002            * @return the number of matching users
1003            * @throws SystemException if a system exception occurred
1004            */
1005            public int countByCompanyId(long companyId)
1006                    throws com.liferay.portal.kernel.exception.SystemException;
1007    
1008            /**
1009            * Counts all the users where contactId = &#63;.
1010            *
1011            * @param contactId the contact ID to search with
1012            * @return the number of matching users
1013            * @throws SystemException if a system exception occurred
1014            */
1015            public int countByContactId(long contactId)
1016                    throws com.liferay.portal.kernel.exception.SystemException;
1017    
1018            /**
1019            * Counts all the users where emailAddress = &#63;.
1020            *
1021            * @param emailAddress the email address to search with
1022            * @return the number of matching users
1023            * @throws SystemException if a system exception occurred
1024            */
1025            public int countByEmailAddress(java.lang.String emailAddress)
1026                    throws com.liferay.portal.kernel.exception.SystemException;
1027    
1028            /**
1029            * Counts all the users where portraitId = &#63;.
1030            *
1031            * @param portraitId the portrait ID to search with
1032            * @return the number of matching users
1033            * @throws SystemException if a system exception occurred
1034            */
1035            public int countByPortraitId(long portraitId)
1036                    throws com.liferay.portal.kernel.exception.SystemException;
1037    
1038            /**
1039            * Counts all the users where companyId = &#63; and userId = &#63;.
1040            *
1041            * @param companyId the company ID to search with
1042            * @param userId the user ID to search with
1043            * @return the number of matching users
1044            * @throws SystemException if a system exception occurred
1045            */
1046            public int countByC_U(long companyId, long userId)
1047                    throws com.liferay.portal.kernel.exception.SystemException;
1048    
1049            /**
1050            * Counts all the users where companyId = &#63; and defaultUser = &#63;.
1051            *
1052            * @param companyId the company ID to search with
1053            * @param defaultUser the default user to search with
1054            * @return the number of matching users
1055            * @throws SystemException if a system exception occurred
1056            */
1057            public int countByC_DU(long companyId, boolean defaultUser)
1058                    throws com.liferay.portal.kernel.exception.SystemException;
1059    
1060            /**
1061            * Counts all the users where companyId = &#63; and screenName = &#63;.
1062            *
1063            * @param companyId the company ID to search with
1064            * @param screenName the screen name to search with
1065            * @return the number of matching users
1066            * @throws SystemException if a system exception occurred
1067            */
1068            public int countByC_SN(long companyId, java.lang.String screenName)
1069                    throws com.liferay.portal.kernel.exception.SystemException;
1070    
1071            /**
1072            * Counts all the users where companyId = &#63; and emailAddress = &#63;.
1073            *
1074            * @param companyId the company ID to search with
1075            * @param emailAddress the email address to search with
1076            * @return the number of matching users
1077            * @throws SystemException if a system exception occurred
1078            */
1079            public int countByC_EA(long companyId, java.lang.String emailAddress)
1080                    throws com.liferay.portal.kernel.exception.SystemException;
1081    
1082            /**
1083            * Counts all the users where companyId = &#63; and facebookId = &#63;.
1084            *
1085            * @param companyId the company ID to search with
1086            * @param facebookId the facebook ID to search with
1087            * @return the number of matching users
1088            * @throws SystemException if a system exception occurred
1089            */
1090            public int countByC_FID(long companyId, long facebookId)
1091                    throws com.liferay.portal.kernel.exception.SystemException;
1092    
1093            /**
1094            * Counts all the users where companyId = &#63; and openId = &#63;.
1095            *
1096            * @param companyId the company ID to search with
1097            * @param openId the open ID to search with
1098            * @return the number of matching users
1099            * @throws SystemException if a system exception occurred
1100            */
1101            public int countByC_O(long companyId, java.lang.String openId)
1102                    throws com.liferay.portal.kernel.exception.SystemException;
1103    
1104            /**
1105            * Counts all the users where companyId = &#63; and active = &#63;.
1106            *
1107            * @param companyId the company ID to search with
1108            * @param active the active to search with
1109            * @return the number of matching users
1110            * @throws SystemException if a system exception occurred
1111            */
1112            public int countByC_A(long companyId, boolean active)
1113                    throws com.liferay.portal.kernel.exception.SystemException;
1114    
1115            /**
1116            * Counts all the users.
1117            *
1118            * @return the number of users
1119            * @throws SystemException if a system exception occurred
1120            */
1121            public int countAll()
1122                    throws com.liferay.portal.kernel.exception.SystemException;
1123    
1124            /**
1125            * Gets all the groups associated with the user.
1126            *
1127            * @param pk the primary key of the user to get the associated groups for
1128            * @return the groups associated with the user
1129            * @throws SystemException if a system exception occurred
1130            */
1131            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk)
1132                    throws com.liferay.portal.kernel.exception.SystemException;
1133    
1134            /**
1135            * Gets a range of all the groups associated with the user.
1136            *
1137            * <p>
1138            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1139            * </p>
1140            *
1141            * @param pk the primary key of the user to get the associated groups for
1142            * @param start the lower bound of the range of users to return
1143            * @param end the upper bound of the range of users to return (not inclusive)
1144            * @return the range of groups associated with the user
1145            * @throws SystemException if a system exception occurred
1146            */
1147            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
1148                    int start, int end)
1149                    throws com.liferay.portal.kernel.exception.SystemException;
1150    
1151            /**
1152            * Gets an ordered range of all the groups associated with the user.
1153            *
1154            * <p>
1155            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1156            * </p>
1157            *
1158            * @param pk the primary key of the user to get the associated groups for
1159            * @param start the lower bound of the range of users to return
1160            * @param end the upper bound of the range of users to return (not inclusive)
1161            * @param orderByComparator the comparator to order the results by
1162            * @return the ordered range of groups associated with the user
1163            * @throws SystemException if a system exception occurred
1164            */
1165            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
1166                    int start, int end,
1167                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1168                    throws com.liferay.portal.kernel.exception.SystemException;
1169    
1170            /**
1171            * Gets the number of groups associated with the user.
1172            *
1173            * @param pk the primary key of the user to get the number of associated groups for
1174            * @return the number of groups associated with the user
1175            * @throws SystemException if a system exception occurred
1176            */
1177            public int getGroupsSize(long pk)
1178                    throws com.liferay.portal.kernel.exception.SystemException;
1179    
1180            /**
1181            * Determines if the group is associated with the user.
1182            *
1183            * @param pk the primary key of the user
1184            * @param groupPK the primary key of the group
1185            * @return <code>true</code> if the group is associated with the user; <code>false</code> otherwise
1186            * @throws SystemException if a system exception occurred
1187            */
1188            public boolean containsGroup(long pk, long groupPK)
1189                    throws com.liferay.portal.kernel.exception.SystemException;
1190    
1191            /**
1192            * Determines if the user has any groups associated with it.
1193            *
1194            * @param pk the primary key of the user to check for associations with groups
1195            * @return <code>true</code> if the user has any groups associated with it; <code>false</code> otherwise
1196            * @throws SystemException if a system exception occurred
1197            */
1198            public boolean containsGroups(long pk)
1199                    throws com.liferay.portal.kernel.exception.SystemException;
1200    
1201            /**
1202            * Adds an association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1203            *
1204            * @param pk the primary key of the user
1205            * @param groupPK the primary key of the group
1206            * @throws SystemException if a system exception occurred
1207            */
1208            public void addGroup(long pk, long groupPK)
1209                    throws com.liferay.portal.kernel.exception.SystemException;
1210    
1211            /**
1212            * Adds an association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1213            *
1214            * @param pk the primary key of the user
1215            * @param group the group
1216            * @throws SystemException if a system exception occurred
1217            */
1218            public void addGroup(long pk, com.liferay.portal.model.Group group)
1219                    throws com.liferay.portal.kernel.exception.SystemException;
1220    
1221            /**
1222            * Adds an association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1223            *
1224            * @param pk the primary key of the user
1225            * @param groupPKs the primary keys of the groups
1226            * @throws SystemException if a system exception occurred
1227            */
1228            public void addGroups(long pk, long[] groupPKs)
1229                    throws com.liferay.portal.kernel.exception.SystemException;
1230    
1231            /**
1232            * Adds an association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1233            *
1234            * @param pk the primary key of the user
1235            * @param groups the groups
1236            * @throws SystemException if a system exception occurred
1237            */
1238            public void addGroups(long pk,
1239                    java.util.List<com.liferay.portal.model.Group> groups)
1240                    throws com.liferay.portal.kernel.exception.SystemException;
1241    
1242            /**
1243            * Clears all associations between the user and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1244            *
1245            * @param pk the primary key of the user to clear the associated groups from
1246            * @throws SystemException if a system exception occurred
1247            */
1248            public void clearGroups(long pk)
1249                    throws com.liferay.portal.kernel.exception.SystemException;
1250    
1251            /**
1252            * Removes the association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1253            *
1254            * @param pk the primary key of the user
1255            * @param groupPK the primary key of the group
1256            * @throws SystemException if a system exception occurred
1257            */
1258            public void removeGroup(long pk, long groupPK)
1259                    throws com.liferay.portal.kernel.exception.SystemException;
1260    
1261            /**
1262            * Removes the association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1263            *
1264            * @param pk the primary key of the user
1265            * @param group the group
1266            * @throws SystemException if a system exception occurred
1267            */
1268            public void removeGroup(long pk, com.liferay.portal.model.Group group)
1269                    throws com.liferay.portal.kernel.exception.SystemException;
1270    
1271            /**
1272            * Removes the association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1273            *
1274            * @param pk the primary key of the user
1275            * @param groupPKs the primary keys of the groups
1276            * @throws SystemException if a system exception occurred
1277            */
1278            public void removeGroups(long pk, long[] groupPKs)
1279                    throws com.liferay.portal.kernel.exception.SystemException;
1280    
1281            /**
1282            * Removes the association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1283            *
1284            * @param pk the primary key of the user
1285            * @param groups the groups
1286            * @throws SystemException if a system exception occurred
1287            */
1288            public void removeGroups(long pk,
1289                    java.util.List<com.liferay.portal.model.Group> groups)
1290                    throws com.liferay.portal.kernel.exception.SystemException;
1291    
1292            /**
1293            * Sets the groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1294            *
1295            * @param pk the primary key of the user to set the associations for
1296            * @param groupPKs the primary keys of the groups to be associated with the user
1297            * @throws SystemException if a system exception occurred
1298            */
1299            public void setGroups(long pk, long[] groupPKs)
1300                    throws com.liferay.portal.kernel.exception.SystemException;
1301    
1302            /**
1303            * Sets the groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1304            *
1305            * @param pk the primary key of the user to set the associations for
1306            * @param groups the groups to be associated with the user
1307            * @throws SystemException if a system exception occurred
1308            */
1309            public void setGroups(long pk,
1310                    java.util.List<com.liferay.portal.model.Group> groups)
1311                    throws com.liferay.portal.kernel.exception.SystemException;
1312    
1313            /**
1314            * Gets all the organizations associated with the user.
1315            *
1316            * @param pk the primary key of the user to get the associated organizations for
1317            * @return the organizations associated with the user
1318            * @throws SystemException if a system exception occurred
1319            */
1320            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
1321                    long pk) throws com.liferay.portal.kernel.exception.SystemException;
1322    
1323            /**
1324            * Gets a range of all the organizations associated with the user.
1325            *
1326            * <p>
1327            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1328            * </p>
1329            *
1330            * @param pk the primary key of the user to get the associated organizations for
1331            * @param start the lower bound of the range of users to return
1332            * @param end the upper bound of the range of users to return (not inclusive)
1333            * @return the range of organizations associated with the user
1334            * @throws SystemException if a system exception occurred
1335            */
1336            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
1337                    long pk, int start, int end)
1338                    throws com.liferay.portal.kernel.exception.SystemException;
1339    
1340            /**
1341            * Gets an ordered range of all the organizations associated with the user.
1342            *
1343            * <p>
1344            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1345            * </p>
1346            *
1347            * @param pk the primary key of the user to get the associated organizations for
1348            * @param start the lower bound of the range of users to return
1349            * @param end the upper bound of the range of users to return (not inclusive)
1350            * @param orderByComparator the comparator to order the results by
1351            * @return the ordered range of organizations associated with the user
1352            * @throws SystemException if a system exception occurred
1353            */
1354            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
1355                    long pk, int start, int end,
1356                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1357                    throws com.liferay.portal.kernel.exception.SystemException;
1358    
1359            /**
1360            * Gets the number of organizations associated with the user.
1361            *
1362            * @param pk the primary key of the user to get the number of associated organizations for
1363            * @return the number of organizations associated with the user
1364            * @throws SystemException if a system exception occurred
1365            */
1366            public int getOrganizationsSize(long pk)
1367                    throws com.liferay.portal.kernel.exception.SystemException;
1368    
1369            /**
1370            * Determines if the organization is associated with the user.
1371            *
1372            * @param pk the primary key of the user
1373            * @param organizationPK the primary key of the organization
1374            * @return <code>true</code> if the organization is associated with the user; <code>false</code> otherwise
1375            * @throws SystemException if a system exception occurred
1376            */
1377            public boolean containsOrganization(long pk, long organizationPK)
1378                    throws com.liferay.portal.kernel.exception.SystemException;
1379    
1380            /**
1381            * Determines if the user has any organizations associated with it.
1382            *
1383            * @param pk the primary key of the user to check for associations with organizations
1384            * @return <code>true</code> if the user has any organizations associated with it; <code>false</code> otherwise
1385            * @throws SystemException if a system exception occurred
1386            */
1387            public boolean containsOrganizations(long pk)
1388                    throws com.liferay.portal.kernel.exception.SystemException;
1389    
1390            /**
1391            * Adds an association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1392            *
1393            * @param pk the primary key of the user
1394            * @param organizationPK the primary key of the organization
1395            * @throws SystemException if a system exception occurred
1396            */
1397            public void addOrganization(long pk, long organizationPK)
1398                    throws com.liferay.portal.kernel.exception.SystemException;
1399    
1400            /**
1401            * Adds an association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1402            *
1403            * @param pk the primary key of the user
1404            * @param organization the organization
1405            * @throws SystemException if a system exception occurred
1406            */
1407            public void addOrganization(long pk,
1408                    com.liferay.portal.model.Organization organization)
1409                    throws com.liferay.portal.kernel.exception.SystemException;
1410    
1411            /**
1412            * Adds an association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1413            *
1414            * @param pk the primary key of the user
1415            * @param organizationPKs the primary keys of the organizations
1416            * @throws SystemException if a system exception occurred
1417            */
1418            public void addOrganizations(long pk, long[] organizationPKs)
1419                    throws com.liferay.portal.kernel.exception.SystemException;
1420    
1421            /**
1422            * Adds an association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1423            *
1424            * @param pk the primary key of the user
1425            * @param organizations the organizations
1426            * @throws SystemException if a system exception occurred
1427            */
1428            public void addOrganizations(long pk,
1429                    java.util.List<com.liferay.portal.model.Organization> organizations)
1430                    throws com.liferay.portal.kernel.exception.SystemException;
1431    
1432            /**
1433            * Clears all associations between the user and its organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1434            *
1435            * @param pk the primary key of the user to clear the associated organizations from
1436            * @throws SystemException if a system exception occurred
1437            */
1438            public void clearOrganizations(long pk)
1439                    throws com.liferay.portal.kernel.exception.SystemException;
1440    
1441            /**
1442            * Removes the association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1443            *
1444            * @param pk the primary key of the user
1445            * @param organizationPK the primary key of the organization
1446            * @throws SystemException if a system exception occurred
1447            */
1448            public void removeOrganization(long pk, long organizationPK)
1449                    throws com.liferay.portal.kernel.exception.SystemException;
1450    
1451            /**
1452            * Removes the association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1453            *
1454            * @param pk the primary key of the user
1455            * @param organization the organization
1456            * @throws SystemException if a system exception occurred
1457            */
1458            public void removeOrganization(long pk,
1459                    com.liferay.portal.model.Organization organization)
1460                    throws com.liferay.portal.kernel.exception.SystemException;
1461    
1462            /**
1463            * Removes the association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1464            *
1465            * @param pk the primary key of the user
1466            * @param organizationPKs the primary keys of the organizations
1467            * @throws SystemException if a system exception occurred
1468            */
1469            public void removeOrganizations(long pk, long[] organizationPKs)
1470                    throws com.liferay.portal.kernel.exception.SystemException;
1471    
1472            /**
1473            * Removes the association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1474            *
1475            * @param pk the primary key of the user
1476            * @param organizations the organizations
1477            * @throws SystemException if a system exception occurred
1478            */
1479            public void removeOrganizations(long pk,
1480                    java.util.List<com.liferay.portal.model.Organization> organizations)
1481                    throws com.liferay.portal.kernel.exception.SystemException;
1482    
1483            /**
1484            * Sets the organizations associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1485            *
1486            * @param pk the primary key of the user to set the associations for
1487            * @param organizationPKs the primary keys of the organizations to be associated with the user
1488            * @throws SystemException if a system exception occurred
1489            */
1490            public void setOrganizations(long pk, long[] organizationPKs)
1491                    throws com.liferay.portal.kernel.exception.SystemException;
1492    
1493            /**
1494            * Sets the organizations associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1495            *
1496            * @param pk the primary key of the user to set the associations for
1497            * @param organizations the organizations to be associated with the user
1498            * @throws SystemException if a system exception occurred
1499            */
1500            public void setOrganizations(long pk,
1501                    java.util.List<com.liferay.portal.model.Organization> organizations)
1502                    throws com.liferay.portal.kernel.exception.SystemException;
1503    
1504            /**
1505            * Gets all the permissions associated with the user.
1506            *
1507            * @param pk the primary key of the user to get the associated permissions for
1508            * @return the permissions associated with the user
1509            * @throws SystemException if a system exception occurred
1510            */
1511            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
1512                    long pk) throws com.liferay.portal.kernel.exception.SystemException;
1513    
1514            /**
1515            * Gets a range of all the permissions associated with the user.
1516            *
1517            * <p>
1518            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1519            * </p>
1520            *
1521            * @param pk the primary key of the user to get the associated permissions for
1522            * @param start the lower bound of the range of users to return
1523            * @param end the upper bound of the range of users to return (not inclusive)
1524            * @return the range of permissions associated with the user
1525            * @throws SystemException if a system exception occurred
1526            */
1527            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
1528                    long pk, int start, int end)
1529                    throws com.liferay.portal.kernel.exception.SystemException;
1530    
1531            /**
1532            * Gets an ordered range of all the permissions associated with the user.
1533            *
1534            * <p>
1535            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1536            * </p>
1537            *
1538            * @param pk the primary key of the user to get the associated permissions for
1539            * @param start the lower bound of the range of users to return
1540            * @param end the upper bound of the range of users to return (not inclusive)
1541            * @param orderByComparator the comparator to order the results by
1542            * @return the ordered range of permissions associated with the user
1543            * @throws SystemException if a system exception occurred
1544            */
1545            public java.util.List<com.liferay.portal.model.Permission> getPermissions(
1546                    long pk, int start, int end,
1547                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1548                    throws com.liferay.portal.kernel.exception.SystemException;
1549    
1550            /**
1551            * Gets the number of permissions associated with the user.
1552            *
1553            * @param pk the primary key of the user to get the number of associated permissions for
1554            * @return the number of permissions associated with the user
1555            * @throws SystemException if a system exception occurred
1556            */
1557            public int getPermissionsSize(long pk)
1558                    throws com.liferay.portal.kernel.exception.SystemException;
1559    
1560            /**
1561            * Determines if the permission is associated with the user.
1562            *
1563            * @param pk the primary key of the user
1564            * @param permissionPK the primary key of the permission
1565            * @return <code>true</code> if the permission is associated with the user; <code>false</code> otherwise
1566            * @throws SystemException if a system exception occurred
1567            */
1568            public boolean containsPermission(long pk, long permissionPK)
1569                    throws com.liferay.portal.kernel.exception.SystemException;
1570    
1571            /**
1572            * Determines if the user has any permissions associated with it.
1573            *
1574            * @param pk the primary key of the user to check for associations with permissions
1575            * @return <code>true</code> if the user has any permissions associated with it; <code>false</code> otherwise
1576            * @throws SystemException if a system exception occurred
1577            */
1578            public boolean containsPermissions(long pk)
1579                    throws com.liferay.portal.kernel.exception.SystemException;
1580    
1581            /**
1582            * Adds an association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1583            *
1584            * @param pk the primary key of the user
1585            * @param permissionPK the primary key of the permission
1586            * @throws SystemException if a system exception occurred
1587            */
1588            public void addPermission(long pk, long permissionPK)
1589                    throws com.liferay.portal.kernel.exception.SystemException;
1590    
1591            /**
1592            * Adds an association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1593            *
1594            * @param pk the primary key of the user
1595            * @param permission the permission
1596            * @throws SystemException if a system exception occurred
1597            */
1598            public void addPermission(long pk,
1599                    com.liferay.portal.model.Permission permission)
1600                    throws com.liferay.portal.kernel.exception.SystemException;
1601    
1602            /**
1603            * Adds an association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1604            *
1605            * @param pk the primary key of the user
1606            * @param permissionPKs the primary keys of the permissions
1607            * @throws SystemException if a system exception occurred
1608            */
1609            public void addPermissions(long pk, long[] permissionPKs)
1610                    throws com.liferay.portal.kernel.exception.SystemException;
1611    
1612            /**
1613            * Adds an association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1614            *
1615            * @param pk the primary key of the user
1616            * @param permissions the permissions
1617            * @throws SystemException if a system exception occurred
1618            */
1619            public void addPermissions(long pk,
1620                    java.util.List<com.liferay.portal.model.Permission> permissions)
1621                    throws com.liferay.portal.kernel.exception.SystemException;
1622    
1623            /**
1624            * Clears all associations between the user and its permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1625            *
1626            * @param pk the primary key of the user to clear the associated permissions from
1627            * @throws SystemException if a system exception occurred
1628            */
1629            public void clearPermissions(long pk)
1630                    throws com.liferay.portal.kernel.exception.SystemException;
1631    
1632            /**
1633            * Removes the association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1634            *
1635            * @param pk the primary key of the user
1636            * @param permissionPK the primary key of the permission
1637            * @throws SystemException if a system exception occurred
1638            */
1639            public void removePermission(long pk, long permissionPK)
1640                    throws com.liferay.portal.kernel.exception.SystemException;
1641    
1642            /**
1643            * Removes the association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1644            *
1645            * @param pk the primary key of the user
1646            * @param permission the permission
1647            * @throws SystemException if a system exception occurred
1648            */
1649            public void removePermission(long pk,
1650                    com.liferay.portal.model.Permission permission)
1651                    throws com.liferay.portal.kernel.exception.SystemException;
1652    
1653            /**
1654            * Removes the association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1655            *
1656            * @param pk the primary key of the user
1657            * @param permissionPKs the primary keys of the permissions
1658            * @throws SystemException if a system exception occurred
1659            */
1660            public void removePermissions(long pk, long[] permissionPKs)
1661                    throws com.liferay.portal.kernel.exception.SystemException;
1662    
1663            /**
1664            * Removes the association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1665            *
1666            * @param pk the primary key of the user
1667            * @param permissions the permissions
1668            * @throws SystemException if a system exception occurred
1669            */
1670            public void removePermissions(long pk,
1671                    java.util.List<com.liferay.portal.model.Permission> permissions)
1672                    throws com.liferay.portal.kernel.exception.SystemException;
1673    
1674            /**
1675            * Sets the permissions associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1676            *
1677            * @param pk the primary key of the user to set the associations for
1678            * @param permissionPKs the primary keys of the permissions to be associated with the user
1679            * @throws SystemException if a system exception occurred
1680            */
1681            public void setPermissions(long pk, long[] permissionPKs)
1682                    throws com.liferay.portal.kernel.exception.SystemException;
1683    
1684            /**
1685            * Sets the permissions associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1686            *
1687            * @param pk the primary key of the user to set the associations for
1688            * @param permissions the permissions to be associated with the user
1689            * @throws SystemException if a system exception occurred
1690            */
1691            public void setPermissions(long pk,
1692                    java.util.List<com.liferay.portal.model.Permission> permissions)
1693                    throws com.liferay.portal.kernel.exception.SystemException;
1694    
1695            /**
1696            * Gets all the roles associated with the user.
1697            *
1698            * @param pk the primary key of the user to get the associated roles for
1699            * @return the roles associated with the user
1700            * @throws SystemException if a system exception occurred
1701            */
1702            public java.util.List<com.liferay.portal.model.Role> getRoles(long pk)
1703                    throws com.liferay.portal.kernel.exception.SystemException;
1704    
1705            /**
1706            * Gets a range of all the roles associated with the user.
1707            *
1708            * <p>
1709            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1710            * </p>
1711            *
1712            * @param pk the primary key of the user to get the associated roles for
1713            * @param start the lower bound of the range of users to return
1714            * @param end the upper bound of the range of users to return (not inclusive)
1715            * @return the range of roles associated with the user
1716            * @throws SystemException if a system exception occurred
1717            */
1718            public java.util.List<com.liferay.portal.model.Role> getRoles(long pk,
1719                    int start, int end)
1720                    throws com.liferay.portal.kernel.exception.SystemException;
1721    
1722            /**
1723            * Gets an ordered range of all the roles associated with the user.
1724            *
1725            * <p>
1726            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1727            * </p>
1728            *
1729            * @param pk the primary key of the user to get the associated roles for
1730            * @param start the lower bound of the range of users to return
1731            * @param end the upper bound of the range of users to return (not inclusive)
1732            * @param orderByComparator the comparator to order the results by
1733            * @return the ordered range of roles associated with the user
1734            * @throws SystemException if a system exception occurred
1735            */
1736            public java.util.List<com.liferay.portal.model.Role> getRoles(long pk,
1737                    int start, int end,
1738                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1739                    throws com.liferay.portal.kernel.exception.SystemException;
1740    
1741            /**
1742            * Gets the number of roles associated with the user.
1743            *
1744            * @param pk the primary key of the user to get the number of associated roles for
1745            * @return the number of roles associated with the user
1746            * @throws SystemException if a system exception occurred
1747            */
1748            public int getRolesSize(long pk)
1749                    throws com.liferay.portal.kernel.exception.SystemException;
1750    
1751            /**
1752            * Determines if the role is associated with the user.
1753            *
1754            * @param pk the primary key of the user
1755            * @param rolePK the primary key of the role
1756            * @return <code>true</code> if the role is associated with the user; <code>false</code> otherwise
1757            * @throws SystemException if a system exception occurred
1758            */
1759            public boolean containsRole(long pk, long rolePK)
1760                    throws com.liferay.portal.kernel.exception.SystemException;
1761    
1762            /**
1763            * Determines if the user has any roles associated with it.
1764            *
1765            * @param pk the primary key of the user to check for associations with roles
1766            * @return <code>true</code> if the user has any roles associated with it; <code>false</code> otherwise
1767            * @throws SystemException if a system exception occurred
1768            */
1769            public boolean containsRoles(long pk)
1770                    throws com.liferay.portal.kernel.exception.SystemException;
1771    
1772            /**
1773            * Adds an association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1774            *
1775            * @param pk the primary key of the user
1776            * @param rolePK the primary key of the role
1777            * @throws SystemException if a system exception occurred
1778            */
1779            public void addRole(long pk, long rolePK)
1780                    throws com.liferay.portal.kernel.exception.SystemException;
1781    
1782            /**
1783            * Adds an association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1784            *
1785            * @param pk the primary key of the user
1786            * @param role the role
1787            * @throws SystemException if a system exception occurred
1788            */
1789            public void addRole(long pk, com.liferay.portal.model.Role role)
1790                    throws com.liferay.portal.kernel.exception.SystemException;
1791    
1792            /**
1793            * Adds an association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1794            *
1795            * @param pk the primary key of the user
1796            * @param rolePKs the primary keys of the roles
1797            * @throws SystemException if a system exception occurred
1798            */
1799            public void addRoles(long pk, long[] rolePKs)
1800                    throws com.liferay.portal.kernel.exception.SystemException;
1801    
1802            /**
1803            * Adds an association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1804            *
1805            * @param pk the primary key of the user
1806            * @param roles the roles
1807            * @throws SystemException if a system exception occurred
1808            */
1809            public void addRoles(long pk,
1810                    java.util.List<com.liferay.portal.model.Role> roles)
1811                    throws com.liferay.portal.kernel.exception.SystemException;
1812    
1813            /**
1814            * Clears all associations between the user and its roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1815            *
1816            * @param pk the primary key of the user to clear the associated roles from
1817            * @throws SystemException if a system exception occurred
1818            */
1819            public void clearRoles(long pk)
1820                    throws com.liferay.portal.kernel.exception.SystemException;
1821    
1822            /**
1823            * Removes the association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1824            *
1825            * @param pk the primary key of the user
1826            * @param rolePK the primary key of the role
1827            * @throws SystemException if a system exception occurred
1828            */
1829            public void removeRole(long pk, long rolePK)
1830                    throws com.liferay.portal.kernel.exception.SystemException;
1831    
1832            /**
1833            * Removes the association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1834            *
1835            * @param pk the primary key of the user
1836            * @param role the role
1837            * @throws SystemException if a system exception occurred
1838            */
1839            public void removeRole(long pk, com.liferay.portal.model.Role role)
1840                    throws com.liferay.portal.kernel.exception.SystemException;
1841    
1842            /**
1843            * Removes the association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1844            *
1845            * @param pk the primary key of the user
1846            * @param rolePKs the primary keys of the roles
1847            * @throws SystemException if a system exception occurred
1848            */
1849            public void removeRoles(long pk, long[] rolePKs)
1850                    throws com.liferay.portal.kernel.exception.SystemException;
1851    
1852            /**
1853            * Removes the association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1854            *
1855            * @param pk the primary key of the user
1856            * @param roles the roles
1857            * @throws SystemException if a system exception occurred
1858            */
1859            public void removeRoles(long pk,
1860                    java.util.List<com.liferay.portal.model.Role> roles)
1861                    throws com.liferay.portal.kernel.exception.SystemException;
1862    
1863            /**
1864            * Sets the roles associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1865            *
1866            * @param pk the primary key of the user to set the associations for
1867            * @param rolePKs the primary keys of the roles to be associated with the user
1868            * @throws SystemException if a system exception occurred
1869            */
1870            public void setRoles(long pk, long[] rolePKs)
1871                    throws com.liferay.portal.kernel.exception.SystemException;
1872    
1873            /**
1874            * Sets the roles associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1875            *
1876            * @param pk the primary key of the user to set the associations for
1877            * @param roles the roles to be associated with the user
1878            * @throws SystemException if a system exception occurred
1879            */
1880            public void setRoles(long pk,
1881                    java.util.List<com.liferay.portal.model.Role> roles)
1882                    throws com.liferay.portal.kernel.exception.SystemException;
1883    
1884            /**
1885            * Gets all the teams associated with the user.
1886            *
1887            * @param pk the primary key of the user to get the associated teams for
1888            * @return the teams associated with the user
1889            * @throws SystemException if a system exception occurred
1890            */
1891            public java.util.List<com.liferay.portal.model.Team> getTeams(long pk)
1892                    throws com.liferay.portal.kernel.exception.SystemException;
1893    
1894            /**
1895            * Gets a range of all the teams associated with the user.
1896            *
1897            * <p>
1898            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1899            * </p>
1900            *
1901            * @param pk the primary key of the user to get the associated teams for
1902            * @param start the lower bound of the range of users to return
1903            * @param end the upper bound of the range of users to return (not inclusive)
1904            * @return the range of teams associated with the user
1905            * @throws SystemException if a system exception occurred
1906            */
1907            public java.util.List<com.liferay.portal.model.Team> getTeams(long pk,
1908                    int start, int end)
1909                    throws com.liferay.portal.kernel.exception.SystemException;
1910    
1911            /**
1912            * Gets an ordered range of all the teams associated with the user.
1913            *
1914            * <p>
1915            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1916            * </p>
1917            *
1918            * @param pk the primary key of the user to get the associated teams for
1919            * @param start the lower bound of the range of users to return
1920            * @param end the upper bound of the range of users to return (not inclusive)
1921            * @param orderByComparator the comparator to order the results by
1922            * @return the ordered range of teams associated with the user
1923            * @throws SystemException if a system exception occurred
1924            */
1925            public java.util.List<com.liferay.portal.model.Team> getTeams(long pk,
1926                    int start, int end,
1927                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1928                    throws com.liferay.portal.kernel.exception.SystemException;
1929    
1930            /**
1931            * Gets the number of teams associated with the user.
1932            *
1933            * @param pk the primary key of the user to get the number of associated teams for
1934            * @return the number of teams associated with the user
1935            * @throws SystemException if a system exception occurred
1936            */
1937            public int getTeamsSize(long pk)
1938                    throws com.liferay.portal.kernel.exception.SystemException;
1939    
1940            /**
1941            * Determines if the team is associated with the user.
1942            *
1943            * @param pk the primary key of the user
1944            * @param teamPK the primary key of the team
1945            * @return <code>true</code> if the team is associated with the user; <code>false</code> otherwise
1946            * @throws SystemException if a system exception occurred
1947            */
1948            public boolean containsTeam(long pk, long teamPK)
1949                    throws com.liferay.portal.kernel.exception.SystemException;
1950    
1951            /**
1952            * Determines if the user has any teams associated with it.
1953            *
1954            * @param pk the primary key of the user to check for associations with teams
1955            * @return <code>true</code> if the user has any teams associated with it; <code>false</code> otherwise
1956            * @throws SystemException if a system exception occurred
1957            */
1958            public boolean containsTeams(long pk)
1959                    throws com.liferay.portal.kernel.exception.SystemException;
1960    
1961            /**
1962            * Adds an association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1963            *
1964            * @param pk the primary key of the user
1965            * @param teamPK the primary key of the team
1966            * @throws SystemException if a system exception occurred
1967            */
1968            public void addTeam(long pk, long teamPK)
1969                    throws com.liferay.portal.kernel.exception.SystemException;
1970    
1971            /**
1972            * Adds an association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1973            *
1974            * @param pk the primary key of the user
1975            * @param team the team
1976            * @throws SystemException if a system exception occurred
1977            */
1978            public void addTeam(long pk, com.liferay.portal.model.Team team)
1979                    throws com.liferay.portal.kernel.exception.SystemException;
1980    
1981            /**
1982            * Adds an association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1983            *
1984            * @param pk the primary key of the user
1985            * @param teamPKs the primary keys of the teams
1986            * @throws SystemException if a system exception occurred
1987            */
1988            public void addTeams(long pk, long[] teamPKs)
1989                    throws com.liferay.portal.kernel.exception.SystemException;
1990    
1991            /**
1992            * Adds an association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1993            *
1994            * @param pk the primary key of the user
1995            * @param teams the teams
1996            * @throws SystemException if a system exception occurred
1997            */
1998            public void addTeams(long pk,
1999                    java.util.List<com.liferay.portal.model.Team> teams)
2000                    throws com.liferay.portal.kernel.exception.SystemException;
2001    
2002            /**
2003            * Clears all associations between the user and its teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2004            *
2005            * @param pk the primary key of the user to clear the associated teams from
2006            * @throws SystemException if a system exception occurred
2007            */
2008            public void clearTeams(long pk)
2009                    throws com.liferay.portal.kernel.exception.SystemException;
2010    
2011            /**
2012            * Removes the association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2013            *
2014            * @param pk the primary key of the user
2015            * @param teamPK the primary key of the team
2016            * @throws SystemException if a system exception occurred
2017            */
2018            public void removeTeam(long pk, long teamPK)
2019                    throws com.liferay.portal.kernel.exception.SystemException;
2020    
2021            /**
2022            * Removes the association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2023            *
2024            * @param pk the primary key of the user
2025            * @param team the team
2026            * @throws SystemException if a system exception occurred
2027            */
2028            public void removeTeam(long pk, com.liferay.portal.model.Team team)
2029                    throws com.liferay.portal.kernel.exception.SystemException;
2030    
2031            /**
2032            * Removes the association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2033            *
2034            * @param pk the primary key of the user
2035            * @param teamPKs the primary keys of the teams
2036            * @throws SystemException if a system exception occurred
2037            */
2038            public void removeTeams(long pk, long[] teamPKs)
2039                    throws com.liferay.portal.kernel.exception.SystemException;
2040    
2041            /**
2042            * Removes the association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2043            *
2044            * @param pk the primary key of the user
2045            * @param teams the teams
2046            * @throws SystemException if a system exception occurred
2047            */
2048            public void removeTeams(long pk,
2049                    java.util.List<com.liferay.portal.model.Team> teams)
2050                    throws com.liferay.portal.kernel.exception.SystemException;
2051    
2052            /**
2053            * Sets the teams associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2054            *
2055            * @param pk the primary key of the user to set the associations for
2056            * @param teamPKs the primary keys of the teams to be associated with the user
2057            * @throws SystemException if a system exception occurred
2058            */
2059            public void setTeams(long pk, long[] teamPKs)
2060                    throws com.liferay.portal.kernel.exception.SystemException;
2061    
2062            /**
2063            * Sets the teams associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2064            *
2065            * @param pk the primary key of the user to set the associations for
2066            * @param teams the teams to be associated with the user
2067            * @throws SystemException if a system exception occurred
2068            */
2069            public void setTeams(long pk,
2070                    java.util.List<com.liferay.portal.model.Team> teams)
2071                    throws com.liferay.portal.kernel.exception.SystemException;
2072    
2073            /**
2074            * Gets all the user groups associated with the user.
2075            *
2076            * @param pk the primary key of the user to get the associated user groups for
2077            * @return the user groups associated with the user
2078            * @throws SystemException if a system exception occurred
2079            */
2080            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
2081                    long pk) throws com.liferay.portal.kernel.exception.SystemException;
2082    
2083            /**
2084            * Gets a range of all the user groups associated with the user.
2085            *
2086            * <p>
2087            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
2088            * </p>
2089            *
2090            * @param pk the primary key of the user to get the associated user groups for
2091            * @param start the lower bound of the range of users to return
2092            * @param end the upper bound of the range of users to return (not inclusive)
2093            * @return the range of user groups associated with the user
2094            * @throws SystemException if a system exception occurred
2095            */
2096            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
2097                    long pk, int start, int end)
2098                    throws com.liferay.portal.kernel.exception.SystemException;
2099    
2100            /**
2101            * Gets an ordered range of all the user groups associated with the user.
2102            *
2103            * <p>
2104            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
2105            * </p>
2106            *
2107            * @param pk the primary key of the user to get the associated user groups for
2108            * @param start the lower bound of the range of users to return
2109            * @param end the upper bound of the range of users to return (not inclusive)
2110            * @param orderByComparator the comparator to order the results by
2111            * @return the ordered range of user groups associated with the user
2112            * @throws SystemException if a system exception occurred
2113            */
2114            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
2115                    long pk, int start, int end,
2116                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
2117                    throws com.liferay.portal.kernel.exception.SystemException;
2118    
2119            /**
2120            * Gets the number of user groups associated with the user.
2121            *
2122            * @param pk the primary key of the user to get the number of associated user groups for
2123            * @return the number of user groups associated with the user
2124            * @throws SystemException if a system exception occurred
2125            */
2126            public int getUserGroupsSize(long pk)
2127                    throws com.liferay.portal.kernel.exception.SystemException;
2128    
2129            /**
2130            * Determines if the user group is associated with the user.
2131            *
2132            * @param pk the primary key of the user
2133            * @param userGroupPK the primary key of the user group
2134            * @return <code>true</code> if the user group is associated with the user; <code>false</code> otherwise
2135            * @throws SystemException if a system exception occurred
2136            */
2137            public boolean containsUserGroup(long pk, long userGroupPK)
2138                    throws com.liferay.portal.kernel.exception.SystemException;
2139    
2140            /**
2141            * Determines if the user has any user groups associated with it.
2142            *
2143            * @param pk the primary key of the user to check for associations with user groups
2144            * @return <code>true</code> if the user has any user groups associated with it; <code>false</code> otherwise
2145            * @throws SystemException if a system exception occurred
2146            */
2147            public boolean containsUserGroups(long pk)
2148                    throws com.liferay.portal.kernel.exception.SystemException;
2149    
2150            /**
2151            * Adds an association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2152            *
2153            * @param pk the primary key of the user
2154            * @param userGroupPK the primary key of the user group
2155            * @throws SystemException if a system exception occurred
2156            */
2157            public void addUserGroup(long pk, long userGroupPK)
2158                    throws com.liferay.portal.kernel.exception.SystemException;
2159    
2160            /**
2161            * Adds an association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2162            *
2163            * @param pk the primary key of the user
2164            * @param userGroup the user group
2165            * @throws SystemException if a system exception occurred
2166            */
2167            public void addUserGroup(long pk,
2168                    com.liferay.portal.model.UserGroup userGroup)
2169                    throws com.liferay.portal.kernel.exception.SystemException;
2170    
2171            /**
2172            * Adds an association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2173            *
2174            * @param pk the primary key of the user
2175            * @param userGroupPKs the primary keys of the user groups
2176            * @throws SystemException if a system exception occurred
2177            */
2178            public void addUserGroups(long pk, long[] userGroupPKs)
2179                    throws com.liferay.portal.kernel.exception.SystemException;
2180    
2181            /**
2182            * Adds an association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2183            *
2184            * @param pk the primary key of the user
2185            * @param userGroups the user groups
2186            * @throws SystemException if a system exception occurred
2187            */
2188            public void addUserGroups(long pk,
2189                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
2190                    throws com.liferay.portal.kernel.exception.SystemException;
2191    
2192            /**
2193            * Clears all associations between the user and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2194            *
2195            * @param pk the primary key of the user to clear the associated user groups from
2196            * @throws SystemException if a system exception occurred
2197            */
2198            public void clearUserGroups(long pk)
2199                    throws com.liferay.portal.kernel.exception.SystemException;
2200    
2201            /**
2202            * Removes the association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2203            *
2204            * @param pk the primary key of the user
2205            * @param userGroupPK the primary key of the user group
2206            * @throws SystemException if a system exception occurred
2207            */
2208            public void removeUserGroup(long pk, long userGroupPK)
2209                    throws com.liferay.portal.kernel.exception.SystemException;
2210    
2211            /**
2212            * Removes the association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2213            *
2214            * @param pk the primary key of the user
2215            * @param userGroup the user group
2216            * @throws SystemException if a system exception occurred
2217            */
2218            public void removeUserGroup(long pk,
2219                    com.liferay.portal.model.UserGroup userGroup)
2220                    throws com.liferay.portal.kernel.exception.SystemException;
2221    
2222            /**
2223            * Removes the association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2224            *
2225            * @param pk the primary key of the user
2226            * @param userGroupPKs the primary keys of the user groups
2227            * @throws SystemException if a system exception occurred
2228            */
2229            public void removeUserGroups(long pk, long[] userGroupPKs)
2230                    throws com.liferay.portal.kernel.exception.SystemException;
2231    
2232            /**
2233            * Removes the association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2234            *
2235            * @param pk the primary key of the user
2236            * @param userGroups the user groups
2237            * @throws SystemException if a system exception occurred
2238            */
2239            public void removeUserGroups(long pk,
2240                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
2241                    throws com.liferay.portal.kernel.exception.SystemException;
2242    
2243            /**
2244            * Sets the user groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2245            *
2246            * @param pk the primary key of the user to set the associations for
2247            * @param userGroupPKs the primary keys of the user groups to be associated with the user
2248            * @throws SystemException if a system exception occurred
2249            */
2250            public void setUserGroups(long pk, long[] userGroupPKs)
2251                    throws com.liferay.portal.kernel.exception.SystemException;
2252    
2253            /**
2254            * Sets the user groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
2255            *
2256            * @param pk the primary key of the user to set the associations for
2257            * @param userGroups the user groups to be associated with the user
2258            * @throws SystemException if a system exception occurred
2259            */
2260            public void setUserGroups(long pk,
2261                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
2262                    throws com.liferay.portal.kernel.exception.SystemException;
2263    
2264            public User remove(User user) throws SystemException;
2265    }