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