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