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