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