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