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