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 matching the dynamic query.
940            *
941            * @param dynamicQuery the dynamic query
942            * @return the number of rows matching 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 matching 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 matching 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            public static com.liferay.portal.kernel.search.Hits search(long companyId,
2103                    java.lang.String firstName, java.lang.String middleName,
2104                    java.lang.String lastName, java.lang.String screenName,
2105                    java.lang.String emailAddress, int status,
2106                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2107                    boolean andSearch, int start, int end,
2108                    com.liferay.portal.kernel.search.Sort[] sorts) {
2109                    return getService()
2110                                       .search(companyId, firstName, middleName, lastName,
2111                            screenName, emailAddress, status, params, andSearch, start, end,
2112                            sorts);
2113            }
2114    
2115            /**
2116            * Returns an ordered range of all the users who match the keywords and
2117            * status, without using the indexer. It is preferable to use the indexed
2118            * version {@link #search(long, String, int, LinkedHashMap, int, int, Sort)}
2119            * instead of this method wherever possible for performance reasons.
2120            *
2121            * <p>
2122            * Useful when paginating results. Returns a maximum of <code>end -
2123            * start</code> instances. <code>start</code> and <code>end</code> are not
2124            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2125            * refers to the first result in the set. Setting both <code>start</code>
2126            * and <code>end</code> to {@link
2127            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2128            * result set.
2129            * </p>
2130            *
2131            * @param companyId the primary key of the user's company
2132            * @param keywords the keywords (space separated), which may occur in the
2133            user's first name, middle name, last name, screen name, or email
2134            address
2135            * @param status the workflow status
2136            * @param params the finder parameters (optionally <code>null</code>). For
2137            more information see {@link
2138            com.liferay.portal.service.persistence.UserFinder}.
2139            * @param start the lower bound of the range of users
2140            * @param end the upper bound of the range of users (not inclusive)
2141            * @param obc the comparator to order the users by (optionally
2142            <code>null</code>)
2143            * @return the matching users
2144            * @see com.liferay.portal.service.persistence.UserFinder
2145            */
2146            public static java.util.List<com.liferay.portal.model.User> search(
2147                    long companyId, java.lang.String keywords, int status,
2148                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2149                    int start, int end,
2150                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc) {
2151                    return getService()
2152                                       .search(companyId, keywords, status, params, start, end, obc);
2153            }
2154    
2155            /**
2156            * Returns an ordered range of all the users who match the keywords and
2157            * status, using the indexer. It is preferable to use this method instead of
2158            * the non-indexed version whenever possible for performance reasons.
2159            *
2160            * <p>
2161            * Useful when paginating results. Returns a maximum of <code>end -
2162            * start</code> instances. <code>start</code> and <code>end</code> are not
2163            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2164            * refers to the first result in the set. Setting both <code>start</code>
2165            * and <code>end</code> to {@link
2166            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2167            * result set.
2168            * </p>
2169            *
2170            * @param companyId the primary key of the user's company
2171            * @param keywords the keywords (space separated), which may occur in the
2172            user's first name, middle name, last name, screen name, or email
2173            address
2174            * @param status the workflow status
2175            * @param params the indexer parameters (optionally <code>null</code>). For
2176            more information see {@link
2177            com.liferay.portlet.usersadmin.util.UserIndexer}.
2178            * @param start the lower bound of the range of users
2179            * @param end the upper bound of the range of users (not inclusive)
2180            * @param sort the field and direction to sort by (optionally
2181            <code>null</code>)
2182            * @return the matching users
2183            * @see com.liferay.portlet.usersadmin.util.UserIndexer
2184            */
2185            public static com.liferay.portal.kernel.search.Hits search(long companyId,
2186                    java.lang.String keywords, int status,
2187                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2188                    int start, int end, com.liferay.portal.kernel.search.Sort sort) {
2189                    return getService()
2190                                       .search(companyId, keywords, status, params, start, end, sort);
2191            }
2192    
2193            public static com.liferay.portal.kernel.search.Hits search(long companyId,
2194                    java.lang.String keywords, int status,
2195                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2196                    int start, int end, com.liferay.portal.kernel.search.Sort[] sorts) {
2197                    return getService()
2198                                       .search(companyId, keywords, status, params, start, end,
2199                            sorts);
2200            }
2201    
2202            /**
2203            * Returns the number of users with the status, and whose first name, middle
2204            * name, last name, screen name, and email address match the keywords
2205            * specified for them.
2206            *
2207            * @param companyId the primary key of the user's company
2208            * @param firstName the first name keywords (space separated)
2209            * @param middleName the middle name keywords
2210            * @param lastName the last name keywords
2211            * @param screenName the screen name keywords
2212            * @param emailAddress the email address keywords
2213            * @param status the workflow status
2214            * @param params the finder parameters (optionally <code>null</code>). For
2215            more information see {@link
2216            com.liferay.portal.service.persistence.UserFinder}.
2217            * @param andSearch whether every field must match its keywords, or just
2218            one field. For example, &quot;users with the first name 'bob' and
2219            last name 'smith'&quot; vs &quot;users with the first name 'bob'
2220            or the last name 'smith'&quot;.
2221            * @return the number of matching users
2222            */
2223            public static int searchCount(long companyId, java.lang.String firstName,
2224                    java.lang.String middleName, java.lang.String lastName,
2225                    java.lang.String screenName, java.lang.String emailAddress, int status,
2226                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2227                    boolean andSearch) {
2228                    return getService()
2229                                       .searchCount(companyId, firstName, middleName, lastName,
2230                            screenName, emailAddress, status, params, andSearch);
2231            }
2232    
2233            /**
2234            * Returns the number of users who match the keywords and status.
2235            *
2236            * @param companyId the primary key of the user's company
2237            * @param keywords the keywords (space separated), which may occur in the
2238            user's first name, middle name, last name, screen name, or email
2239            address
2240            * @param status the workflow status
2241            * @param params the finder parameters (optionally <code>null</code>). For
2242            more information see {@link
2243            com.liferay.portal.service.persistence.UserFinder}.
2244            * @return the number matching users
2245            */
2246            public static int searchCount(long companyId, java.lang.String keywords,
2247                    int status,
2248                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) {
2249                    return getService().searchCount(companyId, keywords, status, params);
2250            }
2251    
2252            public static java.util.List<com.liferay.portal.model.User> searchSocial(
2253                    long companyId, long[] groupIds, java.lang.String keywords, int start,
2254                    int end) {
2255                    return getService()
2256                                       .searchSocial(companyId, groupIds, keywords, start, end);
2257            }
2258    
2259            public static java.util.List<com.liferay.portal.model.User> searchSocial(
2260                    long[] groupIds, long userId, int[] socialRelationTypes,
2261                    java.lang.String keywords, int start, int end)
2262                    throws com.liferay.portal.kernel.exception.PortalException {
2263                    return getService()
2264                                       .searchSocial(groupIds, userId, socialRelationTypes,
2265                            keywords, start, end);
2266            }
2267    
2268            public static java.util.List<com.liferay.portal.model.User> searchSocial(
2269                    long userId, int[] socialRelationTypes, java.lang.String keywords,
2270                    int start, int end)
2271                    throws com.liferay.portal.kernel.exception.PortalException {
2272                    return getService()
2273                                       .searchSocial(userId, socialRelationTypes, keywords, start,
2274                            end);
2275            }
2276    
2277            public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers(
2278                    long companyId, java.lang.String firstName,
2279                    java.lang.String middleName, java.lang.String lastName,
2280                    java.lang.String screenName, java.lang.String emailAddress, int status,
2281                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2282                    boolean andSearch, int start, int end,
2283                    com.liferay.portal.kernel.search.Sort sort)
2284                    throws com.liferay.portal.kernel.exception.PortalException {
2285                    return getService()
2286                                       .searchUsers(companyId, firstName, middleName, lastName,
2287                            screenName, emailAddress, status, params, andSearch, start, end,
2288                            sort);
2289            }
2290    
2291            public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers(
2292                    long companyId, java.lang.String firstName,
2293                    java.lang.String middleName, java.lang.String lastName,
2294                    java.lang.String screenName, java.lang.String emailAddress, int status,
2295                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2296                    boolean andSearch, int start, int end,
2297                    com.liferay.portal.kernel.search.Sort[] sorts)
2298                    throws com.liferay.portal.kernel.exception.PortalException {
2299                    return getService()
2300                                       .searchUsers(companyId, firstName, middleName, lastName,
2301                            screenName, emailAddress, status, params, andSearch, start, end,
2302                            sorts);
2303            }
2304    
2305            public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers(
2306                    long companyId, java.lang.String keywords, int status,
2307                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2308                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
2309                    throws com.liferay.portal.kernel.exception.PortalException {
2310                    return getService()
2311                                       .searchUsers(companyId, keywords, status, params, start,
2312                            end, sort);
2313            }
2314    
2315            public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers(
2316                    long companyId, java.lang.String keywords, int status,
2317                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2318                    int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
2319                    throws com.liferay.portal.kernel.exception.PortalException {
2320                    return getService()
2321                                       .searchUsers(companyId, keywords, status, params, start,
2322                            end, sorts);
2323            }
2324    
2325            /**
2326            * Sends an email address verification to the user.
2327            *
2328            * @param user the verification email recipient
2329            * @param emailAddress the recipient's email address
2330            * @param serviceContext the service context to be applied. Must set the
2331            portal URL, main path, primary key of the layout, remote address,
2332            remote host, and agent for the user.
2333            * @throws PortalException if a portal exception occurred
2334            */
2335            public static void sendEmailAddressVerification(
2336                    com.liferay.portal.model.User user, java.lang.String emailAddress,
2337                    com.liferay.portal.service.ServiceContext serviceContext)
2338                    throws com.liferay.portal.kernel.exception.PortalException {
2339                    getService()
2340                            .sendEmailAddressVerification(user, emailAddress, serviceContext);
2341            }
2342    
2343            /**
2344            * Sends the password email to the user with the email address. The content
2345            * of this email can be specified in <code>portal.properties</code> with the
2346            * <code>admin.email.password</code> keys.
2347            *
2348            * @param companyId the primary key of the user's company
2349            * @param emailAddress the user's email address
2350            * @param fromName the name of the individual that the email should be from
2351            * @param fromAddress the address of the individual that the email should
2352            be from
2353            * @param subject the email subject. If <code>null</code>, the subject
2354            specified in <code>portal.properties</code> will be used.
2355            * @param body the email body. If <code>null</code>, the body specified in
2356            <code>portal.properties</code> will be used.
2357            * @param serviceContext the service context to be applied
2358            * @throws PortalException if a user with the email address could not be
2359            found
2360            */
2361            public static boolean sendPassword(long companyId,
2362                    java.lang.String emailAddress, java.lang.String fromName,
2363                    java.lang.String fromAddress, java.lang.String subject,
2364                    java.lang.String body,
2365                    com.liferay.portal.service.ServiceContext serviceContext)
2366                    throws com.liferay.portal.kernel.exception.PortalException {
2367                    return getService()
2368                                       .sendPassword(companyId, emailAddress, fromName,
2369                            fromAddress, subject, body, serviceContext);
2370            }
2371    
2372            public static boolean sendPasswordByEmailAddress(long companyId,
2373                    java.lang.String emailAddress)
2374                    throws com.liferay.portal.kernel.exception.PortalException {
2375                    return getService().sendPasswordByEmailAddress(companyId, emailAddress);
2376            }
2377    
2378            public static boolean sendPasswordByScreenName(long companyId,
2379                    java.lang.String screenName)
2380                    throws com.liferay.portal.kernel.exception.PortalException {
2381                    return getService().sendPasswordByScreenName(companyId, screenName);
2382            }
2383    
2384            public static boolean sendPasswordByUserId(long userId)
2385                    throws com.liferay.portal.kernel.exception.PortalException {
2386                    return getService().sendPasswordByUserId(userId);
2387            }
2388    
2389            /**
2390            * Sets the Spring bean ID for this bean.
2391            *
2392            * @param beanIdentifier the Spring bean ID for this bean
2393            */
2394            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
2395                    getService().setBeanIdentifier(beanIdentifier);
2396            }
2397    
2398            public static void setGroupUsers(long groupId, long[] userIds) {
2399                    getService().setGroupUsers(groupId, userIds);
2400            }
2401    
2402            public static void setOrganizationUsers(long organizationId, long[] userIds) {
2403                    getService().setOrganizationUsers(organizationId, userIds);
2404            }
2405    
2406            /**
2407            * @throws PortalException
2408            */
2409            public static void setRoleUsers(long roleId, long[] userIds)
2410                    throws com.liferay.portal.kernel.exception.PortalException {
2411                    getService().setRoleUsers(roleId, userIds);
2412            }
2413    
2414            public static void setTeamUsers(long teamId, long[] userIds) {
2415                    getService().setTeamUsers(teamId, userIds);
2416            }
2417    
2418            /**
2419            * @throws PortalException
2420            */
2421            public static void setUserGroupUsers(long userGroupId, long[] userIds)
2422                    throws com.liferay.portal.kernel.exception.PortalException {
2423                    getService().setUserGroupUsers(userGroupId, userIds);
2424            }
2425    
2426            /**
2427            * Removes the users from the teams of a group.
2428            *
2429            * @param groupId the primary key of the group
2430            * @param userIds the primary keys of the users
2431            * @throws PortalException if a portal exception occurred
2432            */
2433            public static void unsetGroupTeamsUsers(long groupId, long[] userIds)
2434                    throws com.liferay.portal.kernel.exception.PortalException {
2435                    getService().unsetGroupTeamsUsers(groupId, userIds);
2436            }
2437    
2438            /**
2439            * Removes the users from the group.
2440            *
2441            * @param groupId the primary key of the group
2442            * @param userIds the primary keys of the users
2443            * @param serviceContext the service context to be applied (optionally
2444            <code>null</code>)
2445            * @throws PortalException if a portal exception occurred
2446            */
2447            public static void unsetGroupUsers(long groupId, long[] userIds,
2448                    com.liferay.portal.service.ServiceContext serviceContext)
2449                    throws com.liferay.portal.kernel.exception.PortalException {
2450                    getService().unsetGroupUsers(groupId, userIds, serviceContext);
2451            }
2452    
2453            /**
2454            * Removes the users from the organization.
2455            *
2456            * @param organizationId the primary key of the organization
2457            * @param userIds the primary keys of the users
2458            * @throws PortalException if a portal exception occurred
2459            */
2460            public static void unsetOrganizationUsers(long organizationId,
2461                    long[] userIds)
2462                    throws com.liferay.portal.kernel.exception.PortalException {
2463                    getService().unsetOrganizationUsers(organizationId, userIds);
2464            }
2465    
2466            /**
2467            * Removes the users from the password policy.
2468            *
2469            * @param passwordPolicyId the primary key of the password policy
2470            * @param userIds the primary keys of the users
2471            */
2472            public static void unsetPasswordPolicyUsers(long passwordPolicyId,
2473                    long[] userIds) {
2474                    getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds);
2475            }
2476    
2477            /**
2478            * Removes the users from the role.
2479            *
2480            * @param roleId the primary key of the role
2481            * @param userIds the primary keys of the users
2482            * @throws PortalException if a portal exception occurred
2483            */
2484            public static void unsetRoleUsers(long roleId, long[] userIds)
2485                    throws com.liferay.portal.kernel.exception.PortalException {
2486                    getService().unsetRoleUsers(roleId, userIds);
2487            }
2488    
2489            /**
2490            * Removes the users from the role.
2491            *
2492            * @param roleId the primary key of the role
2493            * @param users the users
2494            * @throws PortalException if a portal exception occurred
2495            */
2496            public static void unsetRoleUsers(long roleId,
2497                    java.util.List<com.liferay.portal.model.User> users)
2498                    throws com.liferay.portal.kernel.exception.PortalException {
2499                    getService().unsetRoleUsers(roleId, users);
2500            }
2501    
2502            /**
2503            * Removes the users from the team.
2504            *
2505            * @param teamId the primary key of the team
2506            * @param userIds the primary keys of the users
2507            * @throws PortalException if a portal exception occurred
2508            */
2509            public static void unsetTeamUsers(long teamId, long[] userIds)
2510                    throws com.liferay.portal.kernel.exception.PortalException {
2511                    getService().unsetTeamUsers(teamId, userIds);
2512            }
2513    
2514            /**
2515            * Removes the users from the user group.
2516            *
2517            * @param userGroupId the primary key of the user group
2518            * @param userIds the primary keys of the users
2519            * @throws PortalException if a portal exception occurred
2520            */
2521            public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
2522                    throws com.liferay.portal.kernel.exception.PortalException {
2523                    getService().unsetUserGroupUsers(userGroupId, userIds);
2524            }
2525    
2526            /**
2527            * Updates whether the user has agreed to the terms of use.
2528            *
2529            * @param userId the primary key of the user
2530            * @param agreedToTermsOfUse whether the user has agreet to the terms of
2531            use
2532            * @return the user
2533            * @throws PortalException if a user with the primary key could not be found
2534            */
2535            public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
2536                    long userId, boolean agreedToTermsOfUse)
2537                    throws com.liferay.portal.kernel.exception.PortalException {
2538                    return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse);
2539            }
2540    
2541            /**
2542            * Updates the user's asset with the new asset categories and tag names,
2543            * removing and adding asset categories and tag names as necessary.
2544            *
2545            * @param userId the primary key of the user
2546            * @param user ID the primary key of the user
2547            * @param assetCategoryIds the primary key's of the new asset categories
2548            * @param assetTagNames the new asset tag names
2549            * @throws PortalException if a user with the primary key could not be found
2550            */
2551            public static void updateAsset(long userId,
2552                    com.liferay.portal.model.User user, long[] assetCategoryIds,
2553                    java.lang.String[] assetTagNames)
2554                    throws com.liferay.portal.kernel.exception.PortalException {
2555                    getService().updateAsset(userId, user, assetCategoryIds, assetTagNames);
2556            }
2557    
2558            /**
2559            * Updates the user's creation date.
2560            *
2561            * @param userId the primary key of the user
2562            * @param createDate the new creation date
2563            * @return the user
2564            * @throws PortalException if a user with the primary key could not be found
2565            */
2566            public static com.liferay.portal.model.User updateCreateDate(long userId,
2567                    java.util.Date createDate)
2568                    throws com.liferay.portal.kernel.exception.PortalException {
2569                    return getService().updateCreateDate(userId, createDate);
2570            }
2571    
2572            /**
2573            * Updates the user's email address.
2574            *
2575            * @param userId the primary key of the user
2576            * @param password the user's password
2577            * @param emailAddress1 the user's new email address
2578            * @param emailAddress2 the user's new email address confirmation
2579            * @return the user
2580            * @throws PortalException if a user with the primary key could not be found
2581            */
2582            public static com.liferay.portal.model.User updateEmailAddress(
2583                    long userId, java.lang.String password, java.lang.String emailAddress1,
2584                    java.lang.String emailAddress2)
2585                    throws com.liferay.portal.kernel.exception.PortalException {
2586                    return getService()
2587                                       .updateEmailAddress(userId, password, emailAddress1,
2588                            emailAddress2);
2589            }
2590    
2591            /**
2592            * Updates the user's email address or sends verification email.
2593            *
2594            * @param userId the primary key of the user
2595            * @param password the user's password
2596            * @param emailAddress1 the user's new email address
2597            * @param emailAddress2 the user's new email address confirmation
2598            * @param serviceContext the service context to be applied. Must set the
2599            portal URL, main path, primary key of the layout, remote address,
2600            remote host, and agent for the user.
2601            * @return the user
2602            * @throws PortalException if a user with the primary key could not be found
2603            */
2604            public static com.liferay.portal.model.User updateEmailAddress(
2605                    long userId, java.lang.String password, java.lang.String emailAddress1,
2606                    java.lang.String emailAddress2,
2607                    com.liferay.portal.service.ServiceContext serviceContext)
2608                    throws com.liferay.portal.kernel.exception.PortalException {
2609                    return getService()
2610                                       .updateEmailAddress(userId, password, emailAddress1,
2611                            emailAddress2, serviceContext);
2612            }
2613    
2614            /**
2615            * Updates whether the user has verified email address.
2616            *
2617            * @param userId the primary key of the user
2618            * @param emailAddressVerified whether the user has verified email address
2619            * @return the user
2620            * @throws PortalException if a user with the primary key could not be found
2621            */
2622            public static com.liferay.portal.model.User updateEmailAddressVerified(
2623                    long userId, boolean emailAddressVerified)
2624                    throws com.liferay.portal.kernel.exception.PortalException {
2625                    return getService()
2626                                       .updateEmailAddressVerified(userId, emailAddressVerified);
2627            }
2628    
2629            /**
2630            * Updates the user's Facebook ID.
2631            *
2632            * @param userId the primary key of the user
2633            * @param facebookId the user's new Facebook ID
2634            * @return the user
2635            * @throws PortalException if a user with the primary key could not be found
2636            */
2637            public static com.liferay.portal.model.User updateFacebookId(long userId,
2638                    long facebookId)
2639                    throws com.liferay.portal.kernel.exception.PortalException {
2640                    return getService().updateFacebookId(userId, facebookId);
2641            }
2642    
2643            /**
2644            * Sets the groups the user is in, removing and adding groups as necessary.
2645            *
2646            * @param userId the primary key of the user
2647            * @param newGroupIds the primary keys of the groups
2648            * @param serviceContext the service context to be applied (optionally
2649            <code>null</code>)
2650            * @throws PortalException if a portal exception occurred
2651            */
2652            public static void updateGroups(long userId, long[] newGroupIds,
2653                    com.liferay.portal.service.ServiceContext serviceContext)
2654                    throws com.liferay.portal.kernel.exception.PortalException {
2655                    getService().updateGroups(userId, newGroupIds, serviceContext);
2656            }
2657    
2658            /**
2659            * Updates a user account that was automatically created when a guest user
2660            * participated in an action (e.g. posting a comment) and only provided his
2661            * name and email address.
2662            *
2663            * @param creatorUserId the primary key of the creator
2664            * @param companyId the primary key of the user's company
2665            * @param autoPassword whether a password should be automatically generated
2666            for the user
2667            * @param password1 the user's password
2668            * @param password2 the user's password confirmation
2669            * @param autoScreenName whether a screen name should be automatically
2670            generated for the user
2671            * @param screenName the user's screen name
2672            * @param emailAddress the user's email address
2673            * @param facebookId the user's facebook ID
2674            * @param openId the user's OpenID
2675            * @param locale the user's locale
2676            * @param firstName the user's first name
2677            * @param middleName the user's middle name
2678            * @param lastName the user's last name
2679            * @param prefixId the user's name prefix ID
2680            * @param suffixId the user's name suffix ID
2681            * @param male whether the user is male
2682            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
2683            January)
2684            * @param birthdayDay the user's birthday day
2685            * @param birthdayYear the user's birthday year
2686            * @param jobTitle the user's job title
2687            * @param updateUserInformation whether to update the user's information
2688            * @param sendEmail whether to send the user an email notification about
2689            their new account
2690            * @param serviceContext the service context to be applied (optionally
2691            <code>null</code>). Can set expando bridge attributes for the
2692            user.
2693            * @return the user
2694            * @throws PortalException if the user's information was invalid
2695            */
2696            public static com.liferay.portal.model.User updateIncompleteUser(
2697                    long creatorUserId, long companyId, boolean autoPassword,
2698                    java.lang.String password1, java.lang.String password2,
2699                    boolean autoScreenName, java.lang.String screenName,
2700                    java.lang.String emailAddress, long facebookId,
2701                    java.lang.String openId, java.util.Locale locale,
2702                    java.lang.String firstName, java.lang.String middleName,
2703                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
2704                    int birthdayMonth, int birthdayDay, int birthdayYear,
2705                    java.lang.String jobTitle, boolean updateUserInformation,
2706                    boolean sendEmail,
2707                    com.liferay.portal.service.ServiceContext serviceContext)
2708                    throws com.liferay.portal.kernel.exception.PortalException {
2709                    return getService()
2710                                       .updateIncompleteUser(creatorUserId, companyId,
2711                            autoPassword, password1, password2, autoScreenName, screenName,
2712                            emailAddress, facebookId, openId, locale, firstName, middleName,
2713                            lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay,
2714                            birthdayYear, jobTitle, updateUserInformation, sendEmail,
2715                            serviceContext);
2716            }
2717    
2718            /**
2719            * Updates the user's job title.
2720            *
2721            * @param userId the primary key of the user
2722            * @param jobTitle the user's job title
2723            * @return the user
2724            * @throws PortalException if a user with the primary key could not be found
2725            or if a contact could not be found matching the user's contact ID
2726            */
2727            public static com.liferay.portal.model.User updateJobTitle(long userId,
2728                    java.lang.String jobTitle)
2729                    throws com.liferay.portal.kernel.exception.PortalException {
2730                    return getService().updateJobTitle(userId, jobTitle);
2731            }
2732    
2733            /**
2734            * Updates the user's last login with the current time and the IP address.
2735            *
2736            * @param userId the primary key of the user
2737            * @param loginIP the IP address the user logged in from
2738            * @return the user
2739            * @throws PortalException if a user with the primary key could not be found
2740            */
2741            public static com.liferay.portal.model.User updateLastLogin(long userId,
2742                    java.lang.String loginIP)
2743                    throws com.liferay.portal.kernel.exception.PortalException {
2744                    return getService().updateLastLogin(userId, loginIP);
2745            }
2746    
2747            /**
2748            * Updates whether the user is locked out from logging in.
2749            *
2750            * @param user the user
2751            * @param lockout whether the user is locked out
2752            * @return the user
2753            * @throws PortalException if a portal exception occurred
2754            */
2755            public static com.liferay.portal.model.User updateLockout(
2756                    com.liferay.portal.model.User user, boolean lockout)
2757                    throws com.liferay.portal.kernel.exception.PortalException {
2758                    return getService().updateLockout(user, lockout);
2759            }
2760    
2761            /**
2762            * Updates whether the user is locked out from logging in.
2763            *
2764            * @param companyId the primary key of the user's company
2765            * @param emailAddress the user's email address
2766            * @param lockout whether the user is locked out
2767            * @return the user
2768            * @throws PortalException if a user with the email address could not be
2769            found
2770            */
2771            public static com.liferay.portal.model.User updateLockoutByEmailAddress(
2772                    long companyId, java.lang.String emailAddress, boolean lockout)
2773                    throws com.liferay.portal.kernel.exception.PortalException {
2774                    return getService()
2775                                       .updateLockoutByEmailAddress(companyId, emailAddress, lockout);
2776            }
2777    
2778            /**
2779            * Updates whether the user is locked out from logging in.
2780            *
2781            * @param userId the primary key of the user
2782            * @param lockout whether the user is locked out
2783            * @return the user
2784            * @throws PortalException if a user with the primary key could not be found
2785            */
2786            public static com.liferay.portal.model.User updateLockoutById(long userId,
2787                    boolean lockout)
2788                    throws com.liferay.portal.kernel.exception.PortalException {
2789                    return getService().updateLockoutById(userId, lockout);
2790            }
2791    
2792            /**
2793            * Updates whether the user is locked out from logging in.
2794            *
2795            * @param companyId the primary key of the user's company
2796            * @param screenName the user's screen name
2797            * @param lockout whether the user is locked out
2798            * @return the user
2799            * @throws PortalException if a user with the screen name could not be found
2800            */
2801            public static com.liferay.portal.model.User updateLockoutByScreenName(
2802                    long companyId, java.lang.String screenName, boolean lockout)
2803                    throws com.liferay.portal.kernel.exception.PortalException {
2804                    return getService()
2805                                       .updateLockoutByScreenName(companyId, screenName, lockout);
2806            }
2807    
2808            /**
2809            * Updates the user's modified date.
2810            *
2811            * @param userId the primary key of the user
2812            * @param modifiedDate the new modified date
2813            * @return the user
2814            * @throws PortalException if a user with the primary key could not be found
2815            */
2816            public static com.liferay.portal.model.User updateModifiedDate(
2817                    long userId, java.util.Date modifiedDate)
2818                    throws com.liferay.portal.kernel.exception.PortalException {
2819                    return getService().updateModifiedDate(userId, modifiedDate);
2820            }
2821    
2822            /**
2823            * Updates the user's OpenID.
2824            *
2825            * @param userId the primary key of the user
2826            * @param openId the new OpenID
2827            * @return the user
2828            * @throws PortalException if a user with the primary key could not be found
2829            */
2830            public static com.liferay.portal.model.User updateOpenId(long userId,
2831                    java.lang.String openId)
2832                    throws com.liferay.portal.kernel.exception.PortalException {
2833                    return getService().updateOpenId(userId, openId);
2834            }
2835    
2836            /**
2837            * Sets the organizations that the user is in, removing and adding
2838            * organizations as necessary.
2839            *
2840            * @param userId the primary key of the user
2841            * @param newOrganizationIds the primary keys of the organizations
2842            * @param serviceContext the service context to be applied. Must set
2843            whether user indexing is enabled.
2844            * @throws PortalException if a user with the primary key could not be found
2845            */
2846            public static void updateOrganizations(long userId,
2847                    long[] newOrganizationIds,
2848                    com.liferay.portal.service.ServiceContext serviceContext)
2849                    throws com.liferay.portal.kernel.exception.PortalException {
2850                    getService()
2851                            .updateOrganizations(userId, newOrganizationIds, serviceContext);
2852            }
2853    
2854            /**
2855            * Updates the user's password without tracking or validation of the change.
2856            *
2857            * @param userId the primary key of the user
2858            * @param password1 the user's new password
2859            * @param password2 the user's new password confirmation
2860            * @param passwordReset whether the user should be asked to reset their
2861            password the next time they log in
2862            * @return the user
2863            * @throws PortalException if a user with the primary key could not be found
2864            */
2865            public static com.liferay.portal.model.User updatePassword(long userId,
2866                    java.lang.String password1, java.lang.String password2,
2867                    boolean passwordReset)
2868                    throws com.liferay.portal.kernel.exception.PortalException {
2869                    return getService()
2870                                       .updatePassword(userId, password1, password2, passwordReset);
2871            }
2872    
2873            /**
2874            * Updates the user's password, optionally with tracking and validation of
2875            * the change.
2876            *
2877            * @param userId the primary key of the user
2878            * @param password1 the user's new password
2879            * @param password2 the user's new password confirmation
2880            * @param passwordReset whether the user should be asked to reset their
2881            password the next time they login
2882            * @param silentUpdate whether the password should be updated without being
2883            tracked, or validated. Primarily used for password imports.
2884            * @return the user
2885            * @throws PortalException if a user with the primary key could not be found
2886            */
2887            public static com.liferay.portal.model.User updatePassword(long userId,
2888                    java.lang.String password1, java.lang.String password2,
2889                    boolean passwordReset, boolean silentUpdate)
2890                    throws com.liferay.portal.kernel.exception.PortalException {
2891                    return getService()
2892                                       .updatePassword(userId, password1, password2, passwordReset,
2893                            silentUpdate);
2894            }
2895    
2896            /**
2897            * Updates the user's password with manually input information. This method
2898            * should only be used when performing maintenance.
2899            *
2900            * @param userId the primary key of the user
2901            * @param password the user's new password
2902            * @param passwordEncrypted the user's new encrypted password
2903            * @param passwordReset whether the user should be asked to reset their
2904            password the next time they login
2905            * @param passwordModifiedDate the new password modified date
2906            * @return the user
2907            * @throws PortalException if a user with the primary key could not be found
2908            */
2909            public static com.liferay.portal.model.User updatePasswordManually(
2910                    long userId, java.lang.String password, boolean passwordEncrypted,
2911                    boolean passwordReset, java.util.Date passwordModifiedDate)
2912                    throws com.liferay.portal.kernel.exception.PortalException {
2913                    return getService()
2914                                       .updatePasswordManually(userId, password, passwordEncrypted,
2915                            passwordReset, passwordModifiedDate);
2916            }
2917    
2918            /**
2919            * Updates whether the user should be asked to reset their password the next
2920            * time they login.
2921            *
2922            * @param userId the primary key of the user
2923            * @param passwordReset whether the user should be asked to reset their
2924            password the next time they login
2925            * @return the user
2926            * @throws PortalException if a user with the primary key could not be found
2927            */
2928            public static com.liferay.portal.model.User updatePasswordReset(
2929                    long userId, boolean passwordReset)
2930                    throws com.liferay.portal.kernel.exception.PortalException {
2931                    return getService().updatePasswordReset(userId, passwordReset);
2932            }
2933    
2934            /**
2935            * Updates the user's portrait image.
2936            *
2937            * @param userId the primary key of the user
2938            * @param bytes the new portrait image data
2939            * @return the user
2940            * @throws PortalException if a user with the primary key could not be found
2941            or if the new portrait was invalid
2942            */
2943            public static com.liferay.portal.model.User updatePortrait(long userId,
2944                    byte[] bytes)
2945                    throws com.liferay.portal.kernel.exception.PortalException {
2946                    return getService().updatePortrait(userId, bytes);
2947            }
2948    
2949            /**
2950            * Updates the user's password reset question and answer.
2951            *
2952            * @param userId the primary key of the user
2953            * @param question the user's new password reset question
2954            * @param answer the user's new password reset answer
2955            * @return the user
2956            * @throws PortalException if a user with the primary key could not be found
2957            or if the new question or answer were invalid
2958            */
2959            public static com.liferay.portal.model.User updateReminderQuery(
2960                    long userId, java.lang.String question, java.lang.String answer)
2961                    throws com.liferay.portal.kernel.exception.PortalException {
2962                    return getService().updateReminderQuery(userId, question, answer);
2963            }
2964    
2965            /**
2966            * Updates the user's screen name.
2967            *
2968            * @param userId the primary key of the user
2969            * @param screenName the user's new screen name
2970            * @return the user
2971            * @throws PortalException if a user with the primary key could not be found
2972            or if the new screen name was invalid
2973            */
2974            public static com.liferay.portal.model.User updateScreenName(long userId,
2975                    java.lang.String screenName)
2976                    throws com.liferay.portal.kernel.exception.PortalException {
2977                    return getService().updateScreenName(userId, screenName);
2978            }
2979    
2980            /**
2981            * Updates the user's workflow status.
2982            *
2983            * @param userId the primary key of the user
2984            * @param status the user's new workflow status
2985            * @return the user
2986            * @throws PortalException if a user with the primary key could not be
2987            found
2988            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, int,
2989            ServiceContext)}
2990            */
2991            @Deprecated
2992            public static com.liferay.portal.model.User updateStatus(long userId,
2993                    int status) throws com.liferay.portal.kernel.exception.PortalException {
2994                    return getService().updateStatus(userId, status);
2995            }
2996    
2997            /**
2998            * Updates the user's workflow status.
2999            *
3000            * @param userId the primary key of the user
3001            * @param status the user's new workflow status
3002            * @param serviceContext the service context to be applied. You can specify
3003            an unencrypted custom password (used by an LDAP listener) for the
3004            user via attribute <code>passwordUnencrypted</code>.
3005            * @return the user
3006            * @throws PortalException if a user with the primary key could not be found
3007            */
3008            public static com.liferay.portal.model.User updateStatus(long userId,
3009                    int status, com.liferay.portal.service.ServiceContext serviceContext)
3010                    throws com.liferay.portal.kernel.exception.PortalException {
3011                    return getService().updateStatus(userId, status, serviceContext);
3012            }
3013    
3014            /**
3015            * Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
3016            *
3017            * @param user the user
3018            * @return the user that was updated
3019            */
3020            public static com.liferay.portal.model.User updateUser(
3021                    com.liferay.portal.model.User user) {
3022                    return getService().updateUser(user);
3023            }
3024    
3025            /**
3026            * Updates the user.
3027            *
3028            * @param userId the primary key of the user
3029            * @param oldPassword the user's old password
3030            * @param newPassword1 the user's new password (optionally
3031            <code>null</code>)
3032            * @param newPassword2 the user's new password confirmation (optionally
3033            <code>null</code>)
3034            * @param passwordReset whether the user should be asked to reset their
3035            password the next time they login
3036            * @param reminderQueryQuestion the user's new password reset question
3037            * @param reminderQueryAnswer the user's new password reset answer
3038            * @param screenName the user's new screen name
3039            * @param emailAddress the user's new email address
3040            * @param facebookId the user's new Facebook ID
3041            * @param openId the user's new OpenID
3042            * @param languageId the user's new language ID
3043            * @param timeZoneId the user's new time zone ID
3044            * @param greeting the user's new greeting
3045            * @param comments the user's new comments
3046            * @param firstName the user's new first name
3047            * @param middleName the user's new middle name
3048            * @param lastName the user's new last name
3049            * @param prefixId the user's new name prefix ID
3050            * @param suffixId the user's new name suffix ID
3051            * @param male whether user is male
3052            * @param birthdayMonth the user's new birthday month (0-based, meaning
3053            0 for January)
3054            * @param birthdayDay the user's new birthday day
3055            * @param birthdayYear the user's birthday year
3056            * @param smsSn the user's new SMS screen name
3057            * @param aimSn the user's new AIM screen name
3058            * @param facebookSn the user's new Facebook screen name
3059            * @param icqSn the user's new ICQ screen name
3060            * @param jabberSn the user's new Jabber screen name
3061            * @param msnSn the user's new MSN screen name
3062            * @param mySpaceSn the user's new MySpace screen name
3063            * @param skypeSn the user's new Skype screen name
3064            * @param twitterSn the user's new Twitter screen name
3065            * @param ymSn the user's new Yahoo! Messenger screen name
3066            * @param jobTitle the user's new job title
3067            * @param groupIds the primary keys of the user's groups
3068            * @param organizationIds the primary keys of the user's organizations
3069            * @param roleIds the primary keys of the user's roles
3070            * @param userGroupRoles the user user's group roles
3071            * @param userGroupIds the primary keys of the user's user groups
3072            * @param serviceContext the service context to be applied (optionally
3073            <code>null</code>). Can set the UUID (with the
3074            <code>uuid</code> attribute), asset category IDs, asset tag
3075            names, and expando bridge attributes for the user.
3076            * @return the user
3077            * @throws PortalException if a user with the primary key could not be
3078            found or if the new information was invalid
3079            * @deprecated As of 7.0.0, replaced by {@link #updateUser(long, String,
3080            String, String, boolean, String, String, String, String,
3081            long, String, String, String, String, String, String, String,
3082            String, int, int, boolean, int, int, int, String, String,
3083            String, String, String, String, String, String, String,
3084            String, String, long[], long[], long[], java.util.List,
3085            long[], boolean, byte[], ServiceContext)}
3086            */
3087            @Deprecated
3088            public static com.liferay.portal.model.User updateUser(long userId,
3089                    java.lang.String oldPassword, java.lang.String newPassword1,
3090                    java.lang.String newPassword2, boolean passwordReset,
3091                    java.lang.String reminderQueryQuestion,
3092                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
3093                    java.lang.String emailAddress, long facebookId,
3094                    java.lang.String openId, java.lang.String languageId,
3095                    java.lang.String timeZoneId, java.lang.String greeting,
3096                    java.lang.String comments, java.lang.String firstName,
3097                    java.lang.String middleName, java.lang.String lastName, int prefixId,
3098                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
3099                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
3100                    java.lang.String facebookSn, java.lang.String icqSn,
3101                    java.lang.String jabberSn, java.lang.String msnSn,
3102                    java.lang.String mySpaceSn, java.lang.String skypeSn,
3103                    java.lang.String twitterSn, java.lang.String ymSn,
3104                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
3105                    long[] roleIds,
3106                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
3107                    long[] userGroupIds,
3108                    com.liferay.portal.service.ServiceContext serviceContext)
3109                    throws com.liferay.portal.kernel.exception.PortalException {
3110                    return getService()
3111                                       .updateUser(userId, oldPassword, newPassword1, newPassword2,
3112                            passwordReset, reminderQueryQuestion, reminderQueryAnswer,
3113                            screenName, emailAddress, facebookId, openId, languageId,
3114                            timeZoneId, greeting, comments, firstName, middleName, lastName,
3115                            prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
3116                            smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn,
3117                            skypeSn, twitterSn, ymSn, jobTitle, groupIds, organizationIds,
3118                            roleIds, userGroupRoles, userGroupIds, serviceContext);
3119            }
3120    
3121            /**
3122            * Updates the user.
3123            *
3124            * @param userId the primary key of the user
3125            * @param oldPassword the user's old password
3126            * @param newPassword1 the user's new password (optionally
3127            <code>null</code>)
3128            * @param newPassword2 the user's new password confirmation (optionally
3129            <code>null</code>)
3130            * @param passwordReset whether the user should be asked to reset their
3131            password the next time they login
3132            * @param reminderQueryQuestion the user's new password reset question
3133            * @param reminderQueryAnswer the user's new password reset answer
3134            * @param screenName the user's new screen name
3135            * @param emailAddress the user's new email address
3136            * @param facebookId the user's new Facebook ID
3137            * @param openId the user's new OpenID
3138            * @param portrait whether to update the user's portrait image
3139            * @param portraitBytes the new portrait image data
3140            * @param languageId the user's new language ID
3141            * @param timeZoneId the user's new time zone ID
3142            * @param greeting the user's new greeting
3143            * @param comments the user's new comments
3144            * @param firstName the user's new first name
3145            * @param middleName the user's new middle name
3146            * @param lastName the user's new last name
3147            * @param prefixId the user's new name prefix ID
3148            * @param suffixId the user's new name suffix ID
3149            * @param male whether user is male
3150            * @param birthdayMonth the user's new birthday month (0-based, meaning 0
3151            for January)
3152            * @param birthdayDay the user's new birthday day
3153            * @param birthdayYear the user's birthday year
3154            * @param smsSn the user's new SMS screen name
3155            * @param aimSn the user's new AIM screen name
3156            * @param facebookSn the user's new Facebook screen name
3157            * @param icqSn the user's new ICQ screen name
3158            * @param jabberSn the user's new Jabber screen name
3159            * @param msnSn the user's new MSN screen name
3160            * @param mySpaceSn the user's new MySpace screen name
3161            * @param skypeSn the user's new Skype screen name
3162            * @param twitterSn the user's new Twitter screen name
3163            * @param ymSn the user's new Yahoo! Messenger screen name
3164            * @param jobTitle the user's new job title
3165            * @param groupIds the primary keys of the user's groups
3166            * @param organizationIds the primary keys of the user's organizations
3167            * @param roleIds the primary keys of the user's roles
3168            * @param userGroupRoles the user user's group roles
3169            * @param userGroupIds the primary keys of the user's user groups
3170            * @param serviceContext the service context to be applied (optionally
3171            <code>null</code>). Can set the UUID (with the <code>uuid</code>
3172            attribute), asset category IDs, asset tag names, and expando
3173            bridge attributes for the user.
3174            * @return the user
3175            * @throws PortalException if a user with the primary key could not be found
3176            or if the new information was invalid
3177            */
3178            public static com.liferay.portal.model.User updateUser(long userId,
3179                    java.lang.String oldPassword, java.lang.String newPassword1,
3180                    java.lang.String newPassword2, boolean passwordReset,
3181                    java.lang.String reminderQueryQuestion,
3182                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
3183                    java.lang.String emailAddress, long facebookId,
3184                    java.lang.String openId, boolean portrait, byte[] portraitBytes,
3185                    java.lang.String languageId, java.lang.String timeZoneId,
3186                    java.lang.String greeting, java.lang.String comments,
3187                    java.lang.String firstName, java.lang.String middleName,
3188                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
3189                    int birthdayMonth, int birthdayDay, int birthdayYear,
3190                    java.lang.String smsSn, java.lang.String aimSn,
3191                    java.lang.String facebookSn, java.lang.String icqSn,
3192                    java.lang.String jabberSn, java.lang.String msnSn,
3193                    java.lang.String mySpaceSn, java.lang.String skypeSn,
3194                    java.lang.String twitterSn, java.lang.String ymSn,
3195                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
3196                    long[] roleIds,
3197                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
3198                    long[] userGroupIds,
3199                    com.liferay.portal.service.ServiceContext serviceContext)
3200                    throws com.liferay.portal.kernel.exception.PortalException {
3201                    return getService()
3202                                       .updateUser(userId, oldPassword, newPassword1, newPassword2,
3203                            passwordReset, reminderQueryQuestion, reminderQueryAnswer,
3204                            screenName, emailAddress, facebookId, openId, portrait,
3205                            portraitBytes, languageId, timeZoneId, greeting, comments,
3206                            firstName, middleName, lastName, prefixId, suffixId, male,
3207                            birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn, facebookSn,
3208                            icqSn, jabberSn, msnSn, mySpaceSn, skypeSn, twitterSn, ymSn,
3209                            jobTitle, groupIds, organizationIds, roleIds, userGroupRoles,
3210                            userGroupIds, serviceContext);
3211            }
3212    
3213            /**
3214            * Verifies the email address of the ticket.
3215            *
3216            * @param ticketKey the ticket key
3217            * @throws PortalException if a ticket matching the ticket key could not be
3218            found, if the ticket has expired, if the ticket is an email
3219            address ticket, or if the email address is invalid
3220            */
3221            public static void verifyEmailAddress(java.lang.String ticketKey)
3222                    throws com.liferay.portal.kernel.exception.PortalException {
3223                    getService().verifyEmailAddress(ticketKey);
3224            }
3225    
3226            public static UserLocalService getService() {
3227                    if (_service == null) {
3228                            _service = (UserLocalService)PortalBeanLocatorUtil.locate(UserLocalService.class.getName());
3229    
3230                            ReferenceRegistry.registerReference(UserLocalServiceUtil.class,
3231                                    "_service");
3232                    }
3233    
3234                    return _service;
3235            }
3236    
3237            /**
3238             * @deprecated As of 6.2.0
3239             */
3240            @Deprecated
3241            public void setService(UserLocalService service) {
3242            }
3243    
3244            private static UserLocalService _service;
3245    }