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