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