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