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