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