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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for User. This utility wraps
024     * {@link com.liferay.portal.service.impl.UserLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see UserLocalService
032     * @see com.liferay.portal.service.base.UserLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.UserLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class UserLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the user to the database. Also notifies the appropriate model listeners.
046            *
047            * @param user the user
048            * @return the user that was added
049            * @throws SystemException if a system exception occurred
050            */
051            public static com.liferay.portal.model.User addUser(
052                    com.liferay.portal.model.User user)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getService().addUser(user);
055            }
056    
057            /**
058            * Creates a new user with the primary key. Does not add the user to the database.
059            *
060            * @param userId the primary key for the new user
061            * @return the new user
062            */
063            public static com.liferay.portal.model.User createUser(long userId) {
064                    return getService().createUser(userId);
065            }
066    
067            /**
068            * Deletes the user with the primary key from the database. Also notifies the appropriate model listeners.
069            *
070            * @param userId the primary key of the user
071            * @return the user that was removed
072            * @throws PortalException if a user with the primary key could not be found
073            * @throws SystemException if a system exception occurred
074            */
075            public static com.liferay.portal.model.User deleteUser(long userId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    return getService().deleteUser(userId);
079            }
080    
081            /**
082            * Deletes the user from the database. Also notifies the appropriate model listeners.
083            *
084            * @param user the user
085            * @return the user that was removed
086            * @throws PortalException
087            * @throws SystemException if a system exception occurred
088            */
089            public static com.liferay.portal.model.User deleteUser(
090                    com.liferay.portal.model.User user)
091                    throws com.liferay.portal.kernel.exception.PortalException,
092                            com.liferay.portal.kernel.exception.SystemException {
093                    return getService().deleteUser(user);
094            }
095    
096            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
097                    return getService().dynamicQuery();
098            }
099    
100            /**
101            * Performs a dynamic query on the database and returns the matching rows.
102            *
103            * @param dynamicQuery the dynamic query
104            * @return the matching rows
105            * @throws SystemException if a system exception occurred
106            */
107            @SuppressWarnings("rawtypes")
108            public static java.util.List dynamicQuery(
109                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
110                    throws com.liferay.portal.kernel.exception.SystemException {
111                    return getService().dynamicQuery(dynamicQuery);
112            }
113    
114            /**
115            * Performs a dynamic query on the database and returns a range of the matching rows.
116            *
117            * <p>
118            * 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.
119            * </p>
120            *
121            * @param dynamicQuery the dynamic query
122            * @param start the lower bound of the range of model instances
123            * @param end the upper bound of the range of model instances (not inclusive)
124            * @return the range of matching rows
125            * @throws SystemException if a system exception occurred
126            */
127            @SuppressWarnings("rawtypes")
128            public static java.util.List dynamicQuery(
129                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
130                    int end) throws com.liferay.portal.kernel.exception.SystemException {
131                    return getService().dynamicQuery(dynamicQuery, start, end);
132            }
133    
134            /**
135            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
136            *
137            * <p>
138            * 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.
139            * </p>
140            *
141            * @param dynamicQuery the dynamic query
142            * @param start the lower bound of the range of model instances
143            * @param end the upper bound of the range of model instances (not inclusive)
144            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
145            * @return the ordered range of matching rows
146            * @throws SystemException if a system exception occurred
147            */
148            @SuppressWarnings("rawtypes")
149            public static java.util.List dynamicQuery(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
151                    int end,
152                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    return getService()
155                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
156            }
157    
158            /**
159            * Returns the number of rows that match the dynamic query.
160            *
161            * @param dynamicQuery the dynamic query
162            * @return the number of rows that match the dynamic query
163            * @throws SystemException if a system exception occurred
164            */
165            public static long dynamicQueryCount(
166                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
167                    throws com.liferay.portal.kernel.exception.SystemException {
168                    return getService().dynamicQueryCount(dynamicQuery);
169            }
170    
171            /**
172            * Returns the number of rows that match the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @param projection the projection to apply to the query
176            * @return the number of rows that match the dynamic query
177            * @throws SystemException if a system exception occurred
178            */
179            public static long dynamicQueryCount(
180                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
181                    com.liferay.portal.kernel.dao.orm.Projection projection)
182                    throws com.liferay.portal.kernel.exception.SystemException {
183                    return getService().dynamicQueryCount(dynamicQuery, projection);
184            }
185    
186            public static com.liferay.portal.model.User fetchUser(long userId)
187                    throws com.liferay.portal.kernel.exception.SystemException {
188                    return getService().fetchUser(userId);
189            }
190    
191            /**
192            * Returns the user with the matching UUID and company.
193            *
194            * @param uuid the user's UUID
195            * @param companyId the primary key of the company
196            * @return the matching user, or <code>null</code> if a matching user could not be found
197            * @throws SystemException if a system exception occurred
198            */
199            public static com.liferay.portal.model.User fetchUserByUuidAndCompanyId(
200                    java.lang.String uuid, long companyId)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getService().fetchUserByUuidAndCompanyId(uuid, companyId);
203            }
204    
205            /**
206            * Returns the user with the primary key.
207            *
208            * @param userId the primary key of the user
209            * @return the user
210            * @throws PortalException if a user with the primary key could not be found
211            * @throws SystemException if a system exception occurred
212            */
213            public static com.liferay.portal.model.User getUser(long userId)
214                    throws com.liferay.portal.kernel.exception.PortalException,
215                            com.liferay.portal.kernel.exception.SystemException {
216                    return getService().getUser(userId);
217            }
218    
219            public static com.liferay.portal.model.PersistedModel getPersistedModel(
220                    java.io.Serializable primaryKeyObj)
221                    throws com.liferay.portal.kernel.exception.PortalException,
222                            com.liferay.portal.kernel.exception.SystemException {
223                    return getService().getPersistedModel(primaryKeyObj);
224            }
225    
226            /**
227            * Returns the user with the matching UUID and company.
228            *
229            * @param uuid the user's UUID
230            * @param companyId the primary key of the company
231            * @return the matching user
232            * @throws PortalException if a matching user could not be found
233            * @throws SystemException if a system exception occurred
234            */
235            public static com.liferay.portal.model.User getUserByUuidAndCompanyId(
236                    java.lang.String uuid, long companyId)
237                    throws com.liferay.portal.kernel.exception.PortalException,
238                            com.liferay.portal.kernel.exception.SystemException {
239                    return getService().getUserByUuidAndCompanyId(uuid, companyId);
240            }
241    
242            /**
243            * Returns a range of all the users.
244            *
245            * <p>
246            * 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.
247            * </p>
248            *
249            * @param start the lower bound of the range of users
250            * @param end the upper bound of the range of users (not inclusive)
251            * @return the range of users
252            * @throws SystemException if a system exception occurred
253            */
254            public static java.util.List<com.liferay.portal.model.User> getUsers(
255                    int start, int end)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    return getService().getUsers(start, end);
258            }
259    
260            /**
261            * Returns the number of users.
262            *
263            * @return the number of users
264            * @throws SystemException if a system exception occurred
265            */
266            public static int getUsersCount()
267                    throws com.liferay.portal.kernel.exception.SystemException {
268                    return getService().getUsersCount();
269            }
270    
271            /**
272            * Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
273            *
274            * @param user the user
275            * @return the user that was updated
276            * @throws SystemException if a system exception occurred
277            */
278            public static com.liferay.portal.model.User updateUser(
279                    com.liferay.portal.model.User user)
280                    throws com.liferay.portal.kernel.exception.SystemException {
281                    return getService().updateUser(user);
282            }
283    
284            /**
285            * @throws SystemException if a system exception occurred
286            */
287            public static void addGroupUser(long groupId, long userId)
288                    throws com.liferay.portal.kernel.exception.SystemException {
289                    getService().addGroupUser(groupId, userId);
290            }
291    
292            /**
293            * @throws SystemException if a system exception occurred
294            */
295            public static void addGroupUser(long groupId,
296                    com.liferay.portal.model.User user)
297                    throws com.liferay.portal.kernel.exception.SystemException {
298                    getService().addGroupUser(groupId, user);
299            }
300    
301            /**
302            * @throws PortalException
303            * @throws SystemException if a system exception occurred
304            */
305            public static void addGroupUsers(long groupId, long[] userIds)
306                    throws com.liferay.portal.kernel.exception.PortalException,
307                            com.liferay.portal.kernel.exception.SystemException {
308                    getService().addGroupUsers(groupId, userIds);
309            }
310    
311            /**
312            * @throws PortalException
313            * @throws SystemException if a system exception occurred
314            */
315            public static void addGroupUsers(long groupId,
316                    java.util.List<com.liferay.portal.model.User> Users)
317                    throws com.liferay.portal.kernel.exception.PortalException,
318                            com.liferay.portal.kernel.exception.SystemException {
319                    getService().addGroupUsers(groupId, Users);
320            }
321    
322            /**
323            * @throws SystemException if a system exception occurred
324            */
325            public static void clearGroupUsers(long groupId)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    getService().clearGroupUsers(groupId);
328            }
329    
330            /**
331            * @throws SystemException if a system exception occurred
332            */
333            public static void deleteGroupUser(long groupId, long userId)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    getService().deleteGroupUser(groupId, userId);
336            }
337    
338            /**
339            * @throws SystemException if a system exception occurred
340            */
341            public static void deleteGroupUser(long groupId,
342                    com.liferay.portal.model.User user)
343                    throws com.liferay.portal.kernel.exception.SystemException {
344                    getService().deleteGroupUser(groupId, user);
345            }
346    
347            /**
348            * @throws SystemException if a system exception occurred
349            */
350            public static void deleteGroupUsers(long groupId, long[] userIds)
351                    throws com.liferay.portal.kernel.exception.SystemException {
352                    getService().deleteGroupUsers(groupId, userIds);
353            }
354    
355            /**
356            * @throws SystemException if a system exception occurred
357            */
358            public static void deleteGroupUsers(long groupId,
359                    java.util.List<com.liferay.portal.model.User> Users)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    getService().deleteGroupUsers(groupId, Users);
362            }
363    
364            /**
365            * @throws SystemException if a system exception occurred
366            */
367            public static java.util.List<com.liferay.portal.model.User> getGroupUsers(
368                    long groupId)
369                    throws com.liferay.portal.kernel.exception.SystemException {
370                    return getService().getGroupUsers(groupId);
371            }
372    
373            /**
374            * @throws SystemException if a system exception occurred
375            */
376            public static java.util.List<com.liferay.portal.model.User> getGroupUsers(
377                    long groupId, int start, int end)
378                    throws com.liferay.portal.kernel.exception.SystemException {
379                    return getService().getGroupUsers(groupId, start, end);
380            }
381    
382            /**
383            * @throws SystemException if a system exception occurred
384            */
385            public static java.util.List<com.liferay.portal.model.User> getGroupUsers(
386                    long groupId, int start, int end,
387                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
388                    throws com.liferay.portal.kernel.exception.SystemException {
389                    return getService().getGroupUsers(groupId, start, end, orderByComparator);
390            }
391    
392            /**
393            * @throws SystemException if a system exception occurred
394            */
395            public static int getGroupUsersCount(long groupId)
396                    throws com.liferay.portal.kernel.exception.SystemException {
397                    return getService().getGroupUsersCount(groupId);
398            }
399    
400            /**
401            * @throws SystemException if a system exception occurred
402            */
403            public static boolean hasGroupUser(long groupId, long userId)
404                    throws com.liferay.portal.kernel.exception.SystemException {
405                    return getService().hasGroupUser(groupId, userId);
406            }
407    
408            /**
409            * @throws SystemException if a system exception occurred
410            */
411            public static boolean hasGroupUsers(long groupId)
412                    throws com.liferay.portal.kernel.exception.SystemException {
413                    return getService().hasGroupUsers(groupId);
414            }
415    
416            /**
417            * @throws SystemException if a system exception occurred
418            */
419            public static void setGroupUsers(long groupId, long[] userIds)
420                    throws com.liferay.portal.kernel.exception.SystemException {
421                    getService().setGroupUsers(groupId, userIds);
422            }
423    
424            /**
425            * @throws SystemException if a system exception occurred
426            */
427            public static void addOrganizationUser(long organizationId, long userId)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    getService().addOrganizationUser(organizationId, userId);
430            }
431    
432            /**
433            * @throws SystemException if a system exception occurred
434            */
435            public static void addOrganizationUser(long organizationId,
436                    com.liferay.portal.model.User user)
437                    throws com.liferay.portal.kernel.exception.SystemException {
438                    getService().addOrganizationUser(organizationId, user);
439            }
440    
441            /**
442            * @throws PortalException
443            * @throws SystemException if a system exception occurred
444            */
445            public static void addOrganizationUsers(long organizationId, long[] userIds)
446                    throws com.liferay.portal.kernel.exception.PortalException,
447                            com.liferay.portal.kernel.exception.SystemException {
448                    getService().addOrganizationUsers(organizationId, userIds);
449            }
450    
451            /**
452            * @throws PortalException
453            * @throws SystemException if a system exception occurred
454            */
455            public static void addOrganizationUsers(long organizationId,
456                    java.util.List<com.liferay.portal.model.User> Users)
457                    throws com.liferay.portal.kernel.exception.PortalException,
458                            com.liferay.portal.kernel.exception.SystemException {
459                    getService().addOrganizationUsers(organizationId, Users);
460            }
461    
462            /**
463            * @throws SystemException if a system exception occurred
464            */
465            public static void clearOrganizationUsers(long organizationId)
466                    throws com.liferay.portal.kernel.exception.SystemException {
467                    getService().clearOrganizationUsers(organizationId);
468            }
469    
470            /**
471            * @throws SystemException if a system exception occurred
472            */
473            public static void deleteOrganizationUser(long organizationId, long userId)
474                    throws com.liferay.portal.kernel.exception.SystemException {
475                    getService().deleteOrganizationUser(organizationId, userId);
476            }
477    
478            /**
479            * @throws SystemException if a system exception occurred
480            */
481            public static void deleteOrganizationUser(long organizationId,
482                    com.liferay.portal.model.User user)
483                    throws com.liferay.portal.kernel.exception.SystemException {
484                    getService().deleteOrganizationUser(organizationId, user);
485            }
486    
487            /**
488            * @throws SystemException if a system exception occurred
489            */
490            public static void deleteOrganizationUsers(long organizationId,
491                    long[] userIds)
492                    throws com.liferay.portal.kernel.exception.SystemException {
493                    getService().deleteOrganizationUsers(organizationId, userIds);
494            }
495    
496            /**
497            * @throws SystemException if a system exception occurred
498            */
499            public static void deleteOrganizationUsers(long organizationId,
500                    java.util.List<com.liferay.portal.model.User> Users)
501                    throws com.liferay.portal.kernel.exception.SystemException {
502                    getService().deleteOrganizationUsers(organizationId, Users);
503            }
504    
505            /**
506            * @throws SystemException if a system exception occurred
507            */
508            public static java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
509                    long organizationId)
510                    throws com.liferay.portal.kernel.exception.SystemException {
511                    return getService().getOrganizationUsers(organizationId);
512            }
513    
514            /**
515            * @throws SystemException if a system exception occurred
516            */
517            public static java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
518                    long organizationId, int start, int end)
519                    throws com.liferay.portal.kernel.exception.SystemException {
520                    return getService().getOrganizationUsers(organizationId, start, end);
521            }
522    
523            /**
524            * @throws SystemException if a system exception occurred
525            */
526            public static java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
527                    long organizationId, int start, int end,
528                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
529                    throws com.liferay.portal.kernel.exception.SystemException {
530                    return getService()
531                                       .getOrganizationUsers(organizationId, start, end,
532                            orderByComparator);
533            }
534    
535            /**
536            * @throws SystemException if a system exception occurred
537            */
538            public static int getOrganizationUsersCount(long organizationId)
539                    throws com.liferay.portal.kernel.exception.SystemException {
540                    return getService().getOrganizationUsersCount(organizationId);
541            }
542    
543            /**
544            * @throws SystemException if a system exception occurred
545            */
546            public static boolean hasOrganizationUser(long organizationId, long userId)
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    return getService().hasOrganizationUser(organizationId, userId);
549            }
550    
551            /**
552            * @throws SystemException if a system exception occurred
553            */
554            public static boolean hasOrganizationUsers(long organizationId)
555                    throws com.liferay.portal.kernel.exception.SystemException {
556                    return getService().hasOrganizationUsers(organizationId);
557            }
558    
559            /**
560            * @throws SystemException if a system exception occurred
561            */
562            public static void setOrganizationUsers(long organizationId, long[] userIds)
563                    throws com.liferay.portal.kernel.exception.SystemException {
564                    getService().setOrganizationUsers(organizationId, userIds);
565            }
566    
567            /**
568            * @throws SystemException if a system exception occurred
569            */
570            public static void addRoleUser(long roleId, long userId)
571                    throws com.liferay.portal.kernel.exception.SystemException {
572                    getService().addRoleUser(roleId, userId);
573            }
574    
575            /**
576            * @throws SystemException if a system exception occurred
577            */
578            public static void addRoleUser(long roleId,
579                    com.liferay.portal.model.User user)
580                    throws com.liferay.portal.kernel.exception.SystemException {
581                    getService().addRoleUser(roleId, user);
582            }
583    
584            /**
585            * @throws PortalException
586            * @throws SystemException if a system exception occurred
587            */
588            public static void addRoleUsers(long roleId, long[] userIds)
589                    throws com.liferay.portal.kernel.exception.PortalException,
590                            com.liferay.portal.kernel.exception.SystemException {
591                    getService().addRoleUsers(roleId, userIds);
592            }
593    
594            /**
595            * @throws PortalException
596            * @throws SystemException if a system exception occurred
597            */
598            public static void addRoleUsers(long roleId,
599                    java.util.List<com.liferay.portal.model.User> Users)
600                    throws com.liferay.portal.kernel.exception.PortalException,
601                            com.liferay.portal.kernel.exception.SystemException {
602                    getService().addRoleUsers(roleId, Users);
603            }
604    
605            /**
606            * @throws SystemException if a system exception occurred
607            */
608            public static void clearRoleUsers(long roleId)
609                    throws com.liferay.portal.kernel.exception.SystemException {
610                    getService().clearRoleUsers(roleId);
611            }
612    
613            /**
614            * @throws PortalException
615            * @throws SystemException if a system exception occurred
616            */
617            public static void deleteRoleUser(long roleId, long userId)
618                    throws com.liferay.portal.kernel.exception.PortalException,
619                            com.liferay.portal.kernel.exception.SystemException {
620                    getService().deleteRoleUser(roleId, userId);
621            }
622    
623            /**
624            * @throws PortalException
625            * @throws SystemException if a system exception occurred
626            */
627            public static void deleteRoleUser(long roleId,
628                    com.liferay.portal.model.User user)
629                    throws com.liferay.portal.kernel.exception.PortalException,
630                            com.liferay.portal.kernel.exception.SystemException {
631                    getService().deleteRoleUser(roleId, user);
632            }
633    
634            /**
635            * @throws SystemException if a system exception occurred
636            */
637            public static void deleteRoleUsers(long roleId, long[] userIds)
638                    throws com.liferay.portal.kernel.exception.SystemException {
639                    getService().deleteRoleUsers(roleId, userIds);
640            }
641    
642            /**
643            * @throws SystemException if a system exception occurred
644            */
645            public static void deleteRoleUsers(long roleId,
646                    java.util.List<com.liferay.portal.model.User> Users)
647                    throws com.liferay.portal.kernel.exception.SystemException {
648                    getService().deleteRoleUsers(roleId, Users);
649            }
650    
651            /**
652            * @throws SystemException if a system exception occurred
653            */
654            public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
655                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
656                    return getService().getRoleUsers(roleId);
657            }
658    
659            /**
660            * @throws SystemException if a system exception occurred
661            */
662            public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
663                    long roleId, int start, int end)
664                    throws com.liferay.portal.kernel.exception.SystemException {
665                    return getService().getRoleUsers(roleId, start, end);
666            }
667    
668            /**
669            * @throws SystemException if a system exception occurred
670            */
671            public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
672                    long roleId, int start, int end,
673                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
674                    throws com.liferay.portal.kernel.exception.SystemException {
675                    return getService().getRoleUsers(roleId, start, end, orderByComparator);
676            }
677    
678            /**
679            * @throws SystemException if a system exception occurred
680            */
681            public static int getRoleUsersCount(long roleId)
682                    throws com.liferay.portal.kernel.exception.SystemException {
683                    return getService().getRoleUsersCount(roleId);
684            }
685    
686            /**
687            * @throws SystemException if a system exception occurred
688            */
689            public static boolean hasRoleUser(long roleId, long userId)
690                    throws com.liferay.portal.kernel.exception.SystemException {
691                    return getService().hasRoleUser(roleId, userId);
692            }
693    
694            /**
695            * @throws SystemException if a system exception occurred
696            */
697            public static boolean hasRoleUsers(long roleId)
698                    throws com.liferay.portal.kernel.exception.SystemException {
699                    return getService().hasRoleUsers(roleId);
700            }
701    
702            /**
703            * @throws PortalException
704            * @throws SystemException if a system exception occurred
705            */
706            public static void setRoleUsers(long roleId, long[] userIds)
707                    throws com.liferay.portal.kernel.exception.PortalException,
708                            com.liferay.portal.kernel.exception.SystemException {
709                    getService().setRoleUsers(roleId, userIds);
710            }
711    
712            /**
713            * @throws SystemException if a system exception occurred
714            */
715            public static void addTeamUser(long teamId, long userId)
716                    throws com.liferay.portal.kernel.exception.SystemException {
717                    getService().addTeamUser(teamId, userId);
718            }
719    
720            /**
721            * @throws SystemException if a system exception occurred
722            */
723            public static void addTeamUser(long teamId,
724                    com.liferay.portal.model.User user)
725                    throws com.liferay.portal.kernel.exception.SystemException {
726                    getService().addTeamUser(teamId, user);
727            }
728    
729            /**
730            * @throws PortalException
731            * @throws SystemException if a system exception occurred
732            */
733            public static void addTeamUsers(long teamId, long[] userIds)
734                    throws com.liferay.portal.kernel.exception.PortalException,
735                            com.liferay.portal.kernel.exception.SystemException {
736                    getService().addTeamUsers(teamId, userIds);
737            }
738    
739            /**
740            * @throws PortalException
741            * @throws SystemException if a system exception occurred
742            */
743            public static void addTeamUsers(long teamId,
744                    java.util.List<com.liferay.portal.model.User> Users)
745                    throws com.liferay.portal.kernel.exception.PortalException,
746                            com.liferay.portal.kernel.exception.SystemException {
747                    getService().addTeamUsers(teamId, Users);
748            }
749    
750            /**
751            * @throws SystemException if a system exception occurred
752            */
753            public static void clearTeamUsers(long teamId)
754                    throws com.liferay.portal.kernel.exception.SystemException {
755                    getService().clearTeamUsers(teamId);
756            }
757    
758            /**
759            * @throws SystemException if a system exception occurred
760            */
761            public static void deleteTeamUser(long teamId, long userId)
762                    throws com.liferay.portal.kernel.exception.SystemException {
763                    getService().deleteTeamUser(teamId, userId);
764            }
765    
766            /**
767            * @throws SystemException if a system exception occurred
768            */
769            public static void deleteTeamUser(long teamId,
770                    com.liferay.portal.model.User user)
771                    throws com.liferay.portal.kernel.exception.SystemException {
772                    getService().deleteTeamUser(teamId, user);
773            }
774    
775            /**
776            * @throws SystemException if a system exception occurred
777            */
778            public static void deleteTeamUsers(long teamId, long[] userIds)
779                    throws com.liferay.portal.kernel.exception.SystemException {
780                    getService().deleteTeamUsers(teamId, userIds);
781            }
782    
783            /**
784            * @throws SystemException if a system exception occurred
785            */
786            public static void deleteTeamUsers(long teamId,
787                    java.util.List<com.liferay.portal.model.User> Users)
788                    throws com.liferay.portal.kernel.exception.SystemException {
789                    getService().deleteTeamUsers(teamId, Users);
790            }
791    
792            /**
793            * @throws SystemException if a system exception occurred
794            */
795            public static java.util.List<com.liferay.portal.model.User> getTeamUsers(
796                    long teamId) throws com.liferay.portal.kernel.exception.SystemException {
797                    return getService().getTeamUsers(teamId);
798            }
799    
800            /**
801            * @throws SystemException if a system exception occurred
802            */
803            public static java.util.List<com.liferay.portal.model.User> getTeamUsers(
804                    long teamId, int start, int end)
805                    throws com.liferay.portal.kernel.exception.SystemException {
806                    return getService().getTeamUsers(teamId, start, end);
807            }
808    
809            /**
810            * @throws SystemException if a system exception occurred
811            */
812            public static java.util.List<com.liferay.portal.model.User> getTeamUsers(
813                    long teamId, int start, int end,
814                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
815                    throws com.liferay.portal.kernel.exception.SystemException {
816                    return getService().getTeamUsers(teamId, start, end, orderByComparator);
817            }
818    
819            /**
820            * @throws SystemException if a system exception occurred
821            */
822            public static int getTeamUsersCount(long teamId)
823                    throws com.liferay.portal.kernel.exception.SystemException {
824                    return getService().getTeamUsersCount(teamId);
825            }
826    
827            /**
828            * @throws SystemException if a system exception occurred
829            */
830            public static boolean hasTeamUser(long teamId, long userId)
831                    throws com.liferay.portal.kernel.exception.SystemException {
832                    return getService().hasTeamUser(teamId, userId);
833            }
834    
835            /**
836            * @throws SystemException if a system exception occurred
837            */
838            public static boolean hasTeamUsers(long teamId)
839                    throws com.liferay.portal.kernel.exception.SystemException {
840                    return getService().hasTeamUsers(teamId);
841            }
842    
843            /**
844            * @throws SystemException if a system exception occurred
845            */
846            public static void setTeamUsers(long teamId, long[] userIds)
847                    throws com.liferay.portal.kernel.exception.SystemException {
848                    getService().setTeamUsers(teamId, userIds);
849            }
850    
851            /**
852            * @throws SystemException if a system exception occurred
853            */
854            public static void addUserGroupUser(long userGroupId, long userId)
855                    throws com.liferay.portal.kernel.exception.SystemException {
856                    getService().addUserGroupUser(userGroupId, userId);
857            }
858    
859            /**
860            * @throws SystemException if a system exception occurred
861            */
862            public static void addUserGroupUser(long userGroupId,
863                    com.liferay.portal.model.User user)
864                    throws com.liferay.portal.kernel.exception.SystemException {
865                    getService().addUserGroupUser(userGroupId, user);
866            }
867    
868            /**
869            * @throws PortalException
870            * @throws SystemException if a system exception occurred
871            */
872            public static void addUserGroupUsers(long userGroupId, long[] userIds)
873                    throws com.liferay.portal.kernel.exception.PortalException,
874                            com.liferay.portal.kernel.exception.SystemException {
875                    getService().addUserGroupUsers(userGroupId, userIds);
876            }
877    
878            /**
879            * @throws PortalException
880            * @throws SystemException if a system exception occurred
881            */
882            public static void addUserGroupUsers(long userGroupId,
883                    java.util.List<com.liferay.portal.model.User> Users)
884                    throws com.liferay.portal.kernel.exception.PortalException,
885                            com.liferay.portal.kernel.exception.SystemException {
886                    getService().addUserGroupUsers(userGroupId, Users);
887            }
888    
889            /**
890            * @throws SystemException if a system exception occurred
891            */
892            public static void clearUserGroupUsers(long userGroupId)
893                    throws com.liferay.portal.kernel.exception.SystemException {
894                    getService().clearUserGroupUsers(userGroupId);
895            }
896    
897            /**
898            * @throws PortalException
899            * @throws SystemException if a system exception occurred
900            */
901            public static void deleteUserGroupUser(long userGroupId, long userId)
902                    throws com.liferay.portal.kernel.exception.PortalException,
903                            com.liferay.portal.kernel.exception.SystemException {
904                    getService().deleteUserGroupUser(userGroupId, userId);
905            }
906    
907            /**
908            * @throws PortalException
909            * @throws SystemException if a system exception occurred
910            */
911            public static void deleteUserGroupUser(long userGroupId,
912                    com.liferay.portal.model.User user)
913                    throws com.liferay.portal.kernel.exception.PortalException,
914                            com.liferay.portal.kernel.exception.SystemException {
915                    getService().deleteUserGroupUser(userGroupId, user);
916            }
917    
918            /**
919            * @throws SystemException if a system exception occurred
920            */
921            public static void deleteUserGroupUsers(long userGroupId, long[] userIds)
922                    throws com.liferay.portal.kernel.exception.SystemException {
923                    getService().deleteUserGroupUsers(userGroupId, userIds);
924            }
925    
926            /**
927            * @throws SystemException if a system exception occurred
928            */
929            public static void deleteUserGroupUsers(long userGroupId,
930                    java.util.List<com.liferay.portal.model.User> Users)
931                    throws com.liferay.portal.kernel.exception.SystemException {
932                    getService().deleteUserGroupUsers(userGroupId, Users);
933            }
934    
935            /**
936            * @throws SystemException if a system exception occurred
937            */
938            public static java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
939                    long userGroupId)
940                    throws com.liferay.portal.kernel.exception.SystemException {
941                    return getService().getUserGroupUsers(userGroupId);
942            }
943    
944            /**
945            * @throws SystemException if a system exception occurred
946            */
947            public static java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
948                    long userGroupId, int start, int end)
949                    throws com.liferay.portal.kernel.exception.SystemException {
950                    return getService().getUserGroupUsers(userGroupId, start, end);
951            }
952    
953            /**
954            * @throws SystemException if a system exception occurred
955            */
956            public static java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
957                    long userGroupId, int start, int end,
958                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
959                    throws com.liferay.portal.kernel.exception.SystemException {
960                    return getService()
961                                       .getUserGroupUsers(userGroupId, start, end, orderByComparator);
962            }
963    
964            /**
965            * @throws SystemException if a system exception occurred
966            */
967            public static int getUserGroupUsersCount(long userGroupId)
968                    throws com.liferay.portal.kernel.exception.SystemException {
969                    return getService().getUserGroupUsersCount(userGroupId);
970            }
971    
972            /**
973            * @throws SystemException if a system exception occurred
974            */
975            public static boolean hasUserGroupUser(long userGroupId, long userId)
976                    throws com.liferay.portal.kernel.exception.SystemException {
977                    return getService().hasUserGroupUser(userGroupId, userId);
978            }
979    
980            /**
981            * @throws SystemException if a system exception occurred
982            */
983            public static boolean hasUserGroupUsers(long userGroupId)
984                    throws com.liferay.portal.kernel.exception.SystemException {
985                    return getService().hasUserGroupUsers(userGroupId);
986            }
987    
988            /**
989            * @throws PortalException
990            * @throws SystemException if a system exception occurred
991            */
992            public static void setUserGroupUsers(long userGroupId, long[] userIds)
993                    throws com.liferay.portal.kernel.exception.PortalException,
994                            com.liferay.portal.kernel.exception.SystemException {
995                    getService().setUserGroupUsers(userGroupId, userIds);
996            }
997    
998            /**
999            * Returns the Spring bean ID for this bean.
1000            *
1001            * @return the Spring bean ID for this bean
1002            */
1003            public static java.lang.String getBeanIdentifier() {
1004                    return getService().getBeanIdentifier();
1005            }
1006    
1007            /**
1008            * Sets the Spring bean ID for this bean.
1009            *
1010            * @param beanIdentifier the Spring bean ID for this bean
1011            */
1012            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
1013                    getService().setBeanIdentifier(beanIdentifier);
1014            }
1015    
1016            /**
1017            * Adds a default admin user for the company.
1018            *
1019            * @param companyId the primary key of the user's company
1020            * @param screenName the user's screen name
1021            * @param emailAddress the user's email address
1022            * @param locale the user's locale
1023            * @param firstName the user's first name
1024            * @param middleName the user's middle name
1025            * @param lastName the user's last name
1026            * @return the new default admin user
1027            * @throws PortalException n if a portal exception occurred
1028            * @throws SystemException if a system exception occurred
1029            */
1030            public static com.liferay.portal.model.User addDefaultAdminUser(
1031                    long companyId, java.lang.String screenName,
1032                    java.lang.String emailAddress, java.util.Locale locale,
1033                    java.lang.String firstName, java.lang.String middleName,
1034                    java.lang.String lastName)
1035                    throws com.liferay.portal.kernel.exception.PortalException,
1036                            com.liferay.portal.kernel.exception.SystemException {
1037                    return getService()
1038                                       .addDefaultAdminUser(companyId, screenName, emailAddress,
1039                            locale, firstName, middleName, lastName);
1040            }
1041    
1042            /**
1043            * Adds the user to the default groups, unless the user is already in these
1044            * groups. The default groups can be specified in
1045            * <code>portal.properties</code> with the key
1046            * <code>admin.default.group.names</code>.
1047            *
1048            * @param userId the primary key of the user
1049            * @throws PortalException if a user with the primary key could not be found
1050            * @throws SystemException if a system exception occurred
1051            */
1052            public static void addDefaultGroups(long userId)
1053                    throws com.liferay.portal.kernel.exception.PortalException,
1054                            com.liferay.portal.kernel.exception.SystemException {
1055                    getService().addDefaultGroups(userId);
1056            }
1057    
1058            /**
1059            * Adds the user to the default roles, unless the user already has these
1060            * roles. The default roles can be specified in
1061            * <code>portal.properties</code> with the key
1062            * <code>admin.default.role.names</code>.
1063            *
1064            * @param userId the primary key of the user
1065            * @throws PortalException if a user with the primary key could not be found
1066            * @throws SystemException if a system exception occurred
1067            */
1068            public static void addDefaultRoles(long userId)
1069                    throws com.liferay.portal.kernel.exception.PortalException,
1070                            com.liferay.portal.kernel.exception.SystemException {
1071                    getService().addDefaultRoles(userId);
1072            }
1073    
1074            /**
1075            * Adds the user to the default user groups, unless the user is already in
1076            * these user groups. The default user groups can be specified in
1077            * <code>portal.properties</code> with the property
1078            * <code>admin.default.user.group.names</code>.
1079            *
1080            * @param userId the primary key of the user
1081            * @throws PortalException if a user with the primary key could not be found
1082            * @throws SystemException if a system exception occurred
1083            */
1084            public static void addDefaultUserGroups(long userId)
1085                    throws com.liferay.portal.kernel.exception.PortalException,
1086                            com.liferay.portal.kernel.exception.SystemException {
1087                    getService().addDefaultUserGroups(userId);
1088            }
1089    
1090            /**
1091            * Assigns the password policy to the users, removing any other currently
1092            * assigned password policies.
1093            *
1094            * @param passwordPolicyId the primary key of the password policy
1095            * @param userIds the primary keys of the users
1096            * @throws SystemException if a system exception occurred
1097            */
1098            public static void addPasswordPolicyUsers(long passwordPolicyId,
1099                    long[] userIds)
1100                    throws com.liferay.portal.kernel.exception.SystemException {
1101                    getService().addPasswordPolicyUsers(passwordPolicyId, userIds);
1102            }
1103    
1104            /**
1105            * Adds a user.
1106            *
1107            * <p>
1108            * This method handles the creation and bookkeeping of the user including
1109            * its resources, metadata, and internal data structures. It is not
1110            * necessary to make subsequent calls to any methods to setup default
1111            * groups, resources, etc.
1112            * </p>
1113            *
1114            * @param creatorUserId the primary key of the creator
1115            * @param companyId the primary key of the user's company
1116            * @param autoPassword whether a password should be automatically generated
1117            for the user
1118            * @param password1 the user's password
1119            * @param password2 the user's password confirmation
1120            * @param autoScreenName whether a screen name should be automatically
1121            generated for the user
1122            * @param screenName the user's screen name
1123            * @param emailAddress the user's email address
1124            * @param facebookId the user's facebook ID
1125            * @param openId the user's OpenID
1126            * @param locale the user's locale
1127            * @param firstName the user's first name
1128            * @param middleName the user's middle name
1129            * @param lastName the user's last name
1130            * @param prefixId the user's name prefix ID
1131            * @param suffixId the user's name suffix ID
1132            * @param male whether the user is male
1133            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
1134            January)
1135            * @param birthdayDay the user's birthday day
1136            * @param birthdayYear the user's birthday year
1137            * @param jobTitle the user's job title
1138            * @param groupIds the primary keys of the user's groups
1139            * @param organizationIds the primary keys of the user's organizations
1140            * @param roleIds the primary keys of the roles this user possesses
1141            * @param userGroupIds the primary keys of the user's user groups
1142            * @param sendEmail whether to send the user an email notification about
1143            their new account
1144            * @param serviceContext the service context to be applied (optionally
1145            <code>null</code>). Can set the UUID (with the <code>uuid</code>
1146            attribute), asset category IDs, asset tag names, and expando
1147            bridge attributes for the user.
1148            * @return the new user
1149            * @throws PortalException if the user's information was invalid
1150            * @throws SystemException if a system exception occurred
1151            */
1152            public static com.liferay.portal.model.User addUser(long creatorUserId,
1153                    long companyId, boolean autoPassword, java.lang.String password1,
1154                    java.lang.String password2, boolean autoScreenName,
1155                    java.lang.String screenName, java.lang.String emailAddress,
1156                    long facebookId, java.lang.String openId, java.util.Locale locale,
1157                    java.lang.String firstName, java.lang.String middleName,
1158                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
1159                    int birthdayMonth, int birthdayDay, int birthdayYear,
1160                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1161                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
1162                    com.liferay.portal.service.ServiceContext serviceContext)
1163                    throws com.liferay.portal.kernel.exception.PortalException,
1164                            com.liferay.portal.kernel.exception.SystemException {
1165                    return getService()
1166                                       .addUser(creatorUserId, companyId, autoPassword, password1,
1167                            password2, autoScreenName, screenName, emailAddress, facebookId,
1168                            openId, locale, firstName, middleName, lastName, prefixId,
1169                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
1170                            groupIds, organizationIds, roleIds, userGroupIds, sendEmail,
1171                            serviceContext);
1172            }
1173    
1174            /**
1175            * Adds a user with workflow.
1176            *
1177            * <p>
1178            * This method handles the creation and bookkeeping of the user including
1179            * its resources, metadata, and internal data structures. It is not
1180            * necessary to make subsequent calls to any methods to setup default
1181            * groups, resources, etc.
1182            * </p>
1183            *
1184            * @param creatorUserId the primary key of the creator
1185            * @param companyId the primary key of the user's company
1186            * @param autoPassword whether a password should be automatically generated
1187            for the user
1188            * @param password1 the user's password
1189            * @param password2 the user's password confirmation
1190            * @param autoScreenName whether a screen name should be automatically
1191            generated for the user
1192            * @param screenName the user's screen name
1193            * @param emailAddress the user's email address
1194            * @param facebookId the user's facebook ID
1195            * @param openId the user's OpenID
1196            * @param locale the user's locale
1197            * @param firstName the user's first name
1198            * @param middleName the user's middle name
1199            * @param lastName the user's last name
1200            * @param prefixId the user's name prefix ID
1201            * @param suffixId the user's name suffix ID
1202            * @param male whether the user is male
1203            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
1204            January)
1205            * @param birthdayDay the user's birthday day
1206            * @param birthdayYear the user's birthday year
1207            * @param jobTitle the user's job title
1208            * @param groupIds the primary keys of the user's groups
1209            * @param organizationIds the primary keys of the user's organizations
1210            * @param roleIds the primary keys of the roles this user possesses
1211            * @param userGroupIds the primary keys of the user's user groups
1212            * @param sendEmail whether to send the user an email notification about
1213            their new account
1214            * @param serviceContext the service context to be applied (optionally
1215            <code>null</code>). Can set the UUID (with the <code>uuid</code>
1216            attribute), asset category IDs, asset tag names, and expando
1217            bridge attributes for the user.
1218            * @return the new user
1219            * @throws PortalException if the user's information was invalid
1220            * @throws SystemException if a system exception occurred
1221            */
1222            public static com.liferay.portal.model.User addUserWithWorkflow(
1223                    long creatorUserId, long companyId, boolean autoPassword,
1224                    java.lang.String password1, java.lang.String password2,
1225                    boolean autoScreenName, java.lang.String screenName,
1226                    java.lang.String emailAddress, long facebookId,
1227                    java.lang.String openId, java.util.Locale locale,
1228                    java.lang.String firstName, java.lang.String middleName,
1229                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
1230                    int birthdayMonth, int birthdayDay, int birthdayYear,
1231                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1232                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
1233                    com.liferay.portal.service.ServiceContext serviceContext)
1234                    throws com.liferay.portal.kernel.exception.PortalException,
1235                            com.liferay.portal.kernel.exception.SystemException {
1236                    return getService()
1237                                       .addUserWithWorkflow(creatorUserId, companyId, autoPassword,
1238                            password1, password2, autoScreenName, screenName, emailAddress,
1239                            facebookId, openId, locale, firstName, middleName, lastName,
1240                            prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
1241                            jobTitle, groupIds, organizationIds, roleIds, userGroupIds,
1242                            sendEmail, serviceContext);
1243            }
1244    
1245            /**
1246            * Attempts to authenticate the user by their email address and password,
1247            * while using the AuthPipeline.
1248            *
1249            * @param companyId the primary key of the user's company
1250            * @param emailAddress the user's email address
1251            * @param password the user's password
1252            * @param headerMap the header map from the authentication request
1253            * @param parameterMap the parameter map from the authentication request
1254            * @param resultsMap the map of authentication results (may be nil). After
1255            a succesful authentication the user's primary key will be placed
1256            under the key <code>userId</code>.
1257            * @return the authentication status. This can be {@link
1258            com.liferay.portal.security.auth.Authenticator#FAILURE}
1259            indicating that the user's credentials are invalid, {@link
1260            com.liferay.portal.security.auth.Authenticator#SUCCESS}
1261            indicating a successful login, or {@link
1262            com.liferay.portal.security.auth.Authenticator#DNE} indicating
1263            that a user with that login does not exist.
1264            * @throws PortalException if <code>emailAddress</code> or
1265            <code>password</code> was <code>null</code>
1266            * @throws SystemException if a system exception occurred
1267            * @see com.liferay.portal.security.auth.AuthPipeline
1268            */
1269            public static int authenticateByEmailAddress(long companyId,
1270                    java.lang.String emailAddress, java.lang.String password,
1271                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
1272                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1273                    java.util.Map<java.lang.String, java.lang.Object> resultsMap)
1274                    throws com.liferay.portal.kernel.exception.PortalException,
1275                            com.liferay.portal.kernel.exception.SystemException {
1276                    return getService()
1277                                       .authenticateByEmailAddress(companyId, emailAddress,
1278                            password, headerMap, parameterMap, resultsMap);
1279            }
1280    
1281            /**
1282            * Attempts to authenticate the user by their screen name and password,
1283            * while using the AuthPipeline.
1284            *
1285            * @param companyId the primary key of the user's company
1286            * @param screenName the user's screen name
1287            * @param password the user's password
1288            * @param headerMap the header map from the authentication request
1289            * @param parameterMap the parameter map from the authentication request
1290            * @param resultsMap the map of authentication results (may be nil). After
1291            a succesful authentication the user's primary key will be placed
1292            under the key <code>userId</code>.
1293            * @return the authentication status. This can be {@link
1294            com.liferay.portal.security.auth.Authenticator#FAILURE}
1295            indicating that the user's credentials are invalid, {@link
1296            com.liferay.portal.security.auth.Authenticator#SUCCESS}
1297            indicating a successful login, or {@link
1298            com.liferay.portal.security.auth.Authenticator#DNE} indicating
1299            that a user with that login does not exist.
1300            * @throws PortalException if <code>screenName</code> or
1301            <code>password</code> was <code>null</code>
1302            * @throws SystemException if a system exception occurred
1303            * @see com.liferay.portal.security.auth.AuthPipeline
1304            */
1305            public static int authenticateByScreenName(long companyId,
1306                    java.lang.String screenName, java.lang.String password,
1307                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
1308                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1309                    java.util.Map<java.lang.String, java.lang.Object> resultsMap)
1310                    throws com.liferay.portal.kernel.exception.PortalException,
1311                            com.liferay.portal.kernel.exception.SystemException {
1312                    return getService()
1313                                       .authenticateByScreenName(companyId, screenName, password,
1314                            headerMap, parameterMap, resultsMap);
1315            }
1316    
1317            /**
1318            * Attempts to authenticate the user by their primary key and password,
1319            * while using the AuthPipeline.
1320            *
1321            * @param companyId the primary key of the user's company
1322            * @param userId the user's primary key
1323            * @param password the user's password
1324            * @param headerMap the header map from the authentication request
1325            * @param parameterMap the parameter map from the authentication request
1326            * @param resultsMap the map of authentication results (may be nil). After
1327            a succesful authentication the user's primary key will be placed
1328            under the key <code>userId</code>.
1329            * @return the authentication status. This can be {@link
1330            com.liferay.portal.security.auth.Authenticator#FAILURE}
1331            indicating that the user's credentials are invalid, {@link
1332            com.liferay.portal.security.auth.Authenticator#SUCCESS}
1333            indicating a successful login, or {@link
1334            com.liferay.portal.security.auth.Authenticator#DNE} indicating
1335            that a user with that login does not exist.
1336            * @throws PortalException if <code>userId</code> or <code>password</code>
1337            was <code>null</code>
1338            * @throws SystemException if a system exception occurred
1339            * @see com.liferay.portal.security.auth.AuthPipeline
1340            */
1341            public static int authenticateByUserId(long companyId, long userId,
1342                    java.lang.String password,
1343                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
1344                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
1345                    java.util.Map<java.lang.String, java.lang.Object> resultsMap)
1346                    throws com.liferay.portal.kernel.exception.PortalException,
1347                            com.liferay.portal.kernel.exception.SystemException {
1348                    return getService()
1349                                       .authenticateByUserId(companyId, userId, password,
1350                            headerMap, parameterMap, resultsMap);
1351            }
1352    
1353            /**
1354            * Attempts to authenticate the user using HTTP basic access authentication,
1355            * without using the AuthPipeline. Primarily used for authenticating users
1356            * of <code>tunnel-web</code>.
1357            *
1358            * <p>
1359            * Authentication type specifies what <code>login</code> contains.The valid
1360            * values are:
1361            * </p>
1362            *
1363            * <ul>
1364            * <li>
1365            * <code>CompanyConstants.AUTH_TYPE_EA</code> - <code>login</code> is the
1366            * user's email address
1367            * </li>
1368            * <li>
1369            * <code>CompanyConstants.AUTH_TYPE_SN</code> - <code>login</code> is the
1370            * user's screen name
1371            * </li>
1372            * <li>
1373            * <code>CompanyConstants.AUTH_TYPE_ID</code> - <code>login</code> is the
1374            * user's primary key
1375            * </li>
1376            * </ul>
1377            *
1378            * @param companyId the primary key of the user's company
1379            * @param authType the type of authentication to perform
1380            * @param login either the user's email address, screen name, or primary
1381            key depending on the value of <code>authType</code>
1382            * @param password the user's password
1383            * @return the authentication status. This can be {@link
1384            com.liferay.portal.security.auth.Authenticator#FAILURE}
1385            indicating that the user's credentials are invalid, {@link
1386            com.liferay.portal.security.auth.Authenticator#SUCCESS}
1387            indicating a successful login, or {@link
1388            com.liferay.portal.security.auth.Authenticator#DNE} indicating
1389            that a user with that login does not exist.
1390            * @throws PortalException if a portal exception occurred
1391            * @throws SystemException if a system exception occurred
1392            */
1393            public static long authenticateForBasic(long companyId,
1394                    java.lang.String authType, java.lang.String login,
1395                    java.lang.String password)
1396                    throws com.liferay.portal.kernel.exception.PortalException,
1397                            com.liferay.portal.kernel.exception.SystemException {
1398                    return getService()
1399                                       .authenticateForBasic(companyId, authType, login, password);
1400            }
1401    
1402            /**
1403            * Attempts to authenticate the user using HTTP digest access
1404            * authentication, without using the AuthPipeline. Primarily used for
1405            * authenticating users of <code>tunnel-web</code>.
1406            *
1407            * @param companyId the primary key of the user's company
1408            * @param username either the user's email address, screen name, or primary
1409            key
1410            * @param realm unused
1411            * @param nonce the number used once
1412            * @param method the request method
1413            * @param uri the request URI
1414            * @param response the authentication response hash
1415            * @return the user's primary key if authentication is succesful;
1416            <code>0</code> otherwise
1417            * @throws PortalException if a portal exception occurred
1418            * @throws SystemException if a system exception occurred
1419            */
1420            public static long authenticateForDigest(long companyId,
1421                    java.lang.String username, java.lang.String realm,
1422                    java.lang.String nonce, java.lang.String method, java.lang.String uri,
1423                    java.lang.String response)
1424                    throws com.liferay.portal.kernel.exception.PortalException,
1425                            com.liferay.portal.kernel.exception.SystemException {
1426                    return getService()
1427                                       .authenticateForDigest(companyId, username, realm, nonce,
1428                            method, uri, response);
1429            }
1430    
1431            /**
1432            * Attempts to authenticate the user using JAAS credentials, without using
1433            * the AuthPipeline.
1434            *
1435            * @param userId the primary key of the user
1436            * @param encPassword the encrypted password
1437            * @return <code>true</code> if authentication is successful;
1438            <code>false</code> otherwise
1439            */
1440            public static boolean authenticateForJAAS(long userId,
1441                    java.lang.String encPassword) {
1442                    return getService().authenticateForJAAS(userId, encPassword);
1443            }
1444    
1445            /**
1446            * Checks if the user is currently locked out based on the password policy,
1447            * and performs maintenance on the user's lockout and failed login data.
1448            *
1449            * @param user the user
1450            * @throws PortalException if the user was determined to still be locked out
1451            * @throws SystemException if a system exception occurred
1452            */
1453            public static void checkLockout(com.liferay.portal.model.User user)
1454                    throws com.liferay.portal.kernel.exception.PortalException,
1455                            com.liferay.portal.kernel.exception.SystemException {
1456                    getService().checkLockout(user);
1457            }
1458    
1459            /**
1460            * Adds a failed login attempt to the user and updates the user's last
1461            * failed login date.
1462            *
1463            * @param user the user
1464            * @throws SystemException if a system exception occurred
1465            */
1466            public static void checkLoginFailure(com.liferay.portal.model.User user)
1467                    throws com.liferay.portal.kernel.exception.SystemException {
1468                    getService().checkLoginFailure(user);
1469            }
1470    
1471            /**
1472            * Adds a failed login attempt to the user with the email address and
1473            * updates the user's last failed login date.
1474            *
1475            * @param companyId the primary key of the user's company
1476            * @param emailAddress the user's email address
1477            * @throws PortalException if a user with the email address could not be
1478            found
1479            * @throws SystemException if a system exception occurred
1480            */
1481            public static void checkLoginFailureByEmailAddress(long companyId,
1482                    java.lang.String emailAddress)
1483                    throws com.liferay.portal.kernel.exception.PortalException,
1484                            com.liferay.portal.kernel.exception.SystemException {
1485                    getService().checkLoginFailureByEmailAddress(companyId, emailAddress);
1486            }
1487    
1488            /**
1489            * Adds a failed login attempt to the user and updates the user's last
1490            * failed login date.
1491            *
1492            * @param userId the primary key of the user
1493            * @throws PortalException if a user with the primary key could not be found
1494            * @throws SystemException if a system exception occurred
1495            */
1496            public static void checkLoginFailureById(long userId)
1497                    throws com.liferay.portal.kernel.exception.PortalException,
1498                            com.liferay.portal.kernel.exception.SystemException {
1499                    getService().checkLoginFailureById(userId);
1500            }
1501    
1502            /**
1503            * Adds a failed login attempt to the user with the screen name and updates
1504            * the user's last failed login date.
1505            *
1506            * @param companyId the primary key of the user's company
1507            * @param screenName the user's screen name
1508            * @throws PortalException if a user with the screen name could not be found
1509            * @throws SystemException if a system exception occurred
1510            */
1511            public static void checkLoginFailureByScreenName(long companyId,
1512                    java.lang.String screenName)
1513                    throws com.liferay.portal.kernel.exception.PortalException,
1514                            com.liferay.portal.kernel.exception.SystemException {
1515                    getService().checkLoginFailureByScreenName(companyId, screenName);
1516            }
1517    
1518            /**
1519            * Checks if the user's password is expired based on the password policy,
1520            * and performs maintenance on the user's grace login and password reset
1521            * data.
1522            *
1523            * @param user the user
1524            * @throws PortalException if the user's password has expired and the grace
1525            login limit has been exceeded
1526            * @throws SystemException if a system exception occurred
1527            */
1528            public static void checkPasswordExpired(com.liferay.portal.model.User user)
1529                    throws com.liferay.portal.kernel.exception.PortalException,
1530                            com.liferay.portal.kernel.exception.SystemException {
1531                    getService().checkPasswordExpired(user);
1532            }
1533    
1534            /**
1535            * Completes the user's registration by generating a password and sending
1536            * the confirmation email.
1537            *
1538            * @param user the user
1539            * @param serviceContext the service context to be applied. Can set whether
1540            a password should be generated (with the
1541            <code>autoPassword</code> attribute) and whether the confirmation
1542            email should be sent (with the <code>sendEmail</code> attribute)
1543            for the user.
1544            * @throws PortalException if a portal exception occurred
1545            * @throws SystemException if a system exception occurred
1546            */
1547            public static void completeUserRegistration(
1548                    com.liferay.portal.model.User user,
1549                    com.liferay.portal.service.ServiceContext serviceContext)
1550                    throws com.liferay.portal.kernel.exception.PortalException,
1551                            com.liferay.portal.kernel.exception.SystemException {
1552                    getService().completeUserRegistration(user, serviceContext);
1553            }
1554    
1555            /**
1556            * Decrypts the user's primary key and password from their encrypted forms.
1557            * Used for decrypting a user's credentials from the values stored in an
1558            * automatic login cookie.
1559            *
1560            * @param companyId the primary key of the user's company
1561            * @param name the encrypted primary key of the user
1562            * @param password the encrypted password of the user
1563            * @return the user's primary key and password
1564            * @throws PortalException if a user with the primary key could not be found
1565            or if the user's password was incorrect
1566            * @throws SystemException if a system exception occurred
1567            */
1568            public static com.liferay.portal.kernel.util.KeyValuePair decryptUserId(
1569                    long companyId, java.lang.String name, java.lang.String password)
1570                    throws com.liferay.portal.kernel.exception.PortalException,
1571                            com.liferay.portal.kernel.exception.SystemException {
1572                    return getService().decryptUserId(companyId, name, password);
1573            }
1574    
1575            /**
1576            * Deletes the user's portrait image.
1577            *
1578            * @param userId the primary key of the user
1579            * @throws PortalException if a user with the primary key could not be found
1580            or if the user's portrait could not be found
1581            * @throws SystemException if a system exception occurred
1582            */
1583            public static void deletePortrait(long userId)
1584                    throws com.liferay.portal.kernel.exception.PortalException,
1585                            com.liferay.portal.kernel.exception.SystemException {
1586                    getService().deletePortrait(userId);
1587            }
1588    
1589            /**
1590            * Encrypts the primary key of the user. Used when encrypting the user's
1591            * credentials for storage in an automatic login cookie.
1592            *
1593            * @param name the primary key of the user
1594            * @return the user's encrypted primary key
1595            * @throws PortalException if a user with the primary key could not be found
1596            * @throws SystemException if a system exception occurred
1597            */
1598            public static java.lang.String encryptUserId(java.lang.String name)
1599                    throws com.liferay.portal.kernel.exception.PortalException,
1600                            com.liferay.portal.kernel.exception.SystemException {
1601                    return getService().encryptUserId(name);
1602            }
1603    
1604            /**
1605            * Returns the user with the email address.
1606            *
1607            * @param companyId the primary key of the user's company
1608            * @param emailAddress the user's email address
1609            * @return the user with the email address, or <code>null</code> if a user
1610            with the email address could not be found
1611            * @throws SystemException if a system exception occurred
1612            */
1613            public static com.liferay.portal.model.User fetchUserByEmailAddress(
1614                    long companyId, java.lang.String emailAddress)
1615                    throws com.liferay.portal.kernel.exception.SystemException {
1616                    return getService().fetchUserByEmailAddress(companyId, emailAddress);
1617            }
1618    
1619            /**
1620            * Returns the user with the Facebook ID.
1621            *
1622            * @param companyId the primary key of the user's company
1623            * @param facebookId the user's Facebook ID
1624            * @return the user with the Facebook ID, or <code>null</code> if a user
1625            with the Facebook ID could not be found
1626            * @throws SystemException if a system exception occurred
1627            */
1628            public static com.liferay.portal.model.User fetchUserByFacebookId(
1629                    long companyId, long facebookId)
1630                    throws com.liferay.portal.kernel.exception.SystemException {
1631                    return getService().fetchUserByFacebookId(companyId, facebookId);
1632            }
1633    
1634            /**
1635            * Returns the user with the primary key.
1636            *
1637            * @param userId the primary key of the user
1638            * @return the user with the primary key, or <code>null</code> if a user
1639            with the primary key could not be found
1640            * @throws SystemException if a system exception occurred
1641            */
1642            public static com.liferay.portal.model.User fetchUserById(long userId)
1643                    throws com.liferay.portal.kernel.exception.SystemException {
1644                    return getService().fetchUserById(userId);
1645            }
1646    
1647            /**
1648            * Returns the user with the OpenID.
1649            *
1650            * @param companyId the primary key of the user's company
1651            * @param openId the user's OpenID
1652            * @return the user with the OpenID, or <code>null</code> if a user with the
1653            OpenID could not be found
1654            * @throws SystemException if a system exception occurred
1655            */
1656            public static com.liferay.portal.model.User fetchUserByOpenId(
1657                    long companyId, java.lang.String openId)
1658                    throws com.liferay.portal.kernel.exception.SystemException {
1659                    return getService().fetchUserByOpenId(companyId, openId);
1660            }
1661    
1662            /**
1663            * Returns the user with the screen name.
1664            *
1665            * @param companyId the primary key of the user's company
1666            * @param screenName the user's screen name
1667            * @return the user with the screen name, or <code>null</code> if a user
1668            with the screen name could not be found
1669            * @throws SystemException if a system exception occurred
1670            */
1671            public static com.liferay.portal.model.User fetchUserByScreenName(
1672                    long companyId, java.lang.String screenName)
1673                    throws com.liferay.portal.kernel.exception.SystemException {
1674                    return getService().fetchUserByScreenName(companyId, screenName);
1675            }
1676    
1677            /**
1678            * Returns a range of all the users belonging to the company.
1679            *
1680            * <p>
1681            * Useful when paginating results. Returns a maximum of <code>end -
1682            * start</code> instances. <code>start</code> and <code>end</code> are not
1683            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1684            * refers to the first result in the set. Setting both <code>start</code>
1685            * and <code>end</code> to {@link
1686            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1687            * result set.
1688            * </p>
1689            *
1690            * @param companyId the primary key of the company
1691            * @param start the lower bound of the range of users
1692            * @param end the upper bound of the range of users (not inclusive)
1693            * @return the range of users belonging to the company
1694            * @throws SystemException if a system exception occurred
1695            */
1696            public static java.util.List<com.liferay.portal.model.User> getCompanyUsers(
1697                    long companyId, int start, int end)
1698                    throws com.liferay.portal.kernel.exception.SystemException {
1699                    return getService().getCompanyUsers(companyId, start, end);
1700            }
1701    
1702            /**
1703            * Returns the number of users belonging to the company.
1704            *
1705            * @param companyId the primary key of the company
1706            * @return the number of users belonging to the company
1707            * @throws SystemException if a system exception occurred
1708            */
1709            public static int getCompanyUsersCount(long companyId)
1710                    throws com.liferay.portal.kernel.exception.SystemException {
1711                    return getService().getCompanyUsersCount(companyId);
1712            }
1713    
1714            /**
1715            * Returns the default user for the company.
1716            *
1717            * @param companyId the primary key of the company
1718            * @return the default user for the company
1719            * @throws PortalException if a default user for the company could not be
1720            found
1721            * @throws SystemException if a system exception occurred
1722            */
1723            public static com.liferay.portal.model.User getDefaultUser(long companyId)
1724                    throws com.liferay.portal.kernel.exception.PortalException,
1725                            com.liferay.portal.kernel.exception.SystemException {
1726                    return getService().getDefaultUser(companyId);
1727            }
1728    
1729            /**
1730            * Returns the primary key of the default user for the company.
1731            *
1732            * @param companyId the primary key of the company
1733            * @return the primary key of the default user for the company
1734            * @throws PortalException if a default user for the company could not be
1735            found
1736            * @throws SystemException if a system exception occurred
1737            */
1738            public static long getDefaultUserId(long companyId)
1739                    throws com.liferay.portal.kernel.exception.PortalException,
1740                            com.liferay.portal.kernel.exception.SystemException {
1741                    return getService().getDefaultUserId(companyId);
1742            }
1743    
1744            /**
1745            * Returns the primary keys of all the users belonging to the group.
1746            *
1747            * @param groupId the primary key of the group
1748            * @return the primary keys of the users belonging to the group
1749            * @throws SystemException if a system exception occurred
1750            */
1751            public static long[] getGroupUserIds(long groupId)
1752                    throws com.liferay.portal.kernel.exception.SystemException {
1753                    return getService().getGroupUserIds(groupId);
1754            }
1755    
1756            /**
1757            * Returns the number of users with the status belonging to the group.
1758            *
1759            * @param groupId the primary key of the group
1760            * @param status the workflow status
1761            * @return the number of users with the status belonging to the group
1762            * @throws PortalException if a group with the primary key could not be
1763            found
1764            * @throws SystemException if a system exception occurred
1765            */
1766            public static int getGroupUsersCount(long groupId, int status)
1767                    throws com.liferay.portal.kernel.exception.PortalException,
1768                            com.liferay.portal.kernel.exception.SystemException {
1769                    return getService().getGroupUsersCount(groupId, status);
1770            }
1771    
1772            public static java.util.List<com.liferay.portal.model.User> getInheritedRoleUsers(
1773                    long roleId, int start, int end,
1774                    com.liferay.portal.kernel.util.OrderByComparator obc)
1775                    throws com.liferay.portal.kernel.exception.PortalException,
1776                            com.liferay.portal.kernel.exception.SystemException {
1777                    return getService().getInheritedRoleUsers(roleId, start, end, obc);
1778            }
1779    
1780            /**
1781            * Returns all the users who have not had any announcements of the type
1782            * delivered, excluding the default user.
1783            *
1784            * @param type the type of announcement
1785            * @return the users who have not had any annoucements of the type delivered
1786            * @throws SystemException if a system exception occurred
1787            */
1788            public static java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries(
1789                    java.lang.String type)
1790                    throws com.liferay.portal.kernel.exception.SystemException {
1791                    return getService().getNoAnnouncementsDeliveries(type);
1792            }
1793    
1794            /**
1795            * Returns all the users who do not have any contacts.
1796            *
1797            * @return the users who do not have any contacts
1798            * @throws SystemException if a system exception occurred
1799            */
1800            public static java.util.List<com.liferay.portal.model.User> getNoContacts()
1801                    throws com.liferay.portal.kernel.exception.SystemException {
1802                    return getService().getNoContacts();
1803            }
1804    
1805            /**
1806            * Returns all the users who do not belong to any groups, excluding the
1807            * default user.
1808            *
1809            * @return the users who do not belong to any groups
1810            * @throws SystemException if a system exception occurred
1811            */
1812            public static java.util.List<com.liferay.portal.model.User> getNoGroups()
1813                    throws com.liferay.portal.kernel.exception.SystemException {
1814                    return getService().getNoGroups();
1815            }
1816    
1817            /**
1818            * Returns the primary keys of all the users belonging to the organization.
1819            *
1820            * @param organizationId the primary key of the organization
1821            * @return the primary keys of the users belonging to the organization
1822            * @throws SystemException if a system exception occurred
1823            */
1824            public static long[] getOrganizationUserIds(long organizationId)
1825                    throws com.liferay.portal.kernel.exception.SystemException {
1826                    return getService().getOrganizationUserIds(organizationId);
1827            }
1828    
1829            /**
1830            * Returns the number of users with the status belonging to the
1831            * organization.
1832            *
1833            * @param organizationId the primary key of the organization
1834            * @param status the workflow status
1835            * @return the number of users with the status belonging to the organization
1836            * @throws PortalException if an organization with the primary key could not
1837            be found
1838            * @throws SystemException if a system exception occurred
1839            */
1840            public static int getOrganizationUsersCount(long organizationId, int status)
1841                    throws com.liferay.portal.kernel.exception.PortalException,
1842                            com.liferay.portal.kernel.exception.SystemException {
1843                    return getService().getOrganizationUsersCount(organizationId, status);
1844            }
1845    
1846            /**
1847            * Returns the primary keys of all the users belonging to the role.
1848            *
1849            * @param roleId the primary key of the role
1850            * @return the primary keys of the users belonging to the role
1851            * @throws SystemException if a system exception occurred
1852            */
1853            public static long[] getRoleUserIds(long roleId)
1854                    throws com.liferay.portal.kernel.exception.SystemException {
1855                    return getService().getRoleUserIds(roleId);
1856            }
1857    
1858            /**
1859            * Returns the number of users with the status belonging to the role.
1860            *
1861            * @param roleId the primary key of the role
1862            * @param status the workflow status
1863            * @return the number of users with the status belonging to the role
1864            * @throws PortalException if an role with the primary key could not be
1865            found
1866            * @throws SystemException if a system exception occurred
1867            */
1868            public static int getRoleUsersCount(long roleId, int status)
1869                    throws com.liferay.portal.kernel.exception.PortalException,
1870                            com.liferay.portal.kernel.exception.SystemException {
1871                    return getService().getRoleUsersCount(roleId, status);
1872            }
1873    
1874            /**
1875            * Returns an ordered range of all the users with a social relation of the
1876            * type with the user.
1877            *
1878            * <p>
1879            * Useful when paginating results. Returns a maximum of <code>end -
1880            * start</code> instances. <code>start</code> and <code>end</code> are not
1881            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1882            * refers to the first result in the set. Setting both <code>start</code>
1883            * and <code>end</code> to {@link
1884            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1885            * result set.
1886            * </p>
1887            *
1888            * @param userId the primary key of the user
1889            * @param type the type of social relation. The possible types can be found
1890            in {@link
1891            com.liferay.portlet.social.model.SocialRelationConstants}.
1892            * @param start the lower bound of the range of users
1893            * @param end the upper bound of the range of users (not inclusive)
1894            * @param obc the comparator to order the users by (optionally
1895            <code>null</code>)
1896            * @return the ordered range of users with a social relation of the type
1897            with the user
1898            * @throws PortalException if a user with the primary key could not be found
1899            * @throws SystemException if a system exception occurred
1900            */
1901            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
1902                    long userId, int type, int start, int end,
1903                    com.liferay.portal.kernel.util.OrderByComparator obc)
1904                    throws com.liferay.portal.kernel.exception.PortalException,
1905                            com.liferay.portal.kernel.exception.SystemException {
1906                    return getService().getSocialUsers(userId, type, start, end, obc);
1907            }
1908    
1909            /**
1910            * Returns an ordered range of all the users with a social relation with the
1911            * user.
1912            *
1913            * <p>
1914            * Useful when paginating results. Returns a maximum of <code>end -
1915            * start</code> instances. <code>start</code> and <code>end</code> are not
1916            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1917            * refers to the first result in the set. Setting both <code>start</code>
1918            * and <code>end</code> to {@link
1919            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1920            * result set.
1921            * </p>
1922            *
1923            * @param userId the primary key of the user
1924            * @param start the lower bound of the range of users
1925            * @param end the upper bound of the range of users (not inclusive)
1926            * @param obc the comparator to order the users by (optionally
1927            <code>null</code>)
1928            * @return the ordered range of users with a social relation with the user
1929            * @throws PortalException if a user with the primary key could not be found
1930            * @throws SystemException if a system exception occurred
1931            */
1932            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
1933                    long userId, int start, int end,
1934                    com.liferay.portal.kernel.util.OrderByComparator obc)
1935                    throws com.liferay.portal.kernel.exception.PortalException,
1936                            com.liferay.portal.kernel.exception.SystemException {
1937                    return getService().getSocialUsers(userId, start, end, obc);
1938            }
1939    
1940            /**
1941            * Returns an ordered range of all the users with a mutual social relation
1942            * of the type with both of the given users.
1943            *
1944            * <p>
1945            * Useful when paginating results. Returns a maximum of <code>end -
1946            * start</code> instances. <code>start</code> and <code>end</code> are not
1947            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1948            * refers to the first result in the set. Setting both <code>start</code>
1949            * and <code>end</code> to {@link
1950            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1951            * result set.
1952            * </p>
1953            *
1954            * @param userId1 the primary key of the first user
1955            * @param userId2 the primary key of the second user
1956            * @param type the type of social relation. The possible types can be found
1957            in {@link
1958            com.liferay.portlet.social.model.SocialRelationConstants}.
1959            * @param start the lower bound of the range of users
1960            * @param end the upper bound of the range of users (not inclusive)
1961            * @param obc the comparator to order the users by (optionally
1962            <code>null</code>)
1963            * @return the ordered range of users with a mutual social relation of the
1964            type with the user
1965            * @throws PortalException if a user with the primary key could not be found
1966            * @throws SystemException if a system exception occurred
1967            */
1968            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
1969                    long userId1, long userId2, int type, int start, int end,
1970                    com.liferay.portal.kernel.util.OrderByComparator obc)
1971                    throws com.liferay.portal.kernel.exception.PortalException,
1972                            com.liferay.portal.kernel.exception.SystemException {
1973                    return getService()
1974                                       .getSocialUsers(userId1, userId2, type, start, end, obc);
1975            }
1976    
1977            /**
1978            * Returns an ordered range of all the users with a mutual social relation
1979            * with both of the given users.
1980            *
1981            * <p>
1982            * Useful when paginating results. Returns a maximum of <code>end -
1983            * start</code> instances. <code>start</code> and <code>end</code> are not
1984            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1985            * refers to the first result in the set. Setting both <code>start</code>
1986            * and <code>end</code> to {@link
1987            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1988            * result set.
1989            * </p>
1990            *
1991            * @param userId1 the primary key of the first user
1992            * @param userId2 the primary key of the second user
1993            * @param start the lower bound of the range of users
1994            * @param end the upper bound of the range of users (not inclusive)
1995            * @param obc the comparator to order the users by (optionally
1996            <code>null</code>)
1997            * @return the ordered range of users with a mutual social relation with the
1998            user
1999            * @throws PortalException if a user with the primary key could not be found
2000            * @throws SystemException if a system exception occurred
2001            */
2002            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
2003                    long userId1, long userId2, int start, int end,
2004                    com.liferay.portal.kernel.util.OrderByComparator obc)
2005                    throws com.liferay.portal.kernel.exception.PortalException,
2006                            com.liferay.portal.kernel.exception.SystemException {
2007                    return getService().getSocialUsers(userId1, userId2, start, end, obc);
2008            }
2009    
2010            /**
2011            * Returns the number of users with a social relation with the user.
2012            *
2013            * @param userId the primary key of the user
2014            * @return the number of users with a social relation with the user
2015            * @throws PortalException if a user with the primary key could not be found
2016            * @throws SystemException if a system exception occurred
2017            */
2018            public static int getSocialUsersCount(long userId)
2019                    throws com.liferay.portal.kernel.exception.PortalException,
2020                            com.liferay.portal.kernel.exception.SystemException {
2021                    return getService().getSocialUsersCount(userId);
2022            }
2023    
2024            /**
2025            * Returns the number of users with a social relation of the type with the
2026            * user.
2027            *
2028            * @param userId the primary key of the user
2029            * @param type the type of social relation. The possible types can be found
2030            in {@link
2031            com.liferay.portlet.social.model.SocialRelationConstants}.
2032            * @return the number of users with a social relation of the type with the
2033            user
2034            * @throws PortalException if a user with the primary key could not be found
2035            * @throws SystemException if a system exception occurred
2036            */
2037            public static int getSocialUsersCount(long userId, int type)
2038                    throws com.liferay.portal.kernel.exception.PortalException,
2039                            com.liferay.portal.kernel.exception.SystemException {
2040                    return getService().getSocialUsersCount(userId, type);
2041            }
2042    
2043            /**
2044            * Returns the number of users with a mutual social relation with both of
2045            * the given users.
2046            *
2047            * @param userId1 the primary key of the first user
2048            * @param userId2 the primary key of the second user
2049            * @return the number of users with a mutual social relation with the user
2050            * @throws PortalException if a user with the primary key could not be found
2051            * @throws SystemException if a system exception occurred
2052            */
2053            public static int getSocialUsersCount(long userId1, long userId2)
2054                    throws com.liferay.portal.kernel.exception.PortalException,
2055                            com.liferay.portal.kernel.exception.SystemException {
2056                    return getService().getSocialUsersCount(userId1, userId2);
2057            }
2058    
2059            /**
2060            * Returns the number of users with a mutual social relation of the type
2061            * with both of the given users.
2062            *
2063            * @param userId1 the primary key of the first user
2064            * @param userId2 the primary key of the second user
2065            * @param type the type of social relation. The possible types can be found
2066            in {@link
2067            com.liferay.portlet.social.model.SocialRelationConstants}.
2068            * @return the number of users with a mutual social relation of the type
2069            with the user
2070            * @throws PortalException if a user with the primary key could not be found
2071            * @throws SystemException if a system exception occurred
2072            */
2073            public static int getSocialUsersCount(long userId1, long userId2, int type)
2074                    throws com.liferay.portal.kernel.exception.PortalException,
2075                            com.liferay.portal.kernel.exception.SystemException {
2076                    return getService().getSocialUsersCount(userId1, userId2, type);
2077            }
2078    
2079            /**
2080            * Returns the user with the contact ID.
2081            *
2082            * @param contactId the user's contact ID
2083            * @return the user with the contact ID
2084            * @throws PortalException if a user with the contact ID could not be found
2085            * @throws SystemException if a system exception occurred
2086            */
2087            public static com.liferay.portal.model.User getUserByContactId(
2088                    long contactId)
2089                    throws com.liferay.portal.kernel.exception.PortalException,
2090                            com.liferay.portal.kernel.exception.SystemException {
2091                    return getService().getUserByContactId(contactId);
2092            }
2093    
2094            /**
2095            * Returns the user with the email address.
2096            *
2097            * @param companyId the primary key of the user's company
2098            * @param emailAddress the user's email address
2099            * @return the user with the email address
2100            * @throws PortalException if a user with the email address could not be
2101            found
2102            * @throws SystemException if a system exception occurred
2103            */
2104            public static com.liferay.portal.model.User getUserByEmailAddress(
2105                    long companyId, java.lang.String emailAddress)
2106                    throws com.liferay.portal.kernel.exception.PortalException,
2107                            com.liferay.portal.kernel.exception.SystemException {
2108                    return getService().getUserByEmailAddress(companyId, emailAddress);
2109            }
2110    
2111            /**
2112            * Returns the user with the Facebook ID.
2113            *
2114            * @param companyId the primary key of the user's company
2115            * @param facebookId the user's Facebook ID
2116            * @return the user with the Facebook ID
2117            * @throws PortalException if a user with the Facebook ID could not be found
2118            * @throws SystemException if a system exception occurred
2119            */
2120            public static com.liferay.portal.model.User getUserByFacebookId(
2121                    long companyId, long facebookId)
2122                    throws com.liferay.portal.kernel.exception.PortalException,
2123                            com.liferay.portal.kernel.exception.SystemException {
2124                    return getService().getUserByFacebookId(companyId, facebookId);
2125            }
2126    
2127            /**
2128            * Returns the user with the primary key.
2129            *
2130            * @param userId the primary key of the user
2131            * @return the user with the primary key
2132            * @throws PortalException if a user with the primary key could not be found
2133            * @throws SystemException if a system exception occurred
2134            */
2135            public static com.liferay.portal.model.User getUserById(long userId)
2136                    throws com.liferay.portal.kernel.exception.PortalException,
2137                            com.liferay.portal.kernel.exception.SystemException {
2138                    return getService().getUserById(userId);
2139            }
2140    
2141            /**
2142            * Returns the user with the primary key from the company.
2143            *
2144            * @param companyId the primary key of the user's company
2145            * @param userId the primary key of the user
2146            * @return the user with the primary key
2147            * @throws PortalException if a user with the primary key from the company
2148            could not be found
2149            * @throws SystemException if a system exception occurred
2150            */
2151            public static com.liferay.portal.model.User getUserById(long companyId,
2152                    long userId)
2153                    throws com.liferay.portal.kernel.exception.PortalException,
2154                            com.liferay.portal.kernel.exception.SystemException {
2155                    return getService().getUserById(companyId, userId);
2156            }
2157    
2158            /**
2159            * Returns the user with the OpenID.
2160            *
2161            * @param companyId the primary key of the user's company
2162            * @param openId the user's OpenID
2163            * @return the user with the OpenID
2164            * @throws PortalException if a user with the OpenID could not be found
2165            * @throws SystemException if a system exception occurred
2166            */
2167            public static com.liferay.portal.model.User getUserByOpenId(
2168                    long companyId, java.lang.String openId)
2169                    throws com.liferay.portal.kernel.exception.PortalException,
2170                            com.liferay.portal.kernel.exception.SystemException {
2171                    return getService().getUserByOpenId(companyId, openId);
2172            }
2173    
2174            /**
2175            * Returns the user with the portrait ID.
2176            *
2177            * @param portraitId the user's portrait ID
2178            * @return the user with the portrait ID
2179            * @throws PortalException if a user with the portrait ID could not be found
2180            * @throws SystemException if a system exception occurred
2181            */
2182            public static com.liferay.portal.model.User getUserByPortraitId(
2183                    long portraitId)
2184                    throws com.liferay.portal.kernel.exception.PortalException,
2185                            com.liferay.portal.kernel.exception.SystemException {
2186                    return getService().getUserByPortraitId(portraitId);
2187            }
2188    
2189            /**
2190            * Returns the user with the screen name.
2191            *
2192            * @param companyId the primary key of the user's company
2193            * @param screenName the user's screen name
2194            * @return the user with the screen name
2195            * @throws PortalException if a user with the screen name could not be found
2196            * @throws SystemException if a system exception occurred
2197            */
2198            public static com.liferay.portal.model.User getUserByScreenName(
2199                    long companyId, java.lang.String screenName)
2200                    throws com.liferay.portal.kernel.exception.PortalException,
2201                            com.liferay.portal.kernel.exception.SystemException {
2202                    return getService().getUserByScreenName(companyId, screenName);
2203            }
2204    
2205            /**
2206            * Returns the user with the UUID.
2207            *
2208            * @param uuid the user's UUID
2209            * @return the user with the UUID
2210            * @throws PortalException if a user with the UUID could not be found
2211            * @throws SystemException if a system exception occurred
2212            * @deprecated As of 6.2.0, replaced by {@link
2213            #getUserByUuidAndCompanyId(String, long)}
2214            */
2215            public static com.liferay.portal.model.User getUserByUuid(
2216                    java.lang.String uuid)
2217                    throws com.liferay.portal.kernel.exception.PortalException,
2218                            com.liferay.portal.kernel.exception.SystemException {
2219                    return getService().getUserByUuid(uuid);
2220            }
2221    
2222            /**
2223            * Returns the number of users with the status belonging to the user group.
2224            *
2225            * @param userGroupId the primary key of the user group
2226            * @param status the workflow status
2227            * @return the number of users with the status belonging to the user group
2228            * @throws PortalException if a user group with the primary key could not be
2229            found
2230            * @throws SystemException if a system exception occurred
2231            */
2232            public static int getUserGroupUsersCount(long userGroupId, int status)
2233                    throws com.liferay.portal.kernel.exception.PortalException,
2234                            com.liferay.portal.kernel.exception.SystemException {
2235                    return getService().getUserGroupUsersCount(userGroupId, status);
2236            }
2237    
2238            /**
2239            * Returns the primary key of the user with the email address.
2240            *
2241            * @param companyId the primary key of the user's company
2242            * @param emailAddress the user's email address
2243            * @return the primary key of the user with the email address
2244            * @throws PortalException if a user with the email address could not be
2245            found
2246            * @throws SystemException if a system exception occurred
2247            */
2248            public static long getUserIdByEmailAddress(long companyId,
2249                    java.lang.String emailAddress)
2250                    throws com.liferay.portal.kernel.exception.PortalException,
2251                            com.liferay.portal.kernel.exception.SystemException {
2252                    return getService().getUserIdByEmailAddress(companyId, emailAddress);
2253            }
2254    
2255            /**
2256            * Returns the primary key of the user with the screen name.
2257            *
2258            * @param companyId the primary key of the user's company
2259            * @param screenName the user's screen name
2260            * @return the primary key of the user with the screen name
2261            * @throws PortalException if a user with the screen name could not be found
2262            * @throws SystemException if a system exception occurred
2263            */
2264            public static long getUserIdByScreenName(long companyId,
2265                    java.lang.String screenName)
2266                    throws com.liferay.portal.kernel.exception.PortalException,
2267                            com.liferay.portal.kernel.exception.SystemException {
2268                    return getService().getUserIdByScreenName(companyId, screenName);
2269            }
2270    
2271            /**
2272            * Returns <code>true</code> if the password policy has been assigned to the
2273            * user.
2274            *
2275            * @param passwordPolicyId the primary key of the password policy
2276            * @param userId the primary key of the user
2277            * @return <code>true</code> if the password policy is assigned to the user;
2278            <code>false</code> otherwise
2279            * @throws SystemException if a system exception occurred
2280            */
2281            public static boolean hasPasswordPolicyUser(long passwordPolicyId,
2282                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
2283                    return getService().hasPasswordPolicyUser(passwordPolicyId, userId);
2284            }
2285    
2286            /**
2287            * Returns <code>true</code> if the user has the role with the name,
2288            * optionally through inheritance.
2289            *
2290            * @param companyId the primary key of the role's company
2291            * @param name the name of the role (must be a regular role, not an
2292            organization, site or provider role)
2293            * @param userId the primary key of the user
2294            * @param inherited whether to include roles inherited from organizations,
2295            sites, etc.
2296            * @return <code>true</code> if the user has the role; <code>false</code>
2297            otherwise
2298            * @throws PortalException if a role with the name could not be found
2299            * @throws SystemException if a system exception occurred
2300            */
2301            public static boolean hasRoleUser(long companyId, java.lang.String name,
2302                    long userId, boolean inherited)
2303                    throws com.liferay.portal.kernel.exception.PortalException,
2304                            com.liferay.portal.kernel.exception.SystemException {
2305                    return getService().hasRoleUser(companyId, name, userId, inherited);
2306            }
2307    
2308            /**
2309            * Returns <code>true</code> if the user's password is expired.
2310            *
2311            * @param user the user
2312            * @return <code>true</code> if the user's password is expired;
2313            <code>false</code> otherwise
2314            * @throws PortalException if the password policy for the user could not be
2315            found
2316            * @throws SystemException if a system exception occurred
2317            */
2318            public static boolean isPasswordExpired(com.liferay.portal.model.User user)
2319                    throws com.liferay.portal.kernel.exception.PortalException,
2320                            com.liferay.portal.kernel.exception.SystemException {
2321                    return getService().isPasswordExpired(user);
2322            }
2323    
2324            /**
2325            * Returns <code>true</code> if the password policy is configured to warn
2326            * the user that his password is expiring and the remaining time until
2327            * expiration is equal or less than the configured warning time.
2328            *
2329            * @param user the user
2330            * @return <code>true</code> if the user's password is expiring soon;
2331            <code>false</code> otherwise
2332            * @throws PortalException if the password policy for the user could not be
2333            found
2334            * @throws SystemException if a system exception occurred
2335            */
2336            public static boolean isPasswordExpiringSoon(
2337                    com.liferay.portal.model.User user)
2338                    throws com.liferay.portal.kernel.exception.PortalException,
2339                            com.liferay.portal.kernel.exception.SystemException {
2340                    return getService().isPasswordExpiringSoon(user);
2341            }
2342    
2343            /**
2344            * Returns the default user for the company.
2345            *
2346            * @param companyId the primary key of the company
2347            * @return the default user for the company
2348            * @throws PortalException if the user could not be found
2349            * @throws SystemException if a system exception occurred
2350            */
2351            public static com.liferay.portal.model.User loadGetDefaultUser(
2352                    long companyId)
2353                    throws com.liferay.portal.kernel.exception.PortalException,
2354                            com.liferay.portal.kernel.exception.SystemException {
2355                    return getService().loadGetDefaultUser(companyId);
2356            }
2357    
2358            /**
2359            * Returns an ordered range of all the users who match the keywords and
2360            * status, without using the indexer. It is preferable to use the indexed
2361            * version {@link #search(long, String, int, LinkedHashMap, int, int, Sort)}
2362            * instead of this method wherever possible for performance reasons.
2363            *
2364            * <p>
2365            * Useful when paginating results. Returns a maximum of <code>end -
2366            * start</code> instances. <code>start</code> and <code>end</code> are not
2367            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2368            * refers to the first result in the set. Setting both <code>start</code>
2369            * and <code>end</code> to {@link
2370            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2371            * result set.
2372            * </p>
2373            *
2374            * @param companyId the primary key of the user's company
2375            * @param keywords the keywords (space separated), which may occur in the
2376            user's first name, middle name, last name, screen name, or email
2377            address
2378            * @param status the workflow status
2379            * @param params the finder parameters (optionally <code>null</code>). For
2380            more information see {@link
2381            com.liferay.portal.service.persistence.UserFinder}.
2382            * @param start the lower bound of the range of users
2383            * @param end the upper bound of the range of users (not inclusive)
2384            * @param obc the comparator to order the users by (optionally
2385            <code>null</code>)
2386            * @return the matching users
2387            * @throws SystemException if a system exception occurred
2388            * @see com.liferay.portal.service.persistence.UserFinder
2389            */
2390            public static java.util.List<com.liferay.portal.model.User> search(
2391                    long companyId, java.lang.String keywords, int status,
2392                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2393                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
2394                    throws com.liferay.portal.kernel.exception.SystemException {
2395                    return getService()
2396                                       .search(companyId, keywords, status, params, start, end, obc);
2397            }
2398    
2399            /**
2400            * Returns an ordered range of all the users who match the keywords and
2401            * status, using the indexer. It is preferable to use this method instead of
2402            * the non-indexed version whenever possible for performance reasons.
2403            *
2404            * <p>
2405            * Useful when paginating results. Returns a maximum of <code>end -
2406            * start</code> instances. <code>start</code> and <code>end</code> are not
2407            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2408            * refers to the first result in the set. Setting both <code>start</code>
2409            * and <code>end</code> to {@link
2410            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2411            * result set.
2412            * </p>
2413            *
2414            * @param companyId the primary key of the user's company
2415            * @param keywords the keywords (space separated), which may occur in the
2416            user's first name, middle name, last name, screen name, or email
2417            address
2418            * @param status the workflow status
2419            * @param params the indexer parameters (optionally <code>null</code>). For
2420            more information see {@link
2421            com.liferay.portlet.usersadmin.util.UserIndexer}.
2422            * @param start the lower bound of the range of users
2423            * @param end the upper bound of the range of users (not inclusive)
2424            * @param sort the field and direction to sort by (optionally
2425            <code>null</code>)
2426            * @return the matching users
2427            * @throws SystemException if a system exception occurred
2428            * @see com.liferay.portlet.usersadmin.util.UserIndexer
2429            */
2430            public static com.liferay.portal.kernel.search.Hits search(long companyId,
2431                    java.lang.String keywords, int status,
2432                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2433                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
2434                    throws com.liferay.portal.kernel.exception.SystemException {
2435                    return getService()
2436                                       .search(companyId, keywords, status, params, start, end, sort);
2437            }
2438    
2439            /**
2440            * Returns an ordered range of all the users with the status, and whose
2441            * first name, middle name, last name, screen name, and email address match
2442            * the keywords specified for them, without using the indexer. It is
2443            * preferable to use the indexed version {@link #search(long, String,
2444            * String, String, String, String, int, LinkedHashMap, boolean, int, int,
2445            * Sort)} instead of this method wherever possible for performance reasons.
2446            *
2447            * <p>
2448            * Useful when paginating results. Returns a maximum of <code>end -
2449            * start</code> instances. <code>start</code> and <code>end</code> are not
2450            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2451            * refers to the first result in the set. Setting both <code>start</code>
2452            * and <code>end</code> to {@link
2453            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2454            * result set.
2455            * </p>
2456            *
2457            * @param companyId the primary key of the user's company
2458            * @param firstName the first name keywords (space separated)
2459            * @param middleName the middle name keywords
2460            * @param lastName the last name keywords
2461            * @param screenName the screen name keywords
2462            * @param emailAddress the email address keywords
2463            * @param status the workflow status
2464            * @param params the finder parameters (optionally <code>null</code>). For
2465            more information see {@link
2466            com.liferay.portal.service.persistence.UserFinder}.
2467            * @param andSearch whether every field must match its keywords, or just
2468            one field. For example, &quot;users with the first name 'bob' and
2469            last name 'smith'&quot; vs &quot;users with the first name 'bob'
2470            or the last name 'smith'&quot;.
2471            * @param start the lower bound of the range of users
2472            * @param end the upper bound of the range of users (not inclusive)
2473            * @param obc the comparator to order the users by (optionally
2474            <code>null</code>)
2475            * @return the matching users
2476            * @throws SystemException if a system exception occurred
2477            * @see com.liferay.portal.service.persistence.UserFinder
2478            */
2479            public static java.util.List<com.liferay.portal.model.User> search(
2480                    long companyId, java.lang.String firstName,
2481                    java.lang.String middleName, java.lang.String lastName,
2482                    java.lang.String screenName, java.lang.String emailAddress, int status,
2483                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2484                    boolean andSearch, int start, int end,
2485                    com.liferay.portal.kernel.util.OrderByComparator obc)
2486                    throws com.liferay.portal.kernel.exception.SystemException {
2487                    return getService()
2488                                       .search(companyId, firstName, middleName, lastName,
2489                            screenName, emailAddress, status, params, andSearch, start, end, obc);
2490            }
2491    
2492            /**
2493            * Returns an ordered range of all the users with the status, and whose
2494            * first name, middle name, last name, screen name, and email address match
2495            * the keywords specified for them, using the indexer. It is preferable to
2496            * use this method instead of the non-indexed version whenever possible for
2497            * performance reasons.
2498            *
2499            * <p>
2500            * Useful when paginating results. Returns a maximum of <code>end -
2501            * start</code> instances. <code>start</code> and <code>end</code> are not
2502            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2503            * refers to the first result in the set. Setting both <code>start</code>
2504            * and <code>end</code> to {@link
2505            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2506            * result set.
2507            * </p>
2508            *
2509            * @param companyId the primary key of the user's company
2510            * @param firstName the first name keywords (space separated)
2511            * @param middleName the middle name keywords
2512            * @param lastName the last name keywords
2513            * @param screenName the screen name keywords
2514            * @param emailAddress the email address keywords
2515            * @param status the workflow status
2516            * @param params the indexer parameters (optionally <code>null</code>). For
2517            more information see {@link
2518            com.liferay.portlet.usersadmin.util.UserIndexer}.
2519            * @param andSearch whether every field must match its keywords, or just
2520            one field. For example, &quot;users with the first name 'bob' and
2521            last name 'smith'&quot; vs &quot;users with the first name 'bob'
2522            or the last name 'smith'&quot;.
2523            * @param start the lower bound of the range of users
2524            * @param end the upper bound of the range of users (not inclusive)
2525            * @param sort the field and direction to sort by (optionally
2526            <code>null</code>)
2527            * @return the matching users
2528            * @throws SystemException if a system exception occurred
2529            * @see com.liferay.portlet.usersadmin.util.UserIndexer
2530            */
2531            public static com.liferay.portal.kernel.search.Hits search(long companyId,
2532                    java.lang.String firstName, java.lang.String middleName,
2533                    java.lang.String lastName, java.lang.String screenName,
2534                    java.lang.String emailAddress, int status,
2535                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2536                    boolean andSearch, int start, int end,
2537                    com.liferay.portal.kernel.search.Sort sort)
2538                    throws com.liferay.portal.kernel.exception.SystemException {
2539                    return getService()
2540                                       .search(companyId, firstName, middleName, lastName,
2541                            screenName, emailAddress, status, params, andSearch, start, end,
2542                            sort);
2543            }
2544    
2545            /**
2546            * Returns the number of users who match the keywords and status.
2547            *
2548            * @param companyId the primary key of the user's company
2549            * @param keywords the keywords (space separated), which may occur in the
2550            user's first name, middle name, last name, screen name, or email
2551            address
2552            * @param status the workflow status
2553            * @param params the finder parameters (optionally <code>null</code>). For
2554            more information see {@link
2555            com.liferay.portal.service.persistence.UserFinder}.
2556            * @return the number matching users
2557            * @throws SystemException if a system exception occurred
2558            */
2559            public static int searchCount(long companyId, java.lang.String keywords,
2560                    int status,
2561                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2562                    throws com.liferay.portal.kernel.exception.SystemException {
2563                    return getService().searchCount(companyId, keywords, status, params);
2564            }
2565    
2566            /**
2567            * Returns the number of users with the status, and whose first name, middle
2568            * name, last name, screen name, and email address match the keywords
2569            * specified for them.
2570            *
2571            * @param companyId the primary key of the user's company
2572            * @param firstName the first name keywords (space separated)
2573            * @param middleName the middle name keywords
2574            * @param lastName the last name keywords
2575            * @param screenName the screen name keywords
2576            * @param emailAddress the email address keywords
2577            * @param status the workflow status
2578            * @param params the finder parameters (optionally <code>null</code>). For
2579            more information see {@link
2580            com.liferay.portal.service.persistence.UserFinder}.
2581            * @param andSearch whether every field must match its keywords, or just
2582            one field. For example, &quot;users with the first name 'bob' and
2583            last name 'smith'&quot; vs &quot;users with the first name 'bob'
2584            or the last name 'smith'&quot;.
2585            * @return the number of matching users
2586            * @throws SystemException if a system exception occurred
2587            */
2588            public static int searchCount(long companyId, java.lang.String firstName,
2589                    java.lang.String middleName, java.lang.String lastName,
2590                    java.lang.String screenName, java.lang.String emailAddress, int status,
2591                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2592                    boolean andSearch)
2593                    throws com.liferay.portal.kernel.exception.SystemException {
2594                    return getService()
2595                                       .searchCount(companyId, firstName, middleName, lastName,
2596                            screenName, emailAddress, status, params, andSearch);
2597            }
2598    
2599            /**
2600            * Sends an email address verification to the user.
2601            *
2602            * @param user the verification email recipient
2603            * @param emailAddress the recipient's email address
2604            * @param serviceContext the service context to be applied. Must set the
2605            portal URL, main path, primary key of the layout, remote address,
2606            remote host, and agent for the user.
2607            * @throws PortalException if a portal exception occurred
2608            * @throws SystemException if a system exception occurred
2609            */
2610            public static void sendEmailAddressVerification(
2611                    com.liferay.portal.model.User user, java.lang.String emailAddress,
2612                    com.liferay.portal.service.ServiceContext serviceContext)
2613                    throws com.liferay.portal.kernel.exception.PortalException,
2614                            com.liferay.portal.kernel.exception.SystemException {
2615                    getService()
2616                            .sendEmailAddressVerification(user, emailAddress, serviceContext);
2617            }
2618    
2619            /**
2620            * Sends the password email to the user with the email address. The content
2621            * of this email can be specified in <code>portal.properties</code> with the
2622            * <code>admin.email.password</code> keys.
2623            *
2624            * @param companyId the primary key of the user's company
2625            * @param emailAddress the user's email address
2626            * @param fromName the name of the individual that the email should be from
2627            * @param fromAddress the address of the individual that the email should
2628            be from
2629            * @param subject the email subject. If <code>null</code>, the subject
2630            specified in <code>portal.properties</code> will be used.
2631            * @param body the email body. If <code>null</code>, the body specified in
2632            <code>portal.properties</code> will be used.
2633            * @param serviceContext the service context to be applied
2634            * @throws PortalException if a user with the email address could not be
2635            found
2636            * @throws SystemException if a system exception occurred
2637            */
2638            public static void sendPassword(long companyId,
2639                    java.lang.String emailAddress, java.lang.String fromName,
2640                    java.lang.String fromAddress, java.lang.String subject,
2641                    java.lang.String body,
2642                    com.liferay.portal.service.ServiceContext serviceContext)
2643                    throws com.liferay.portal.kernel.exception.PortalException,
2644                            com.liferay.portal.kernel.exception.SystemException {
2645                    getService()
2646                            .sendPassword(companyId, emailAddress, fromName, fromAddress,
2647                            subject, body, serviceContext);
2648            }
2649    
2650            /**
2651            * Removes the users from the teams of a group.
2652            *
2653            * @param groupId the primary key of the group
2654            * @param userIds the primary keys of the users
2655            * @throws PortalException if a portal exception occurred
2656            * @throws SystemException if a system exception occurred
2657            */
2658            public static void unsetGroupTeamsUsers(long groupId, long[] userIds)
2659                    throws com.liferay.portal.kernel.exception.PortalException,
2660                            com.liferay.portal.kernel.exception.SystemException {
2661                    getService().unsetGroupTeamsUsers(groupId, userIds);
2662            }
2663    
2664            /**
2665            * Removes the users from the group.
2666            *
2667            * @param groupId the primary key of the group
2668            * @param userIds the primary keys of the users
2669            * @param serviceContext the service context to be applied (optionally
2670            <code>null</code>)
2671            * @throws PortalException if a portal exception occurred
2672            * @throws SystemException if a system exception occurred
2673            */
2674            public static void unsetGroupUsers(long groupId, long[] userIds,
2675                    com.liferay.portal.service.ServiceContext serviceContext)
2676                    throws com.liferay.portal.kernel.exception.PortalException,
2677                            com.liferay.portal.kernel.exception.SystemException {
2678                    getService().unsetGroupUsers(groupId, userIds, serviceContext);
2679            }
2680    
2681            /**
2682            * Removes the users from the organization.
2683            *
2684            * @param organizationId the primary key of the organization
2685            * @param userIds the primary keys of the users
2686            * @throws PortalException if a portal exception occurred
2687            * @throws SystemException if a system exception occurred
2688            */
2689            public static void unsetOrganizationUsers(long organizationId,
2690                    long[] userIds)
2691                    throws com.liferay.portal.kernel.exception.PortalException,
2692                            com.liferay.portal.kernel.exception.SystemException {
2693                    getService().unsetOrganizationUsers(organizationId, userIds);
2694            }
2695    
2696            /**
2697            * Removes the users from the password policy.
2698            *
2699            * @param passwordPolicyId the primary key of the password policy
2700            * @param userIds the primary keys of the users
2701            * @throws SystemException if a system exception occurred
2702            */
2703            public static void unsetPasswordPolicyUsers(long passwordPolicyId,
2704                    long[] userIds)
2705                    throws com.liferay.portal.kernel.exception.SystemException {
2706                    getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds);
2707            }
2708    
2709            /**
2710            * Removes the users from the role.
2711            *
2712            * @param roleId the primary key of the role
2713            * @param users the users
2714            * @throws PortalException if a portal exception occurred
2715            * @throws SystemException if a system exception occurred
2716            */
2717            public static void unsetRoleUsers(long roleId,
2718                    java.util.List<com.liferay.portal.model.User> users)
2719                    throws com.liferay.portal.kernel.exception.PortalException,
2720                            com.liferay.portal.kernel.exception.SystemException {
2721                    getService().unsetRoleUsers(roleId, users);
2722            }
2723    
2724            /**
2725            * Removes the users from the role.
2726            *
2727            * @param roleId the primary key of the role
2728            * @param userIds the primary keys of the users
2729            * @throws PortalException if a portal exception occurred
2730            * @throws SystemException if a system exception occurred
2731            */
2732            public static void unsetRoleUsers(long roleId, long[] userIds)
2733                    throws com.liferay.portal.kernel.exception.PortalException,
2734                            com.liferay.portal.kernel.exception.SystemException {
2735                    getService().unsetRoleUsers(roleId, userIds);
2736            }
2737    
2738            /**
2739            * Removes the users from the team.
2740            *
2741            * @param teamId the primary key of the team
2742            * @param userIds the primary keys of the users
2743            * @throws PortalException if a portal exception occurred
2744            * @throws SystemException if a system exception occurred
2745            */
2746            public static void unsetTeamUsers(long teamId, long[] userIds)
2747                    throws com.liferay.portal.kernel.exception.PortalException,
2748                            com.liferay.portal.kernel.exception.SystemException {
2749                    getService().unsetTeamUsers(teamId, userIds);
2750            }
2751    
2752            /**
2753            * Removes the users from the user group.
2754            *
2755            * @param userGroupId the primary key of the user group
2756            * @param userIds the primary keys of the users
2757            * @throws PortalException if a portal exception occurred
2758            * @throws SystemException if a system exception occurred
2759            */
2760            public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
2761                    throws com.liferay.portal.kernel.exception.PortalException,
2762                            com.liferay.portal.kernel.exception.SystemException {
2763                    getService().unsetUserGroupUsers(userGroupId, userIds);
2764            }
2765    
2766            /**
2767            * Updates whether the user has agreed to the terms of use.
2768            *
2769            * @param userId the primary key of the user
2770            * @param agreedToTermsOfUse whether the user has agreet to the terms of
2771            use
2772            * @return the user
2773            * @throws PortalException if a user with the primary key could not be found
2774            * @throws SystemException if a system exception occurred
2775            */
2776            public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
2777                    long userId, boolean agreedToTermsOfUse)
2778                    throws com.liferay.portal.kernel.exception.PortalException,
2779                            com.liferay.portal.kernel.exception.SystemException {
2780                    return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse);
2781            }
2782    
2783            /**
2784            * Updates the user's asset with the new asset categories and tag names,
2785            * removing and adding asset categories and tag names as necessary.
2786            *
2787            * @param userId the primary key of the user
2788            * @param user ID the primary key of the user
2789            * @param assetCategoryIds the primary key's of the new asset categories
2790            * @param assetTagNames the new asset tag names
2791            * @throws PortalException if a user with the primary key could not be found
2792            * @throws SystemException if a system exception occurred
2793            */
2794            public static void updateAsset(long userId,
2795                    com.liferay.portal.model.User user, long[] assetCategoryIds,
2796                    java.lang.String[] assetTagNames)
2797                    throws com.liferay.portal.kernel.exception.PortalException,
2798                            com.liferay.portal.kernel.exception.SystemException {
2799                    getService().updateAsset(userId, user, assetCategoryIds, assetTagNames);
2800            }
2801    
2802            /**
2803            * Updates the user's creation date.
2804            *
2805            * @param userId the primary key of the user
2806            * @param createDate the new creation date
2807            * @return the user
2808            * @throws PortalException if a user with the primary key could not be found
2809            * @throws SystemException if a system exception occurred
2810            */
2811            public static com.liferay.portal.model.User updateCreateDate(long userId,
2812                    java.util.Date createDate)
2813                    throws com.liferay.portal.kernel.exception.PortalException,
2814                            com.liferay.portal.kernel.exception.SystemException {
2815                    return getService().updateCreateDate(userId, createDate);
2816            }
2817    
2818            /**
2819            * Updates the user's email address.
2820            *
2821            * @param userId the primary key of the user
2822            * @param password the user's password
2823            * @param emailAddress1 the user's new email address
2824            * @param emailAddress2 the user's new email address confirmation
2825            * @return the user
2826            * @throws PortalException if a user with the primary key could not be found
2827            * @throws SystemException if a system exception occurred
2828            */
2829            public static com.liferay.portal.model.User updateEmailAddress(
2830                    long userId, java.lang.String password, java.lang.String emailAddress1,
2831                    java.lang.String emailAddress2)
2832                    throws com.liferay.portal.kernel.exception.PortalException,
2833                            com.liferay.portal.kernel.exception.SystemException {
2834                    return getService()
2835                                       .updateEmailAddress(userId, password, emailAddress1,
2836                            emailAddress2);
2837            }
2838    
2839            /**
2840            * Updates the user's email address or sends verification email.
2841            *
2842            * @param userId the primary key of the user
2843            * @param password the user's password
2844            * @param emailAddress1 the user's new email address
2845            * @param emailAddress2 the user's new email address confirmation
2846            * @param serviceContext the service context to be applied. Must set the
2847            portal URL, main path, primary key of the layout, remote address,
2848            remote host, and agent for the user.
2849            * @return the user
2850            * @throws PortalException if a user with the primary key could not be found
2851            * @throws SystemException if a system exception occurred
2852            */
2853            public static com.liferay.portal.model.User updateEmailAddress(
2854                    long userId, java.lang.String password, java.lang.String emailAddress1,
2855                    java.lang.String emailAddress2,
2856                    com.liferay.portal.service.ServiceContext serviceContext)
2857                    throws com.liferay.portal.kernel.exception.PortalException,
2858                            com.liferay.portal.kernel.exception.SystemException {
2859                    return getService()
2860                                       .updateEmailAddress(userId, password, emailAddress1,
2861                            emailAddress2, serviceContext);
2862            }
2863    
2864            /**
2865            * Updates whether the user has verified email address.
2866            *
2867            * @param userId the primary key of the user
2868            * @param emailAddressVerified whether the user has verified email address
2869            * @return the user
2870            * @throws PortalException if a user with the primary key could not be found
2871            * @throws SystemException if a system exception occurred
2872            */
2873            public static com.liferay.portal.model.User updateEmailAddressVerified(
2874                    long userId, boolean emailAddressVerified)
2875                    throws com.liferay.portal.kernel.exception.PortalException,
2876                            com.liferay.portal.kernel.exception.SystemException {
2877                    return getService()
2878                                       .updateEmailAddressVerified(userId, emailAddressVerified);
2879            }
2880    
2881            /**
2882            * Updates the user's Facebook ID.
2883            *
2884            * @param userId the primary key of the user
2885            * @param facebookId the user's new Facebook ID
2886            * @return the user
2887            * @throws PortalException if a user with the primary key could not be found
2888            * @throws SystemException if a system exception occurred
2889            */
2890            public static com.liferay.portal.model.User updateFacebookId(long userId,
2891                    long facebookId)
2892                    throws com.liferay.portal.kernel.exception.PortalException,
2893                            com.liferay.portal.kernel.exception.SystemException {
2894                    return getService().updateFacebookId(userId, facebookId);
2895            }
2896    
2897            /**
2898            * Sets the groups the user is in, removing and adding groups as necessary.
2899            *
2900            * @param userId the primary key of the user
2901            * @param newGroupIds the primary keys of the groups
2902            * @param serviceContext the service context to be applied (optionally
2903            <code>null</code>)
2904            * @throws PortalException if a portal exception occurred
2905            * @throws SystemException if a system exception occurred
2906            */
2907            public static void updateGroups(long userId, long[] newGroupIds,
2908                    com.liferay.portal.service.ServiceContext serviceContext)
2909                    throws com.liferay.portal.kernel.exception.PortalException,
2910                            com.liferay.portal.kernel.exception.SystemException {
2911                    getService().updateGroups(userId, newGroupIds, serviceContext);
2912            }
2913    
2914            /**
2915            * Updates a user account that was automatically created when a guest user
2916            * participated in an action (e.g. posting a comment) and only provided his
2917            * name and email address.
2918            *
2919            * @param creatorUserId the primary key of the creator
2920            * @param companyId the primary key of the user's company
2921            * @param autoPassword whether a password should be automatically generated
2922            for the user
2923            * @param password1 the user's password
2924            * @param password2 the user's password confirmation
2925            * @param autoScreenName whether a screen name should be automatically
2926            generated for the user
2927            * @param screenName the user's screen name
2928            * @param emailAddress the user's email address
2929            * @param facebookId the user's facebook ID
2930            * @param openId the user's OpenID
2931            * @param locale the user's locale
2932            * @param firstName the user's first name
2933            * @param middleName the user's middle name
2934            * @param lastName the user's last name
2935            * @param prefixId the user's name prefix ID
2936            * @param suffixId the user's name suffix ID
2937            * @param male whether the user is male
2938            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
2939            January)
2940            * @param birthdayDay the user's birthday day
2941            * @param birthdayYear the user's birthday year
2942            * @param jobTitle the user's job title
2943            * @param updateUserInformation whether to update the user's information
2944            * @param sendEmail whether to send the user an email notification about
2945            their new account
2946            * @param serviceContext the service context to be applied (optionally
2947            <code>null</code>). Can set expando bridge attributes for the
2948            user.
2949            * @return the user
2950            * @throws PortalException if the user's information was invalid
2951            * @throws SystemException if a system exception occurred
2952            */
2953            public static com.liferay.portal.model.User updateIncompleteUser(
2954                    long creatorUserId, long companyId, boolean autoPassword,
2955                    java.lang.String password1, java.lang.String password2,
2956                    boolean autoScreenName, java.lang.String screenName,
2957                    java.lang.String emailAddress, long facebookId,
2958                    java.lang.String openId, java.util.Locale locale,
2959                    java.lang.String firstName, java.lang.String middleName,
2960                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
2961                    int birthdayMonth, int birthdayDay, int birthdayYear,
2962                    java.lang.String jobTitle, boolean updateUserInformation,
2963                    boolean sendEmail,
2964                    com.liferay.portal.service.ServiceContext serviceContext)
2965                    throws com.liferay.portal.kernel.exception.PortalException,
2966                            com.liferay.portal.kernel.exception.SystemException {
2967                    return getService()
2968                                       .updateIncompleteUser(creatorUserId, companyId,
2969                            autoPassword, password1, password2, autoScreenName, screenName,
2970                            emailAddress, facebookId, openId, locale, firstName, middleName,
2971                            lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay,
2972                            birthdayYear, jobTitle, updateUserInformation, sendEmail,
2973                            serviceContext);
2974            }
2975    
2976            /**
2977            * Updates the user's job title.
2978            *
2979            * @param userId the primary key of the user
2980            * @param jobTitle the user's job title
2981            * @return the user
2982            * @throws PortalException if a user with the primary key could not be found
2983            or if a contact could not be found matching the user's contact ID
2984            * @throws SystemException if a system exception occurred
2985            */
2986            public static com.liferay.portal.model.User updateJobTitle(long userId,
2987                    java.lang.String jobTitle)
2988                    throws com.liferay.portal.kernel.exception.PortalException,
2989                            com.liferay.portal.kernel.exception.SystemException {
2990                    return getService().updateJobTitle(userId, jobTitle);
2991            }
2992    
2993            /**
2994            * Updates the user's last login with the current time and the IP address.
2995            *
2996            * @param userId the primary key of the user
2997            * @param loginIP the IP address the user logged in from
2998            * @return the user
2999            * @throws PortalException if a user with the primary key could not be found
3000            * @throws SystemException if a system exception occurred
3001            */
3002            public static com.liferay.portal.model.User updateLastLogin(long userId,
3003                    java.lang.String loginIP)
3004                    throws com.liferay.portal.kernel.exception.PortalException,
3005                            com.liferay.portal.kernel.exception.SystemException {
3006                    return getService().updateLastLogin(userId, loginIP);
3007            }
3008    
3009            /**
3010            * Updates whether the user is locked out from logging in.
3011            *
3012            * @param user the user
3013            * @param lockout whether the user is locked out
3014            * @return the user
3015            * @throws PortalException if a portal exception occurred
3016            * @throws SystemException if a system exception occurred
3017            */
3018            public static com.liferay.portal.model.User updateLockout(
3019                    com.liferay.portal.model.User user, boolean lockout)
3020                    throws com.liferay.portal.kernel.exception.PortalException,
3021                            com.liferay.portal.kernel.exception.SystemException {
3022                    return getService().updateLockout(user, lockout);
3023            }
3024    
3025            /**
3026            * Updates whether the user is locked out from logging in.
3027            *
3028            * @param companyId the primary key of the user's company
3029            * @param emailAddress the user's email address
3030            * @param lockout whether the user is locked out
3031            * @return the user
3032            * @throws PortalException if a user with the email address could not be
3033            found
3034            * @throws SystemException if a system exception occurred
3035            */
3036            public static com.liferay.portal.model.User updateLockoutByEmailAddress(
3037                    long companyId, java.lang.String emailAddress, boolean lockout)
3038                    throws com.liferay.portal.kernel.exception.PortalException,
3039                            com.liferay.portal.kernel.exception.SystemException {
3040                    return getService()
3041                                       .updateLockoutByEmailAddress(companyId, emailAddress, lockout);
3042            }
3043    
3044            /**
3045            * Updates whether the user is locked out from logging in.
3046            *
3047            * @param userId the primary key of the user
3048            * @param lockout whether the user is locked out
3049            * @return the user
3050            * @throws PortalException if a user with the primary key could not be found
3051            * @throws SystemException if a system exception occurred
3052            */
3053            public static com.liferay.portal.model.User updateLockoutById(long userId,
3054                    boolean lockout)
3055                    throws com.liferay.portal.kernel.exception.PortalException,
3056                            com.liferay.portal.kernel.exception.SystemException {
3057                    return getService().updateLockoutById(userId, lockout);
3058            }
3059    
3060            /**
3061            * Updates whether the user is locked out from logging in.
3062            *
3063            * @param companyId the primary key of the user's company
3064            * @param screenName the user's screen name
3065            * @param lockout whether the user is locked out
3066            * @return the user
3067            * @throws PortalException if a user with the screen name could not be found
3068            * @throws SystemException if a system exception occurred
3069            */
3070            public static com.liferay.portal.model.User updateLockoutByScreenName(
3071                    long companyId, java.lang.String screenName, boolean lockout)
3072                    throws com.liferay.portal.kernel.exception.PortalException,
3073                            com.liferay.portal.kernel.exception.SystemException {
3074                    return getService()
3075                                       .updateLockoutByScreenName(companyId, screenName, lockout);
3076            }
3077    
3078            /**
3079            * Updates the user's modified date.
3080            *
3081            * @param userId the primary key of the user
3082            * @param modifiedDate the new modified date
3083            * @return the user
3084            * @throws PortalException if a user with the primary key could not be found
3085            * @throws SystemException if a system exception occurred
3086            */
3087            public static com.liferay.portal.model.User updateModifiedDate(
3088                    long userId, java.util.Date modifiedDate)
3089                    throws com.liferay.portal.kernel.exception.PortalException,
3090                            com.liferay.portal.kernel.exception.SystemException {
3091                    return getService().updateModifiedDate(userId, modifiedDate);
3092            }
3093    
3094            /**
3095            * Updates the user's OpenID.
3096            *
3097            * @param userId the primary key of the user
3098            * @param openId the new OpenID
3099            * @return the user
3100            * @throws PortalException if a user with the primary key could not be found
3101            * @throws SystemException if a system exception occurred
3102            */
3103            public static com.liferay.portal.model.User updateOpenId(long userId,
3104                    java.lang.String openId)
3105                    throws com.liferay.portal.kernel.exception.PortalException,
3106                            com.liferay.portal.kernel.exception.SystemException {
3107                    return getService().updateOpenId(userId, openId);
3108            }
3109    
3110            /**
3111            * Sets the organizations that the user is in, removing and adding
3112            * organizations as necessary.
3113            *
3114            * @param userId the primary key of the user
3115            * @param newOrganizationIds the primary keys of the organizations
3116            * @param serviceContext the service context to be applied. Must set
3117            whether user indexing is enabled.
3118            * @throws PortalException if a user with the primary key could not be found
3119            * @throws SystemException if a system exception occurred
3120            */
3121            public static void updateOrganizations(long userId,
3122                    long[] newOrganizationIds,
3123                    com.liferay.portal.service.ServiceContext serviceContext)
3124                    throws com.liferay.portal.kernel.exception.PortalException,
3125                            com.liferay.portal.kernel.exception.SystemException {
3126                    getService()
3127                            .updateOrganizations(userId, newOrganizationIds, serviceContext);
3128            }
3129    
3130            /**
3131            * Updates the user's password without tracking or validation of the change.
3132            *
3133            * @param userId the primary key of the user
3134            * @param password1 the user's new password
3135            * @param password2 the user's new password confirmation
3136            * @param passwordReset whether the user should be asked to reset their
3137            password the next time they log in
3138            * @return the user
3139            * @throws PortalException if a user with the primary key could not be found
3140            * @throws SystemException if a system exception occurred
3141            */
3142            public static com.liferay.portal.model.User updatePassword(long userId,
3143                    java.lang.String password1, java.lang.String password2,
3144                    boolean passwordReset)
3145                    throws com.liferay.portal.kernel.exception.PortalException,
3146                            com.liferay.portal.kernel.exception.SystemException {
3147                    return getService()
3148                                       .updatePassword(userId, password1, password2, passwordReset);
3149            }
3150    
3151            /**
3152            * Updates the user's password, optionally with tracking and validation of
3153            * the change.
3154            *
3155            * @param userId the primary key of the user
3156            * @param password1 the user's new password
3157            * @param password2 the user's new password confirmation
3158            * @param passwordReset whether the user should be asked to reset their
3159            password the next time they login
3160            * @param silentUpdate whether the password should be updated without being
3161            tracked, or validated. Primarily used for password imports.
3162            * @return the user
3163            * @throws PortalException if a user with the primary key could not be found
3164            * @throws SystemException if a system exception occurred
3165            */
3166            public static com.liferay.portal.model.User updatePassword(long userId,
3167                    java.lang.String password1, java.lang.String password2,
3168                    boolean passwordReset, boolean silentUpdate)
3169                    throws com.liferay.portal.kernel.exception.PortalException,
3170                            com.liferay.portal.kernel.exception.SystemException {
3171                    return getService()
3172                                       .updatePassword(userId, password1, password2, passwordReset,
3173                            silentUpdate);
3174            }
3175    
3176            /**
3177            * Updates the user's password with manually input information. This method
3178            * should only be used when performing maintenance.
3179            *
3180            * @param userId the primary key of the user
3181            * @param password the user's new password
3182            * @param passwordEncrypted the user's new encrypted password
3183            * @param passwordReset whether the user should be asked to reset their
3184            password the next time they login
3185            * @param passwordModifiedDate the new password modified date
3186            * @return the user
3187            * @throws PortalException if a user with the primary key could not be found
3188            * @throws SystemException if a system exception occurred
3189            */
3190            public static com.liferay.portal.model.User updatePasswordManually(
3191                    long userId, java.lang.String password, boolean passwordEncrypted,
3192                    boolean passwordReset, java.util.Date passwordModifiedDate)
3193                    throws com.liferay.portal.kernel.exception.PortalException,
3194                            com.liferay.portal.kernel.exception.SystemException {
3195                    return getService()
3196                                       .updatePasswordManually(userId, password, passwordEncrypted,
3197                            passwordReset, passwordModifiedDate);
3198            }
3199    
3200            /**
3201            * Updates whether the user should be asked to reset their password the next
3202            * time they login.
3203            *
3204            * @param userId the primary key of the user
3205            * @param passwordReset whether the user should be asked to reset their
3206            password the next time they login
3207            * @return the user
3208            * @throws PortalException if a user with the primary key could not be found
3209            * @throws SystemException if a system exception occurred
3210            */
3211            public static com.liferay.portal.model.User updatePasswordReset(
3212                    long userId, boolean passwordReset)
3213                    throws com.liferay.portal.kernel.exception.PortalException,
3214                            com.liferay.portal.kernel.exception.SystemException {
3215                    return getService().updatePasswordReset(userId, passwordReset);
3216            }
3217    
3218            /**
3219            * Updates the user's portrait image.
3220            *
3221            * @param userId the primary key of the user
3222            * @param bytes the new portrait image data
3223            * @return the user
3224            * @throws PortalException if a user with the primary key could not be found
3225            or if the new portrait was invalid
3226            * @throws SystemException if a system exception occurred
3227            */
3228            public static com.liferay.portal.model.User updatePortrait(long userId,
3229                    byte[] bytes)
3230                    throws com.liferay.portal.kernel.exception.PortalException,
3231                            com.liferay.portal.kernel.exception.SystemException {
3232                    return getService().updatePortrait(userId, bytes);
3233            }
3234    
3235            /**
3236            * Updates the user's password reset question and answer.
3237            *
3238            * @param userId the primary key of the user
3239            * @param question the user's new password reset question
3240            * @param answer the user's new password reset answer
3241            * @return the user
3242            * @throws PortalException if a user with the primary key could not be found
3243            or if the new question or answer were invalid
3244            * @throws SystemException if a system exception occurred
3245            */
3246            public static com.liferay.portal.model.User updateReminderQuery(
3247                    long userId, java.lang.String question, java.lang.String answer)
3248                    throws com.liferay.portal.kernel.exception.PortalException,
3249                            com.liferay.portal.kernel.exception.SystemException {
3250                    return getService().updateReminderQuery(userId, question, answer);
3251            }
3252    
3253            /**
3254            * Updates the user's screen name.
3255            *
3256            * @param userId the primary key of the user
3257            * @param screenName the user's new screen name
3258            * @return the user
3259            * @throws PortalException if a user with the primary key could not be found
3260            or if the new screen name was invalid
3261            * @throws SystemException if a system exception occurred
3262            */
3263            public static com.liferay.portal.model.User updateScreenName(long userId,
3264                    java.lang.String screenName)
3265                    throws com.liferay.portal.kernel.exception.PortalException,
3266                            com.liferay.portal.kernel.exception.SystemException {
3267                    return getService().updateScreenName(userId, screenName);
3268            }
3269    
3270            /**
3271            * Updates the user's workflow status.
3272            *
3273            * @param userId the primary key of the user
3274            * @param status the user's new workflow status
3275            * @return the user
3276            * @throws PortalException if a user with the primary key could not be found
3277            * @throws SystemException if a system exception occurred
3278            */
3279            public static com.liferay.portal.model.User updateStatus(long userId,
3280                    int status)
3281                    throws com.liferay.portal.kernel.exception.PortalException,
3282                            com.liferay.portal.kernel.exception.SystemException {
3283                    return getService().updateStatus(userId, status);
3284            }
3285    
3286            /**
3287            * Updates the user.
3288            *
3289            * @param userId the primary key of the user
3290            * @param oldPassword the user's old password
3291            * @param newPassword1 the user's new password (optionally
3292            <code>null</code>)
3293            * @param newPassword2 the user's new password confirmation (optionally
3294            <code>null</code>)
3295            * @param passwordReset whether the user should be asked to reset their
3296            password the next time they login
3297            * @param reminderQueryQuestion the user's new password reset question
3298            * @param reminderQueryAnswer the user's new password reset answer
3299            * @param screenName the user's new screen name
3300            * @param emailAddress the user's new email address
3301            * @param facebookId the user's new Facebook ID
3302            * @param openId the user's new OpenID
3303            * @param languageId the user's new language ID
3304            * @param timeZoneId the user's new time zone ID
3305            * @param greeting the user's new greeting
3306            * @param comments the user's new comments
3307            * @param firstName the user's new first name
3308            * @param middleName the user's new middle name
3309            * @param lastName the user's new last name
3310            * @param prefixId the user's new name prefix ID
3311            * @param suffixId the user's new name suffix ID
3312            * @param male whether user is male
3313            * @param birthdayMonth the user's new birthday month (0-based, meaning 0
3314            for January)
3315            * @param birthdayDay the user's new birthday day
3316            * @param birthdayYear the user's birthday year
3317            * @param smsSn the user's new SMS screen name
3318            * @param aimSn the user's new AIM screen name
3319            * @param facebookSn the user's new Facebook screen name
3320            * @param icqSn the user's new ICQ screen name
3321            * @param jabberSn the user's new Jabber screen name
3322            * @param msnSn the user's new MSN screen name
3323            * @param mySpaceSn the user's new MySpace screen name
3324            * @param skypeSn the user's new Skype screen name
3325            * @param twitterSn the user's new Twitter screen name
3326            * @param ymSn the user's new Yahoo! Messenger screen name
3327            * @param jobTitle the user's new job title
3328            * @param groupIds the primary keys of the user's groups
3329            * @param organizationIds the primary keys of the user's organizations
3330            * @param roleIds the primary keys of the user's roles
3331            * @param userGroupRoles the user user's group roles
3332            * @param userGroupIds the primary keys of the user's user groups
3333            * @param serviceContext the service context to be applied (optionally
3334            <code>null</code>). Can set the UUID (with the <code>uuid</code>
3335            attribute), asset category IDs, asset tag names, and expando
3336            bridge attributes for the user.
3337            * @return the user
3338            * @throws PortalException if a user with the primary key could not be found
3339            or if the new information was invalid
3340            * @throws SystemException if a system exception occurred
3341            */
3342            public static com.liferay.portal.model.User updateUser(long userId,
3343                    java.lang.String oldPassword, java.lang.String newPassword1,
3344                    java.lang.String newPassword2, boolean passwordReset,
3345                    java.lang.String reminderQueryQuestion,
3346                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
3347                    java.lang.String emailAddress, long facebookId,
3348                    java.lang.String openId, java.lang.String languageId,
3349                    java.lang.String timeZoneId, java.lang.String greeting,
3350                    java.lang.String comments, java.lang.String firstName,
3351                    java.lang.String middleName, java.lang.String lastName, int prefixId,
3352                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
3353                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
3354                    java.lang.String facebookSn, java.lang.String icqSn,
3355                    java.lang.String jabberSn, java.lang.String msnSn,
3356                    java.lang.String mySpaceSn, java.lang.String skypeSn,
3357                    java.lang.String twitterSn, java.lang.String ymSn,
3358                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
3359                    long[] roleIds,
3360                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
3361                    long[] userGroupIds,
3362                    com.liferay.portal.service.ServiceContext serviceContext)
3363                    throws com.liferay.portal.kernel.exception.PortalException,
3364                            com.liferay.portal.kernel.exception.SystemException {
3365                    return getService()
3366                                       .updateUser(userId, oldPassword, newPassword1, newPassword2,
3367                            passwordReset, reminderQueryQuestion, reminderQueryAnswer,
3368                            screenName, emailAddress, facebookId, openId, languageId,
3369                            timeZoneId, greeting, comments, firstName, middleName, lastName,
3370                            prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
3371                            smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn,
3372                            skypeSn, twitterSn, ymSn, jobTitle, groupIds, organizationIds,
3373                            roleIds, userGroupRoles, userGroupIds, serviceContext);
3374            }
3375    
3376            /**
3377            * Verifies the email address of the ticket.
3378            *
3379            * @param ticketKey the ticket key
3380            * @throws PortalException if a ticket matching the ticket key could not be
3381            found, if the ticket has expired, if the ticket is an email
3382            address ticket, or if the email address is invalid
3383            * @throws SystemException if a system exception occurred
3384            */
3385            public static void verifyEmailAddress(java.lang.String ticketKey)
3386                    throws com.liferay.portal.kernel.exception.PortalException,
3387                            com.liferay.portal.kernel.exception.SystemException {
3388                    getService().verifyEmailAddress(ticketKey);
3389            }
3390    
3391            public static UserLocalService getService() {
3392                    if (_service == null) {
3393                            _service = (UserLocalService)PortalBeanLocatorUtil.locate(UserLocalService.class.getName());
3394    
3395                            ReferenceRegistry.registerReference(UserLocalServiceUtil.class,
3396                                    "_service");
3397                    }
3398    
3399                    return _service;
3400            }
3401    
3402            /**
3403             * @deprecated As of 6.2.0
3404             */
3405            public void setService(UserLocalService service) {
3406            }
3407    
3408            private static UserLocalService _service;
3409    }