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