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