001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * The utility for the user local service. This utility wraps {@link com.liferay.portal.service.impl.UserLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
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    public class UserLocalServiceUtil {
037            /**
038            * Adds the user to the database. Also notifies the appropriate model listeners.
039            *
040            * @param user the user to add
041            * @return the user that was added
042            * @throws SystemException if a system exception occurred
043            */
044            public static com.liferay.portal.model.User addUser(
045                    com.liferay.portal.model.User user)
046                    throws com.liferay.portal.kernel.exception.SystemException {
047                    return getService().addUser(user);
048            }
049    
050            /**
051            * Creates a new user with the primary key. Does not add the user to the database.
052            *
053            * @param userId the primary key for the new user
054            * @return the new user
055            */
056            public static com.liferay.portal.model.User createUser(long userId) {
057                    return getService().createUser(userId);
058            }
059    
060            /**
061            * Deletes the user with the primary key from the database. Also notifies the appropriate model listeners.
062            *
063            * @param userId the primary key of the user to delete
064            * @throws PortalException if a user with the primary key could not be found
065            * @throws SystemException if a system exception occurred
066            */
067            public static void deleteUser(long userId)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException {
070                    getService().deleteUser(userId);
071            }
072    
073            /**
074            * Deletes the user from the database. Also notifies the appropriate model listeners.
075            *
076            * @param user the user to delete
077            * @throws SystemException if a system exception occurred
078            */
079            public static void deleteUser(com.liferay.portal.model.User user)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    getService().deleteUser(user);
082            }
083    
084            /**
085            * Performs a dynamic query on the database and returns the matching rows.
086            *
087            * @param dynamicQuery the dynamic query to search with
088            * @return the matching rows
089            * @throws SystemException if a system exception occurred
090            */
091            @SuppressWarnings("rawtypes")
092            public static java.util.List dynamicQuery(
093                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
094                    throws com.liferay.portal.kernel.exception.SystemException {
095                    return getService().dynamicQuery(dynamicQuery);
096            }
097    
098            /**
099            * Performs a dynamic query on the database and returns a range of the matching rows.
100            *
101            * <p>
102            * 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.
103            * </p>
104            *
105            * @param dynamicQuery the dynamic query to search with
106            * @param start the lower bound of the range of model instances to return
107            * @param end the upper bound of the range of model instances to return (not inclusive)
108            * @return the range of matching rows
109            * @throws SystemException if a system exception occurred
110            */
111            @SuppressWarnings("rawtypes")
112            public static java.util.List dynamicQuery(
113                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
114                    int end) throws com.liferay.portal.kernel.exception.SystemException {
115                    return getService().dynamicQuery(dynamicQuery, start, end);
116            }
117    
118            /**
119            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
120            *
121            * <p>
122            * 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.
123            * </p>
124            *
125            * @param dynamicQuery the dynamic query to search with
126            * @param start the lower bound of the range of model instances to return
127            * @param end the upper bound of the range of model instances to return (not inclusive)
128            * @param orderByComparator the comparator to order the results by
129            * @return the ordered range of matching rows
130            * @throws SystemException if a system exception occurred
131            */
132            @SuppressWarnings("rawtypes")
133            public static java.util.List dynamicQuery(
134                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
135                    int end,
136                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getService()
139                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
140            }
141    
142            /**
143            * Counts the number of rows that match the dynamic query.
144            *
145            * @param dynamicQuery the dynamic query to search with
146            * @return the number of rows that match the dynamic query
147            * @throws SystemException if a system exception occurred
148            */
149            public static long dynamicQueryCount(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151                    throws com.liferay.portal.kernel.exception.SystemException {
152                    return getService().dynamicQueryCount(dynamicQuery);
153            }
154    
155            /**
156            * Gets the user with the primary key.
157            *
158            * @param userId the primary key of the user to get
159            * @return the user
160            * @throws PortalException if a user with the primary key could not be found
161            * @throws SystemException if a system exception occurred
162            */
163            public static com.liferay.portal.model.User getUser(long userId)
164                    throws com.liferay.portal.kernel.exception.PortalException,
165                            com.liferay.portal.kernel.exception.SystemException {
166                    return getService().getUser(userId);
167            }
168    
169            /**
170            * Gets a range of all the users.
171            *
172            * <p>
173            * 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.
174            * </p>
175            *
176            * @param start the lower bound of the range of users to return
177            * @param end the upper bound of the range of users to return (not inclusive)
178            * @return the range of users
179            * @throws SystemException if a system exception occurred
180            */
181            public static java.util.List<com.liferay.portal.model.User> getUsers(
182                    int start, int end)
183                    throws com.liferay.portal.kernel.exception.SystemException {
184                    return getService().getUsers(start, end);
185            }
186    
187            /**
188            * Gets the number of users.
189            *
190            * @return the number of users
191            * @throws SystemException if a system exception occurred
192            */
193            public static int getUsersCount()
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getService().getUsersCount();
196            }
197    
198            /**
199            * Updates the user in the database. Also notifies the appropriate model listeners.
200            *
201            * @param user the user to update
202            * @return the user that was updated
203            * @throws SystemException if a system exception occurred
204            */
205            public static com.liferay.portal.model.User updateUser(
206                    com.liferay.portal.model.User user)
207                    throws com.liferay.portal.kernel.exception.SystemException {
208                    return getService().updateUser(user);
209            }
210    
211            /**
212            * Updates the user in the database. Also notifies the appropriate model listeners.
213            *
214            * @param user the user to update
215            * @param merge whether to merge the user with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
216            * @return the user that was updated
217            * @throws SystemException if a system exception occurred
218            */
219            public static com.liferay.portal.model.User updateUser(
220                    com.liferay.portal.model.User user, boolean merge)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getService().updateUser(user, merge);
223            }
224    
225            public static void addDefaultGroups(long userId)
226                    throws com.liferay.portal.kernel.exception.PortalException,
227                            com.liferay.portal.kernel.exception.SystemException {
228                    getService().addDefaultGroups(userId);
229            }
230    
231            public static void addDefaultRoles(long userId)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException {
234                    getService().addDefaultRoles(userId);
235            }
236    
237            public static void addDefaultUserGroups(long userId)
238                    throws com.liferay.portal.kernel.exception.PortalException,
239                            com.liferay.portal.kernel.exception.SystemException {
240                    getService().addDefaultUserGroups(userId);
241            }
242    
243            public static void addGroupUsers(long groupId, long[] userIds)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    getService().addGroupUsers(groupId, userIds);
247            }
248    
249            public static void addOrganizationUsers(long organizationId, long[] userIds)
250                    throws com.liferay.portal.kernel.exception.PortalException,
251                            com.liferay.portal.kernel.exception.SystemException {
252                    getService().addOrganizationUsers(organizationId, userIds);
253            }
254    
255            public static void addPasswordPolicyUsers(long passwordPolicyId,
256                    long[] userIds)
257                    throws com.liferay.portal.kernel.exception.SystemException {
258                    getService().addPasswordPolicyUsers(passwordPolicyId, userIds);
259            }
260    
261            public static void addRoleUsers(long roleId, long[] userIds)
262                    throws com.liferay.portal.kernel.exception.PortalException,
263                            com.liferay.portal.kernel.exception.SystemException {
264                    getService().addRoleUsers(roleId, userIds);
265            }
266    
267            public static void addTeamUsers(long teamId, long[] userIds)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException {
270                    getService().addTeamUsers(teamId, userIds);
271            }
272    
273            public static com.liferay.portal.model.User addUser(long creatorUserId,
274                    long companyId, boolean autoPassword, java.lang.String password1,
275                    java.lang.String password2, boolean autoScreenName,
276                    java.lang.String screenName, java.lang.String emailAddress,
277                    long facebookId, java.lang.String openId, java.util.Locale locale,
278                    java.lang.String firstName, java.lang.String middleName,
279                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
280                    int birthdayMonth, int birthdayDay, int birthdayYear,
281                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
282                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
283                    com.liferay.portal.service.ServiceContext serviceContext)
284                    throws com.liferay.portal.kernel.exception.PortalException,
285                            com.liferay.portal.kernel.exception.SystemException {
286                    return getService()
287                                       .addUser(creatorUserId, companyId, autoPassword, password1,
288                            password2, autoScreenName, screenName, emailAddress, facebookId,
289                            openId, locale, firstName, middleName, lastName, prefixId,
290                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
291                            groupIds, organizationIds, roleIds, userGroupIds, sendEmail,
292                            serviceContext);
293            }
294    
295            public static void addUserGroupUsers(long userGroupId, long[] userIds)
296                    throws com.liferay.portal.kernel.exception.PortalException,
297                            com.liferay.portal.kernel.exception.SystemException {
298                    getService().addUserGroupUsers(userGroupId, userIds);
299            }
300    
301            public static int authenticateByEmailAddress(long companyId,
302                    java.lang.String emailAddress, java.lang.String password,
303                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
304                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
305                    java.util.Map<java.lang.String, java.lang.Object> resultsMap)
306                    throws com.liferay.portal.kernel.exception.PortalException,
307                            com.liferay.portal.kernel.exception.SystemException {
308                    return getService()
309                                       .authenticateByEmailAddress(companyId, emailAddress,
310                            password, headerMap, parameterMap, resultsMap);
311            }
312    
313            public static int authenticateByScreenName(long companyId,
314                    java.lang.String screenName, java.lang.String password,
315                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
316                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
317                    java.util.Map<java.lang.String, java.lang.Object> resultsMap)
318                    throws com.liferay.portal.kernel.exception.PortalException,
319                            com.liferay.portal.kernel.exception.SystemException {
320                    return getService()
321                                       .authenticateByScreenName(companyId, screenName, password,
322                            headerMap, parameterMap, resultsMap);
323            }
324    
325            public static int authenticateByUserId(long companyId, long userId,
326                    java.lang.String password,
327                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
328                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
329                    java.util.Map<java.lang.String, java.lang.Object> resultsMap)
330                    throws com.liferay.portal.kernel.exception.PortalException,
331                            com.liferay.portal.kernel.exception.SystemException {
332                    return getService()
333                                       .authenticateByUserId(companyId, userId, password,
334                            headerMap, parameterMap, resultsMap);
335            }
336    
337            public static long authenticateForBasic(long companyId,
338                    java.lang.String authType, java.lang.String login,
339                    java.lang.String password)
340                    throws com.liferay.portal.kernel.exception.PortalException,
341                            com.liferay.portal.kernel.exception.SystemException {
342                    return getService()
343                                       .authenticateForBasic(companyId, authType, login, password);
344            }
345    
346            public static long authenticateForDigest(long companyId,
347                    java.lang.String username, java.lang.String realm,
348                    java.lang.String nonce, java.lang.String method, java.lang.String uri,
349                    java.lang.String response)
350                    throws com.liferay.portal.kernel.exception.PortalException,
351                            com.liferay.portal.kernel.exception.SystemException {
352                    return getService()
353                                       .authenticateForDigest(companyId, username, realm, nonce,
354                            method, uri, response);
355            }
356    
357            public static boolean authenticateForJAAS(long userId,
358                    java.lang.String encPassword) {
359                    return getService().authenticateForJAAS(userId, encPassword);
360            }
361    
362            public static void checkLockout(com.liferay.portal.model.User user)
363                    throws com.liferay.portal.kernel.exception.PortalException,
364                            com.liferay.portal.kernel.exception.SystemException {
365                    getService().checkLockout(user);
366            }
367    
368            public static void checkLoginFailure(com.liferay.portal.model.User user)
369                    throws com.liferay.portal.kernel.exception.SystemException {
370                    getService().checkLoginFailure(user);
371            }
372    
373            public static void checkLoginFailureByEmailAddress(long companyId,
374                    java.lang.String emailAddress)
375                    throws com.liferay.portal.kernel.exception.PortalException,
376                            com.liferay.portal.kernel.exception.SystemException {
377                    getService().checkLoginFailureByEmailAddress(companyId, emailAddress);
378            }
379    
380            public static void checkLoginFailureById(long userId)
381                    throws com.liferay.portal.kernel.exception.PortalException,
382                            com.liferay.portal.kernel.exception.SystemException {
383                    getService().checkLoginFailureById(userId);
384            }
385    
386            public static void checkLoginFailureByScreenName(long companyId,
387                    java.lang.String screenName)
388                    throws com.liferay.portal.kernel.exception.PortalException,
389                            com.liferay.portal.kernel.exception.SystemException {
390                    getService().checkLoginFailureByScreenName(companyId, screenName);
391            }
392    
393            public static void checkPasswordExpired(com.liferay.portal.model.User user)
394                    throws com.liferay.portal.kernel.exception.PortalException,
395                            com.liferay.portal.kernel.exception.SystemException {
396                    getService().checkPasswordExpired(user);
397            }
398    
399            public static void clearOrganizationUsers(long organizationId)
400                    throws com.liferay.portal.kernel.exception.SystemException {
401                    getService().clearOrganizationUsers(organizationId);
402            }
403    
404            public static void clearUserGroupUsers(long userGroupId)
405                    throws com.liferay.portal.kernel.exception.SystemException {
406                    getService().clearUserGroupUsers(userGroupId);
407            }
408    
409            public static com.liferay.portal.kernel.util.KeyValuePair decryptUserId(
410                    long companyId, java.lang.String name, java.lang.String password)
411                    throws com.liferay.portal.kernel.exception.PortalException,
412                            com.liferay.portal.kernel.exception.SystemException {
413                    return getService().decryptUserId(companyId, name, password);
414            }
415    
416            public static void deletePortrait(long userId)
417                    throws com.liferay.portal.kernel.exception.PortalException,
418                            com.liferay.portal.kernel.exception.SystemException {
419                    getService().deletePortrait(userId);
420            }
421    
422            public static void deleteRoleUser(long roleId, long userId)
423                    throws com.liferay.portal.kernel.exception.PortalException,
424                            com.liferay.portal.kernel.exception.SystemException {
425                    getService().deleteRoleUser(roleId, userId);
426            }
427    
428            public static java.lang.String encryptUserId(java.lang.String name)
429                    throws com.liferay.portal.kernel.exception.PortalException,
430                            com.liferay.portal.kernel.exception.SystemException {
431                    return getService().encryptUserId(name);
432            }
433    
434            public static java.util.List<com.liferay.portal.model.User> getCompanyUsers(
435                    long companyId, int start, int end)
436                    throws com.liferay.portal.kernel.exception.SystemException {
437                    return getService().getCompanyUsers(companyId, start, end);
438            }
439    
440            public static int getCompanyUsersCount(long companyId)
441                    throws com.liferay.portal.kernel.exception.SystemException {
442                    return getService().getCompanyUsersCount(companyId);
443            }
444    
445            public static com.liferay.portal.model.User getDefaultUser(long companyId)
446                    throws com.liferay.portal.kernel.exception.PortalException,
447                            com.liferay.portal.kernel.exception.SystemException {
448                    return getService().getDefaultUser(companyId);
449            }
450    
451            public static long getDefaultUserId(long companyId)
452                    throws com.liferay.portal.kernel.exception.PortalException,
453                            com.liferay.portal.kernel.exception.SystemException {
454                    return getService().getDefaultUserId(companyId);
455            }
456    
457            public static long[] getGroupUserIds(long groupId)
458                    throws com.liferay.portal.kernel.exception.SystemException {
459                    return getService().getGroupUserIds(groupId);
460            }
461    
462            public static java.util.List<com.liferay.portal.model.User> getGroupUsers(
463                    long groupId)
464                    throws com.liferay.portal.kernel.exception.SystemException {
465                    return getService().getGroupUsers(groupId);
466            }
467    
468            public static int getGroupUsersCount(long groupId)
469                    throws com.liferay.portal.kernel.exception.SystemException {
470                    return getService().getGroupUsersCount(groupId);
471            }
472    
473            public static int getGroupUsersCount(long groupId, boolean active)
474                    throws com.liferay.portal.kernel.exception.PortalException,
475                            com.liferay.portal.kernel.exception.SystemException {
476                    return getService().getGroupUsersCount(groupId, active);
477            }
478    
479            public static java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries(
480                    java.lang.String type)
481                    throws com.liferay.portal.kernel.exception.SystemException {
482                    return getService().getNoAnnouncementsDeliveries(type);
483            }
484    
485            public static java.util.List<com.liferay.portal.model.User> getNoContacts()
486                    throws com.liferay.portal.kernel.exception.SystemException {
487                    return getService().getNoContacts();
488            }
489    
490            public static java.util.List<com.liferay.portal.model.User> getNoGroups()
491                    throws com.liferay.portal.kernel.exception.SystemException {
492                    return getService().getNoGroups();
493            }
494    
495            public static long[] getOrganizationUserIds(long organizationId)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    return getService().getOrganizationUserIds(organizationId);
498            }
499    
500            public static java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
501                    long organizationId)
502                    throws com.liferay.portal.kernel.exception.SystemException {
503                    return getService().getOrganizationUsers(organizationId);
504            }
505    
506            public static int getOrganizationUsersCount(long organizationId)
507                    throws com.liferay.portal.kernel.exception.SystemException {
508                    return getService().getOrganizationUsersCount(organizationId);
509            }
510    
511            public static int getOrganizationUsersCount(long organizationId,
512                    boolean active)
513                    throws com.liferay.portal.kernel.exception.PortalException,
514                            com.liferay.portal.kernel.exception.SystemException {
515                    return getService().getOrganizationUsersCount(organizationId, active);
516            }
517    
518            public static long[] getRoleUserIds(long roleId)
519                    throws com.liferay.portal.kernel.exception.SystemException {
520                    return getService().getRoleUserIds(roleId);
521            }
522    
523            public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
524                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
525                    return getService().getRoleUsers(roleId);
526            }
527    
528            public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
529                    long roleId, int start, int end)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return getService().getRoleUsers(roleId, start, end);
532            }
533    
534            public static int getRoleUsersCount(long roleId)
535                    throws com.liferay.portal.kernel.exception.SystemException {
536                    return getService().getRoleUsersCount(roleId);
537            }
538    
539            public static int getRoleUsersCount(long roleId, boolean active)
540                    throws com.liferay.portal.kernel.exception.PortalException,
541                            com.liferay.portal.kernel.exception.SystemException {
542                    return getService().getRoleUsersCount(roleId, active);
543            }
544    
545            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
546                    long userId, int type, int start, int end,
547                    com.liferay.portal.kernel.util.OrderByComparator obc)
548                    throws com.liferay.portal.kernel.exception.PortalException,
549                            com.liferay.portal.kernel.exception.SystemException {
550                    return getService().getSocialUsers(userId, type, start, end, obc);
551            }
552    
553            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
554                    long userId, int start, int end,
555                    com.liferay.portal.kernel.util.OrderByComparator obc)
556                    throws com.liferay.portal.kernel.exception.PortalException,
557                            com.liferay.portal.kernel.exception.SystemException {
558                    return getService().getSocialUsers(userId, start, end, obc);
559            }
560    
561            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
562                    long userId1, long userId2, int type, int start, int end,
563                    com.liferay.portal.kernel.util.OrderByComparator obc)
564                    throws com.liferay.portal.kernel.exception.PortalException,
565                            com.liferay.portal.kernel.exception.SystemException {
566                    return getService()
567                                       .getSocialUsers(userId1, userId2, type, start, end, obc);
568            }
569    
570            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
571                    long userId1, long userId2, int start, int end,
572                    com.liferay.portal.kernel.util.OrderByComparator obc)
573                    throws com.liferay.portal.kernel.exception.PortalException,
574                            com.liferay.portal.kernel.exception.SystemException {
575                    return getService().getSocialUsers(userId1, userId2, start, end, obc);
576            }
577    
578            public static int getSocialUsersCount(long userId)
579                    throws com.liferay.portal.kernel.exception.PortalException,
580                            com.liferay.portal.kernel.exception.SystemException {
581                    return getService().getSocialUsersCount(userId);
582            }
583    
584            public static int getSocialUsersCount(long userId, int type)
585                    throws com.liferay.portal.kernel.exception.PortalException,
586                            com.liferay.portal.kernel.exception.SystemException {
587                    return getService().getSocialUsersCount(userId, type);
588            }
589    
590            public static int getSocialUsersCount(long userId1, long userId2)
591                    throws com.liferay.portal.kernel.exception.PortalException,
592                            com.liferay.portal.kernel.exception.SystemException {
593                    return getService().getSocialUsersCount(userId1, userId2);
594            }
595    
596            public static int getSocialUsersCount(long userId1, long userId2, int type)
597                    throws com.liferay.portal.kernel.exception.PortalException,
598                            com.liferay.portal.kernel.exception.SystemException {
599                    return getService().getSocialUsersCount(userId1, userId2, type);
600            }
601    
602            public static com.liferay.portal.model.User getUserByContactId(
603                    long contactId)
604                    throws com.liferay.portal.kernel.exception.PortalException,
605                            com.liferay.portal.kernel.exception.SystemException {
606                    return getService().getUserByContactId(contactId);
607            }
608    
609            public static com.liferay.portal.model.User getUserByEmailAddress(
610                    long companyId, java.lang.String emailAddress)
611                    throws com.liferay.portal.kernel.exception.PortalException,
612                            com.liferay.portal.kernel.exception.SystemException {
613                    return getService().getUserByEmailAddress(companyId, emailAddress);
614            }
615    
616            public static com.liferay.portal.model.User getUserByFacebookId(
617                    long companyId, long facebookId)
618                    throws com.liferay.portal.kernel.exception.PortalException,
619                            com.liferay.portal.kernel.exception.SystemException {
620                    return getService().getUserByFacebookId(companyId, facebookId);
621            }
622    
623            public static com.liferay.portal.model.User getUserById(long userId)
624                    throws com.liferay.portal.kernel.exception.PortalException,
625                            com.liferay.portal.kernel.exception.SystemException {
626                    return getService().getUserById(userId);
627            }
628    
629            public static com.liferay.portal.model.User getUserById(long companyId,
630                    long userId)
631                    throws com.liferay.portal.kernel.exception.PortalException,
632                            com.liferay.portal.kernel.exception.SystemException {
633                    return getService().getUserById(companyId, userId);
634            }
635    
636            public static com.liferay.portal.model.User getUserByOpenId(
637                    long companyId, java.lang.String openId)
638                    throws com.liferay.portal.kernel.exception.PortalException,
639                            com.liferay.portal.kernel.exception.SystemException {
640                    return getService().getUserByOpenId(companyId, openId);
641            }
642    
643            public static com.liferay.portal.model.User getUserByPortraitId(
644                    long portraitId)
645                    throws com.liferay.portal.kernel.exception.PortalException,
646                            com.liferay.portal.kernel.exception.SystemException {
647                    return getService().getUserByPortraitId(portraitId);
648            }
649    
650            public static com.liferay.portal.model.User getUserByScreenName(
651                    long companyId, java.lang.String screenName)
652                    throws com.liferay.portal.kernel.exception.PortalException,
653                            com.liferay.portal.kernel.exception.SystemException {
654                    return getService().getUserByScreenName(companyId, screenName);
655            }
656    
657            public static com.liferay.portal.model.User getUserByUuid(
658                    java.lang.String uuid)
659                    throws com.liferay.portal.kernel.exception.PortalException,
660                            com.liferay.portal.kernel.exception.SystemException {
661                    return getService().getUserByUuid(uuid);
662            }
663    
664            public static java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
665                    long userGroupId)
666                    throws com.liferay.portal.kernel.exception.SystemException {
667                    return getService().getUserGroupUsers(userGroupId);
668            }
669    
670            public static int getUserGroupUsersCount(long userGroupId)
671                    throws com.liferay.portal.kernel.exception.SystemException {
672                    return getService().getUserGroupUsersCount(userGroupId);
673            }
674    
675            public static int getUserGroupUsersCount(long userGroupId, boolean active)
676                    throws com.liferay.portal.kernel.exception.PortalException,
677                            com.liferay.portal.kernel.exception.SystemException {
678                    return getService().getUserGroupUsersCount(userGroupId, active);
679            }
680    
681            public static long getUserIdByEmailAddress(long companyId,
682                    java.lang.String emailAddress)
683                    throws com.liferay.portal.kernel.exception.PortalException,
684                            com.liferay.portal.kernel.exception.SystemException {
685                    return getService().getUserIdByEmailAddress(companyId, emailAddress);
686            }
687    
688            public static long getUserIdByScreenName(long companyId,
689                    java.lang.String screenName)
690                    throws com.liferay.portal.kernel.exception.PortalException,
691                            com.liferay.portal.kernel.exception.SystemException {
692                    return getService().getUserIdByScreenName(companyId, screenName);
693            }
694    
695            public static boolean hasGroupUser(long groupId, long userId)
696                    throws com.liferay.portal.kernel.exception.SystemException {
697                    return getService().hasGroupUser(groupId, userId);
698            }
699    
700            public static boolean hasOrganizationUser(long organizationId, long userId)
701                    throws com.liferay.portal.kernel.exception.SystemException {
702                    return getService().hasOrganizationUser(organizationId, userId);
703            }
704    
705            public static boolean hasPasswordPolicyUser(long passwordPolicyId,
706                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
707                    return getService().hasPasswordPolicyUser(passwordPolicyId, userId);
708            }
709    
710            public static boolean hasRoleUser(long roleId, long userId)
711                    throws com.liferay.portal.kernel.exception.SystemException {
712                    return getService().hasRoleUser(roleId, userId);
713            }
714    
715            /**
716            * Returns <code>true</code> if the user has the role.
717            *
718            * @return <code>true</code> if the user has the role
719            */
720            public static boolean hasRoleUser(long companyId, java.lang.String name,
721                    long userId, boolean inherited)
722                    throws com.liferay.portal.kernel.exception.PortalException,
723                            com.liferay.portal.kernel.exception.SystemException {
724                    return getService().hasRoleUser(companyId, name, userId, inherited);
725            }
726    
727            public static boolean hasTeamUser(long teamId, long userId)
728                    throws com.liferay.portal.kernel.exception.SystemException {
729                    return getService().hasTeamUser(teamId, userId);
730            }
731    
732            public static boolean hasUserGroupUser(long userGroupId, long userId)
733                    throws com.liferay.portal.kernel.exception.SystemException {
734                    return getService().hasUserGroupUser(userGroupId, userId);
735            }
736    
737            public static boolean isPasswordExpired(com.liferay.portal.model.User user)
738                    throws com.liferay.portal.kernel.exception.PortalException,
739                            com.liferay.portal.kernel.exception.SystemException {
740                    return getService().isPasswordExpired(user);
741            }
742    
743            public static boolean isPasswordExpiringSoon(
744                    com.liferay.portal.model.User user)
745                    throws com.liferay.portal.kernel.exception.PortalException,
746                            com.liferay.portal.kernel.exception.SystemException {
747                    return getService().isPasswordExpiringSoon(user);
748            }
749    
750            public static java.util.List<com.liferay.portal.model.User> search(
751                    long companyId, java.lang.String keywords, java.lang.Boolean active,
752                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
753                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
754                    throws com.liferay.portal.kernel.exception.SystemException {
755                    return getService()
756                                       .search(companyId, keywords, active, params, start, end, obc);
757            }
758    
759            public static com.liferay.portal.kernel.search.Hits search(long companyId,
760                    java.lang.String keywords, java.lang.Boolean active,
761                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
762                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
763                    throws com.liferay.portal.kernel.exception.SystemException {
764                    return getService()
765                                       .search(companyId, keywords, active, params, start, end, sort);
766            }
767    
768            public static java.util.List<com.liferay.portal.model.User> search(
769                    long companyId, java.lang.String firstName,
770                    java.lang.String middleName, java.lang.String lastName,
771                    java.lang.String screenName, java.lang.String emailAddress,
772                    java.lang.Boolean active,
773                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
774                    boolean andSearch, int start, int end,
775                    com.liferay.portal.kernel.util.OrderByComparator obc)
776                    throws com.liferay.portal.kernel.exception.SystemException {
777                    return getService()
778                                       .search(companyId, firstName, middleName, lastName,
779                            screenName, emailAddress, active, params, andSearch, start, end, obc);
780            }
781    
782            public static com.liferay.portal.kernel.search.Hits search(long companyId,
783                    java.lang.String firstName, java.lang.String middleName,
784                    java.lang.String lastName, java.lang.String screenName,
785                    java.lang.String emailAddress, java.lang.Boolean active,
786                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
787                    boolean andSearch, int start, int end,
788                    com.liferay.portal.kernel.search.Sort sort)
789                    throws com.liferay.portal.kernel.exception.SystemException {
790                    return getService()
791                                       .search(companyId, firstName, middleName, lastName,
792                            screenName, emailAddress, active, params, andSearch, start, end,
793                            sort);
794            }
795    
796            public static int searchCount(long companyId, java.lang.String keywords,
797                    java.lang.Boolean active,
798                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
799                    throws com.liferay.portal.kernel.exception.SystemException {
800                    return getService().searchCount(companyId, keywords, active, params);
801            }
802    
803            public static int searchCount(long companyId, java.lang.String firstName,
804                    java.lang.String middleName, java.lang.String lastName,
805                    java.lang.String screenName, java.lang.String emailAddress,
806                    java.lang.Boolean active,
807                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
808                    boolean andSearch)
809                    throws com.liferay.portal.kernel.exception.SystemException {
810                    return getService()
811                                       .searchCount(companyId, firstName, middleName, lastName,
812                            screenName, emailAddress, active, params, andSearch);
813            }
814    
815            public static void sendPassword(long companyId,
816                    java.lang.String emailAddress, java.lang.String remoteAddr,
817                    java.lang.String remoteHost, java.lang.String userAgent,
818                    java.lang.String fromName, java.lang.String fromAddress,
819                    java.lang.String subject, java.lang.String body,
820                    com.liferay.portal.service.ServiceContext serviceContext)
821                    throws com.liferay.portal.kernel.exception.PortalException,
822                            com.liferay.portal.kernel.exception.SystemException {
823                    getService()
824                            .sendPassword(companyId, emailAddress, remoteAddr, remoteHost,
825                            userAgent, fromName, fromAddress, subject, body, serviceContext);
826            }
827    
828            public static void setRoleUsers(long roleId, long[] userIds)
829                    throws com.liferay.portal.kernel.exception.PortalException,
830                            com.liferay.portal.kernel.exception.SystemException {
831                    getService().setRoleUsers(roleId, userIds);
832            }
833    
834            public static void setUserGroupUsers(long userGroupId, long[] userIds)
835                    throws com.liferay.portal.kernel.exception.PortalException,
836                            com.liferay.portal.kernel.exception.SystemException {
837                    getService().setUserGroupUsers(userGroupId, userIds);
838            }
839    
840            public static void unsetGroupUsers(long groupId, long[] userIds)
841                    throws com.liferay.portal.kernel.exception.PortalException,
842                            com.liferay.portal.kernel.exception.SystemException {
843                    getService().unsetGroupUsers(groupId, userIds);
844            }
845    
846            public static void unsetOrganizationUsers(long organizationId,
847                    long[] userIds)
848                    throws com.liferay.portal.kernel.exception.PortalException,
849                            com.liferay.portal.kernel.exception.SystemException {
850                    getService().unsetOrganizationUsers(organizationId, userIds);
851            }
852    
853            public static void unsetPasswordPolicyUsers(long passwordPolicyId,
854                    long[] userIds)
855                    throws com.liferay.portal.kernel.exception.SystemException {
856                    getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds);
857            }
858    
859            public static void unsetRoleUsers(long roleId,
860                    java.util.List<com.liferay.portal.model.User> users)
861                    throws com.liferay.portal.kernel.exception.PortalException,
862                            com.liferay.portal.kernel.exception.SystemException {
863                    getService().unsetRoleUsers(roleId, users);
864            }
865    
866            public static void unsetRoleUsers(long roleId, long[] userIds)
867                    throws com.liferay.portal.kernel.exception.PortalException,
868                            com.liferay.portal.kernel.exception.SystemException {
869                    getService().unsetRoleUsers(roleId, userIds);
870            }
871    
872            public static void unsetTeamUsers(long teamId, long[] userIds)
873                    throws com.liferay.portal.kernel.exception.PortalException,
874                            com.liferay.portal.kernel.exception.SystemException {
875                    getService().unsetTeamUsers(teamId, userIds);
876            }
877    
878            public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
879                    throws com.liferay.portal.kernel.exception.PortalException,
880                            com.liferay.portal.kernel.exception.SystemException {
881                    getService().unsetUserGroupUsers(userGroupId, userIds);
882            }
883    
884            public static com.liferay.portal.model.User updateActive(long userId,
885                    boolean active)
886                    throws com.liferay.portal.kernel.exception.PortalException,
887                            com.liferay.portal.kernel.exception.SystemException {
888                    return getService().updateActive(userId, active);
889            }
890    
891            public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
892                    long userId, boolean agreedToTermsOfUse)
893                    throws com.liferay.portal.kernel.exception.PortalException,
894                            com.liferay.portal.kernel.exception.SystemException {
895                    return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse);
896            }
897    
898            public static void updateAsset(long userId,
899                    com.liferay.portal.model.User user, long[] assetCategoryIds,
900                    java.lang.String[] assetTagNames)
901                    throws com.liferay.portal.kernel.exception.PortalException,
902                            com.liferay.portal.kernel.exception.SystemException {
903                    getService().updateAsset(userId, user, assetCategoryIds, assetTagNames);
904            }
905    
906            public static com.liferay.portal.model.User updateCreateDate(long userId,
907                    java.util.Date createDate)
908                    throws com.liferay.portal.kernel.exception.PortalException,
909                            com.liferay.portal.kernel.exception.SystemException {
910                    return getService().updateCreateDate(userId, createDate);
911            }
912    
913            public static com.liferay.portal.model.User updateEmailAddress(
914                    long userId, java.lang.String password, java.lang.String emailAddress1,
915                    java.lang.String emailAddress2)
916                    throws com.liferay.portal.kernel.exception.PortalException,
917                            com.liferay.portal.kernel.exception.SystemException {
918                    return getService()
919                                       .updateEmailAddress(userId, password, emailAddress1,
920                            emailAddress2);
921            }
922    
923            public static void updateGroups(long userId, long[] newGroupIds)
924                    throws com.liferay.portal.kernel.exception.PortalException,
925                            com.liferay.portal.kernel.exception.SystemException {
926                    getService().updateGroups(userId, newGroupIds);
927            }
928    
929            public static com.liferay.portal.model.User updateLastLogin(long userId,
930                    java.lang.String loginIP)
931                    throws com.liferay.portal.kernel.exception.PortalException,
932                            com.liferay.portal.kernel.exception.SystemException {
933                    return getService().updateLastLogin(userId, loginIP);
934            }
935    
936            public static com.liferay.portal.model.User updateLockout(
937                    com.liferay.portal.model.User user, boolean lockout)
938                    throws com.liferay.portal.kernel.exception.PortalException,
939                            com.liferay.portal.kernel.exception.SystemException {
940                    return getService().updateLockout(user, lockout);
941            }
942    
943            public static com.liferay.portal.model.User updateLockoutByEmailAddress(
944                    long companyId, java.lang.String emailAddress, boolean lockout)
945                    throws com.liferay.portal.kernel.exception.PortalException,
946                            com.liferay.portal.kernel.exception.SystemException {
947                    return getService()
948                                       .updateLockoutByEmailAddress(companyId, emailAddress, lockout);
949            }
950    
951            public static com.liferay.portal.model.User updateLockoutById(long userId,
952                    boolean lockout)
953                    throws com.liferay.portal.kernel.exception.PortalException,
954                            com.liferay.portal.kernel.exception.SystemException {
955                    return getService().updateLockoutById(userId, lockout);
956            }
957    
958            public static com.liferay.portal.model.User updateLockoutByScreenName(
959                    long companyId, java.lang.String screenName, boolean lockout)
960                    throws com.liferay.portal.kernel.exception.PortalException,
961                            com.liferay.portal.kernel.exception.SystemException {
962                    return getService()
963                                       .updateLockoutByScreenName(companyId, screenName, lockout);
964            }
965    
966            public static com.liferay.portal.model.User updateModifiedDate(
967                    long userId, java.util.Date modifiedDate)
968                    throws com.liferay.portal.kernel.exception.PortalException,
969                            com.liferay.portal.kernel.exception.SystemException {
970                    return getService().updateModifiedDate(userId, modifiedDate);
971            }
972    
973            public static void updateOpenId(long userId, java.lang.String openId)
974                    throws com.liferay.portal.kernel.exception.PortalException,
975                            com.liferay.portal.kernel.exception.SystemException {
976                    getService().updateOpenId(userId, openId);
977            }
978    
979            public static void updateOrganizations(long userId,
980                    long[] newOrganizationIds)
981                    throws com.liferay.portal.kernel.exception.PortalException,
982                            com.liferay.portal.kernel.exception.SystemException {
983                    getService().updateOrganizations(userId, newOrganizationIds);
984            }
985    
986            public static com.liferay.portal.model.User updatePassword(long userId,
987                    java.lang.String password1, java.lang.String password2,
988                    boolean passwordReset)
989                    throws com.liferay.portal.kernel.exception.PortalException,
990                            com.liferay.portal.kernel.exception.SystemException {
991                    return getService()
992                                       .updatePassword(userId, password1, password2, passwordReset);
993            }
994    
995            public static com.liferay.portal.model.User updatePassword(long userId,
996                    java.lang.String password1, java.lang.String password2,
997                    boolean passwordReset, boolean silentUpdate)
998                    throws com.liferay.portal.kernel.exception.PortalException,
999                            com.liferay.portal.kernel.exception.SystemException {
1000                    return getService()
1001                                       .updatePassword(userId, password1, password2, passwordReset,
1002                            silentUpdate);
1003            }
1004    
1005            public static com.liferay.portal.model.User updatePasswordManually(
1006                    long userId, java.lang.String password, boolean passwordEncrypted,
1007                    boolean passwordReset, java.util.Date passwordModifiedDate)
1008                    throws com.liferay.portal.kernel.exception.PortalException,
1009                            com.liferay.portal.kernel.exception.SystemException {
1010                    return getService()
1011                                       .updatePasswordManually(userId, password, passwordEncrypted,
1012                            passwordReset, passwordModifiedDate);
1013            }
1014    
1015            public static void updatePasswordReset(long userId, boolean passwordReset)
1016                    throws com.liferay.portal.kernel.exception.PortalException,
1017                            com.liferay.portal.kernel.exception.SystemException {
1018                    getService().updatePasswordReset(userId, passwordReset);
1019            }
1020    
1021            public static void updatePortrait(long userId, byte[] bytes)
1022                    throws com.liferay.portal.kernel.exception.PortalException,
1023                            com.liferay.portal.kernel.exception.SystemException {
1024                    getService().updatePortrait(userId, bytes);
1025            }
1026    
1027            public static void updateReminderQuery(long userId,
1028                    java.lang.String question, java.lang.String answer)
1029                    throws com.liferay.portal.kernel.exception.PortalException,
1030                            com.liferay.portal.kernel.exception.SystemException {
1031                    getService().updateReminderQuery(userId, question, answer);
1032            }
1033    
1034            public static void updateScreenName(long userId, java.lang.String screenName)
1035                    throws com.liferay.portal.kernel.exception.PortalException,
1036                            com.liferay.portal.kernel.exception.SystemException {
1037                    getService().updateScreenName(userId, screenName);
1038            }
1039    
1040            public static com.liferay.portal.model.User updateUser(long userId,
1041                    java.lang.String oldPassword, java.lang.String newPassword1,
1042                    java.lang.String newPassword2, boolean passwordReset,
1043                    java.lang.String reminderQueryQuestion,
1044                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
1045                    java.lang.String emailAddress, long facebookId,
1046                    java.lang.String openId, java.lang.String languageId,
1047                    java.lang.String timeZoneId, java.lang.String greeting,
1048                    java.lang.String comments, java.lang.String firstName,
1049                    java.lang.String middleName, java.lang.String lastName, int prefixId,
1050                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
1051                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
1052                    java.lang.String facebookSn, java.lang.String icqSn,
1053                    java.lang.String jabberSn, java.lang.String msnSn,
1054                    java.lang.String mySpaceSn, java.lang.String skypeSn,
1055                    java.lang.String twitterSn, java.lang.String ymSn,
1056                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1057                    long[] roleIds,
1058                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
1059                    long[] userGroupIds,
1060                    com.liferay.portal.service.ServiceContext serviceContext)
1061                    throws com.liferay.portal.kernel.exception.PortalException,
1062                            com.liferay.portal.kernel.exception.SystemException {
1063                    return getService()
1064                                       .updateUser(userId, oldPassword, newPassword1, newPassword2,
1065                            passwordReset, reminderQueryQuestion, reminderQueryAnswer,
1066                            screenName, emailAddress, facebookId, openId, languageId,
1067                            timeZoneId, greeting, comments, firstName, middleName, lastName,
1068                            prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
1069                            smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn,
1070                            skypeSn, twitterSn, ymSn, jobTitle, groupIds, organizationIds,
1071                            roleIds, userGroupRoles, userGroupIds, serviceContext);
1072            }
1073    
1074            public static UserLocalService getService() {
1075                    if (_service == null) {
1076                            _service = (UserLocalService)PortalBeanLocatorUtil.locate(UserLocalService.class.getName());
1077                    }
1078    
1079                    return _service;
1080            }
1081    
1082            public void setService(UserLocalService service) {
1083                    _service = service;
1084            }
1085    
1086            private static UserLocalService _service;
1087    }