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