001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link UserLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       UserLocalService
030     * @generated
031     */
032    public class UserLocalServiceUtil {
033            public static com.liferay.portal.model.User addUser(
034                    com.liferay.portal.model.User user)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addUser(user);
037            }
038    
039            public static com.liferay.portal.model.User createUser(long userId) {
040                    return getService().createUser(userId);
041            }
042    
043            public static void deleteUser(long userId)
044                    throws com.liferay.portal.kernel.exception.PortalException,
045                            com.liferay.portal.kernel.exception.SystemException {
046                    getService().deleteUser(userId);
047            }
048    
049            public static void deleteUser(com.liferay.portal.model.User user)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    getService().deleteUser(user);
052            }
053    
054            @SuppressWarnings("unchecked")
055            public static java.util.List dynamicQuery(
056                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
057                    throws com.liferay.portal.kernel.exception.SystemException {
058                    return getService().dynamicQuery(dynamicQuery);
059            }
060    
061            @SuppressWarnings("unchecked")
062            public static java.util.List dynamicQuery(
063                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
064                    int end) throws com.liferay.portal.kernel.exception.SystemException {
065                    return getService().dynamicQuery(dynamicQuery, start, end);
066            }
067    
068            @SuppressWarnings("unchecked")
069            public static java.util.List dynamicQuery(
070                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
071                    int end,
072                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
073                    throws com.liferay.portal.kernel.exception.SystemException {
074                    return getService()
075                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
076            }
077    
078            public static long dynamicQueryCount(
079                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    return getService().dynamicQueryCount(dynamicQuery);
082            }
083    
084            public static com.liferay.portal.model.User getUser(long userId)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService().getUser(userId);
088            }
089    
090            public static java.util.List<com.liferay.portal.model.User> getUsers(
091                    int start, int end)
092                    throws com.liferay.portal.kernel.exception.SystemException {
093                    return getService().getUsers(start, end);
094            }
095    
096            public static int getUsersCount()
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getService().getUsersCount();
099            }
100    
101            public static com.liferay.portal.model.User updateUser(
102                    com.liferay.portal.model.User user)
103                    throws com.liferay.portal.kernel.exception.SystemException {
104                    return getService().updateUser(user);
105            }
106    
107            public static com.liferay.portal.model.User updateUser(
108                    com.liferay.portal.model.User user, boolean merge)
109                    throws com.liferay.portal.kernel.exception.SystemException {
110                    return getService().updateUser(user, merge);
111            }
112    
113            public static void addDefaultGroups(long userId)
114                    throws com.liferay.portal.kernel.exception.PortalException,
115                            com.liferay.portal.kernel.exception.SystemException {
116                    getService().addDefaultGroups(userId);
117            }
118    
119            public static void addDefaultRoles(long userId)
120                    throws com.liferay.portal.kernel.exception.PortalException,
121                            com.liferay.portal.kernel.exception.SystemException {
122                    getService().addDefaultRoles(userId);
123            }
124    
125            public static void addDefaultUserGroups(long userId)
126                    throws com.liferay.portal.kernel.exception.PortalException,
127                            com.liferay.portal.kernel.exception.SystemException {
128                    getService().addDefaultUserGroups(userId);
129            }
130    
131            public static void addGroupUsers(long groupId, long[] userIds)
132                    throws com.liferay.portal.kernel.exception.PortalException,
133                            com.liferay.portal.kernel.exception.SystemException {
134                    getService().addGroupUsers(groupId, userIds);
135            }
136    
137            public static void addOrganizationUsers(long organizationId, long[] userIds)
138                    throws com.liferay.portal.kernel.exception.PortalException,
139                            com.liferay.portal.kernel.exception.SystemException {
140                    getService().addOrganizationUsers(organizationId, userIds);
141            }
142    
143            public static void addPasswordPolicyUsers(long passwordPolicyId,
144                    long[] userIds)
145                    throws com.liferay.portal.kernel.exception.SystemException {
146                    getService().addPasswordPolicyUsers(passwordPolicyId, userIds);
147            }
148    
149            public static void addRoleUsers(long roleId, long[] userIds)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    getService().addRoleUsers(roleId, userIds);
153            }
154    
155            public static void addTeamUsers(long teamId, long[] userIds)
156                    throws com.liferay.portal.kernel.exception.PortalException,
157                            com.liferay.portal.kernel.exception.SystemException {
158                    getService().addTeamUsers(teamId, userIds);
159            }
160    
161            public static com.liferay.portal.model.User addUser(long creatorUserId,
162                    long companyId, boolean autoPassword, java.lang.String password1,
163                    java.lang.String password2, boolean autoScreenName,
164                    java.lang.String screenName, java.lang.String emailAddress,
165                    long facebookId, java.lang.String openId, java.util.Locale locale,
166                    java.lang.String firstName, java.lang.String middleName,
167                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
168                    int birthdayMonth, int birthdayDay, int birthdayYear,
169                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
170                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
171                    com.liferay.portal.service.ServiceContext serviceContext)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException {
174                    return getService()
175                                       .addUser(creatorUserId, companyId, autoPassword, password1,
176                            password2, autoScreenName, screenName, emailAddress, facebookId,
177                            openId, locale, firstName, middleName, lastName, prefixId,
178                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
179                            groupIds, organizationIds, roleIds, userGroupIds, sendEmail,
180                            serviceContext);
181            }
182    
183            public static void addUserGroupUsers(long userGroupId, long[] userIds)
184                    throws com.liferay.portal.kernel.exception.PortalException,
185                            com.liferay.portal.kernel.exception.SystemException {
186                    getService().addUserGroupUsers(userGroupId, userIds);
187            }
188    
189            public static int authenticateByEmailAddress(long companyId,
190                    java.lang.String emailAddress, java.lang.String password,
191                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
192                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException {
195                    return getService()
196                                       .authenticateByEmailAddress(companyId, emailAddress,
197                            password, headerMap, parameterMap);
198            }
199    
200            public static int authenticateByScreenName(long companyId,
201                    java.lang.String screenName, java.lang.String password,
202                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
203                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
204                    throws com.liferay.portal.kernel.exception.PortalException,
205                            com.liferay.portal.kernel.exception.SystemException {
206                    return getService()
207                                       .authenticateByScreenName(companyId, screenName, password,
208                            headerMap, parameterMap);
209            }
210    
211            public static int authenticateByUserId(long companyId, long userId,
212                    java.lang.String password,
213                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
214                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
215                    throws com.liferay.portal.kernel.exception.PortalException,
216                            com.liferay.portal.kernel.exception.SystemException {
217                    return getService()
218                                       .authenticateByUserId(companyId, userId, password,
219                            headerMap, parameterMap);
220            }
221    
222            public static long authenticateForBasic(long companyId,
223                    java.lang.String authType, java.lang.String login,
224                    java.lang.String password)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException {
227                    return getService()
228                                       .authenticateForBasic(companyId, authType, login, password);
229            }
230    
231            public static boolean authenticateForJAAS(long userId,
232                    java.lang.String encPassword) {
233                    return getService().authenticateForJAAS(userId, encPassword);
234            }
235    
236            public static void checkLockout(com.liferay.portal.model.User user)
237                    throws com.liferay.portal.kernel.exception.PortalException,
238                            com.liferay.portal.kernel.exception.SystemException {
239                    getService().checkLockout(user);
240            }
241    
242            public static void checkLoginFailure(com.liferay.portal.model.User user)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    getService().checkLoginFailure(user);
245            }
246    
247            public static void checkLoginFailureByEmailAddress(long companyId,
248                    java.lang.String emailAddress)
249                    throws com.liferay.portal.kernel.exception.PortalException,
250                            com.liferay.portal.kernel.exception.SystemException {
251                    getService().checkLoginFailureByEmailAddress(companyId, emailAddress);
252            }
253    
254            public static void checkLoginFailureById(long userId)
255                    throws com.liferay.portal.kernel.exception.PortalException,
256                            com.liferay.portal.kernel.exception.SystemException {
257                    getService().checkLoginFailureById(userId);
258            }
259    
260            public static void checkLoginFailureByScreenName(long companyId,
261                    java.lang.String screenName)
262                    throws com.liferay.portal.kernel.exception.PortalException,
263                            com.liferay.portal.kernel.exception.SystemException {
264                    getService().checkLoginFailureByScreenName(companyId, screenName);
265            }
266    
267            public static void checkPasswordExpired(com.liferay.portal.model.User user)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException {
270                    getService().checkPasswordExpired(user);
271            }
272    
273            public static com.liferay.portal.kernel.util.KeyValuePair decryptUserId(
274                    long companyId, java.lang.String name, java.lang.String password)
275                    throws com.liferay.portal.kernel.exception.PortalException,
276                            com.liferay.portal.kernel.exception.SystemException {
277                    return getService().decryptUserId(companyId, name, password);
278            }
279    
280            public static void deletePortrait(long userId)
281                    throws com.liferay.portal.kernel.exception.PortalException,
282                            com.liferay.portal.kernel.exception.SystemException {
283                    getService().deletePortrait(userId);
284            }
285    
286            public static void deleteRoleUser(long roleId, long userId)
287                    throws com.liferay.portal.kernel.exception.PortalException,
288                            com.liferay.portal.kernel.exception.SystemException {
289                    getService().deleteRoleUser(roleId, userId);
290            }
291    
292            public static java.lang.String encryptUserId(java.lang.String name)
293                    throws com.liferay.portal.kernel.exception.PortalException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    return getService().encryptUserId(name);
296            }
297    
298            public static java.util.List<com.liferay.portal.model.User> getCompanyUsers(
299                    long companyId, int start, int end)
300                    throws com.liferay.portal.kernel.exception.SystemException {
301                    return getService().getCompanyUsers(companyId, start, end);
302            }
303    
304            public static int getCompanyUsersCount(long companyId)
305                    throws com.liferay.portal.kernel.exception.SystemException {
306                    return getService().getCompanyUsersCount(companyId);
307            }
308    
309            public static com.liferay.portal.model.User getDefaultUser(long companyId)
310                    throws com.liferay.portal.kernel.exception.PortalException,
311                            com.liferay.portal.kernel.exception.SystemException {
312                    return getService().getDefaultUser(companyId);
313            }
314    
315            public static long getDefaultUserId(long companyId)
316                    throws com.liferay.portal.kernel.exception.PortalException,
317                            com.liferay.portal.kernel.exception.SystemException {
318                    return getService().getDefaultUserId(companyId);
319            }
320    
321            public static long[] getGroupUserIds(long groupId)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return getService().getGroupUserIds(groupId);
324            }
325    
326            public static java.util.List<com.liferay.portal.model.User> getGroupUsers(
327                    long groupId)
328                    throws com.liferay.portal.kernel.exception.SystemException {
329                    return getService().getGroupUsers(groupId);
330            }
331    
332            public static int getGroupUsersCount(long groupId)
333                    throws com.liferay.portal.kernel.exception.SystemException {
334                    return getService().getGroupUsersCount(groupId);
335            }
336    
337            public static int getGroupUsersCount(long groupId, boolean active)
338                    throws com.liferay.portal.kernel.exception.PortalException,
339                            com.liferay.portal.kernel.exception.SystemException {
340                    return getService().getGroupUsersCount(groupId, active);
341            }
342    
343            public static java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries(
344                    java.lang.String type)
345                    throws com.liferay.portal.kernel.exception.SystemException {
346                    return getService().getNoAnnouncementsDeliveries(type);
347            }
348    
349            public static java.util.List<com.liferay.portal.model.User> getNoContacts()
350                    throws com.liferay.portal.kernel.exception.SystemException {
351                    return getService().getNoContacts();
352            }
353    
354            public static java.util.List<com.liferay.portal.model.User> getNoGroups()
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    return getService().getNoGroups();
357            }
358    
359            public static long[] getOrganizationUserIds(long organizationId)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getService().getOrganizationUserIds(organizationId);
362            }
363    
364            public static java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
365                    long organizationId)
366                    throws com.liferay.portal.kernel.exception.SystemException {
367                    return getService().getOrganizationUsers(organizationId);
368            }
369    
370            public static int getOrganizationUsersCount(long organizationId)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    return getService().getOrganizationUsersCount(organizationId);
373            }
374    
375            public static int getOrganizationUsersCount(long organizationId,
376                    boolean active)
377                    throws com.liferay.portal.kernel.exception.PortalException,
378                            com.liferay.portal.kernel.exception.SystemException {
379                    return getService().getOrganizationUsersCount(organizationId, active);
380            }
381    
382            public static long[] getRoleUserIds(long roleId)
383                    throws com.liferay.portal.kernel.exception.SystemException {
384                    return getService().getRoleUserIds(roleId);
385            }
386    
387            public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
388                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
389                    return getService().getRoleUsers(roleId);
390            }
391    
392            public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
393                    long roleId, int start, int end)
394                    throws com.liferay.portal.kernel.exception.SystemException {
395                    return getService().getRoleUsers(roleId, start, end);
396            }
397    
398            public static int getRoleUsersCount(long roleId)
399                    throws com.liferay.portal.kernel.exception.SystemException {
400                    return getService().getRoleUsersCount(roleId);
401            }
402    
403            public static int getRoleUsersCount(long roleId, boolean active)
404                    throws com.liferay.portal.kernel.exception.PortalException,
405                            com.liferay.portal.kernel.exception.SystemException {
406                    return getService().getRoleUsersCount(roleId, active);
407            }
408    
409            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
410                    long userId, int type, int start, int end,
411                    com.liferay.portal.kernel.util.OrderByComparator obc)
412                    throws com.liferay.portal.kernel.exception.PortalException,
413                            com.liferay.portal.kernel.exception.SystemException {
414                    return getService().getSocialUsers(userId, type, start, end, obc);
415            }
416    
417            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
418                    long userId, int start, int end,
419                    com.liferay.portal.kernel.util.OrderByComparator obc)
420                    throws com.liferay.portal.kernel.exception.PortalException,
421                            com.liferay.portal.kernel.exception.SystemException {
422                    return getService().getSocialUsers(userId, start, end, obc);
423            }
424    
425            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
426                    long userId1, long userId2, int type, int start, int end,
427                    com.liferay.portal.kernel.util.OrderByComparator obc)
428                    throws com.liferay.portal.kernel.exception.PortalException,
429                            com.liferay.portal.kernel.exception.SystemException {
430                    return getService()
431                                       .getSocialUsers(userId1, userId2, type, start, end, obc);
432            }
433    
434            public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
435                    long userId1, long userId2, int start, int end,
436                    com.liferay.portal.kernel.util.OrderByComparator obc)
437                    throws com.liferay.portal.kernel.exception.PortalException,
438                            com.liferay.portal.kernel.exception.SystemException {
439                    return getService().getSocialUsers(userId1, userId2, start, end, obc);
440            }
441    
442            public static int getSocialUsersCount(long userId)
443                    throws com.liferay.portal.kernel.exception.PortalException,
444                            com.liferay.portal.kernel.exception.SystemException {
445                    return getService().getSocialUsersCount(userId);
446            }
447    
448            public static int getSocialUsersCount(long userId, int type)
449                    throws com.liferay.portal.kernel.exception.PortalException,
450                            com.liferay.portal.kernel.exception.SystemException {
451                    return getService().getSocialUsersCount(userId, type);
452            }
453    
454            public static int getSocialUsersCount(long userId1, long userId2)
455                    throws com.liferay.portal.kernel.exception.PortalException,
456                            com.liferay.portal.kernel.exception.SystemException {
457                    return getService().getSocialUsersCount(userId1, userId2);
458            }
459    
460            public static int getSocialUsersCount(long userId1, long userId2, int type)
461                    throws com.liferay.portal.kernel.exception.PortalException,
462                            com.liferay.portal.kernel.exception.SystemException {
463                    return getService().getSocialUsersCount(userId1, userId2, type);
464            }
465    
466            public static com.liferay.portal.model.User getUserByContactId(
467                    long contactId)
468                    throws com.liferay.portal.kernel.exception.PortalException,
469                            com.liferay.portal.kernel.exception.SystemException {
470                    return getService().getUserByContactId(contactId);
471            }
472    
473            public static com.liferay.portal.model.User getUserByEmailAddress(
474                    long companyId, java.lang.String emailAddress)
475                    throws com.liferay.portal.kernel.exception.PortalException,
476                            com.liferay.portal.kernel.exception.SystemException {
477                    return getService().getUserByEmailAddress(companyId, emailAddress);
478            }
479    
480            public static com.liferay.portal.model.User getUserByFacebookId(
481                    long companyId, long facebookId)
482                    throws com.liferay.portal.kernel.exception.PortalException,
483                            com.liferay.portal.kernel.exception.SystemException {
484                    return getService().getUserByFacebookId(companyId, facebookId);
485            }
486    
487            public static com.liferay.portal.model.User getUserById(long userId)
488                    throws com.liferay.portal.kernel.exception.PortalException,
489                            com.liferay.portal.kernel.exception.SystemException {
490                    return getService().getUserById(userId);
491            }
492    
493            public static com.liferay.portal.model.User getUserById(long companyId,
494                    long userId)
495                    throws com.liferay.portal.kernel.exception.PortalException,
496                            com.liferay.portal.kernel.exception.SystemException {
497                    return getService().getUserById(companyId, userId);
498            }
499    
500            public static com.liferay.portal.model.User getUserByOpenId(
501                    long companyId, java.lang.String openId)
502                    throws com.liferay.portal.kernel.exception.PortalException,
503                            com.liferay.portal.kernel.exception.SystemException {
504                    return getService().getUserByOpenId(companyId, openId);
505            }
506    
507            public static com.liferay.portal.model.User getUserByPortraitId(
508                    long portraitId)
509                    throws com.liferay.portal.kernel.exception.PortalException,
510                            com.liferay.portal.kernel.exception.SystemException {
511                    return getService().getUserByPortraitId(portraitId);
512            }
513    
514            public static com.liferay.portal.model.User getUserByScreenName(
515                    long companyId, java.lang.String screenName)
516                    throws com.liferay.portal.kernel.exception.PortalException,
517                            com.liferay.portal.kernel.exception.SystemException {
518                    return getService().getUserByScreenName(companyId, screenName);
519            }
520    
521            public static com.liferay.portal.model.User getUserByUuid(
522                    java.lang.String uuid)
523                    throws com.liferay.portal.kernel.exception.PortalException,
524                            com.liferay.portal.kernel.exception.SystemException {
525                    return getService().getUserByUuid(uuid);
526            }
527    
528            public static java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
529                    long userGroupId)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return getService().getUserGroupUsers(userGroupId);
532            }
533    
534            public static int getUserGroupUsersCount(long userGroupId)
535                    throws com.liferay.portal.kernel.exception.SystemException {
536                    return getService().getUserGroupUsersCount(userGroupId);
537            }
538    
539            public static int getUserGroupUsersCount(long userGroupId, boolean active)
540                    throws com.liferay.portal.kernel.exception.PortalException,
541                            com.liferay.portal.kernel.exception.SystemException {
542                    return getService().getUserGroupUsersCount(userGroupId, active);
543            }
544    
545            public static long getUserIdByEmailAddress(long companyId,
546                    java.lang.String emailAddress)
547                    throws com.liferay.portal.kernel.exception.PortalException,
548                            com.liferay.portal.kernel.exception.SystemException {
549                    return getService().getUserIdByEmailAddress(companyId, emailAddress);
550            }
551    
552            public static long getUserIdByScreenName(long companyId,
553                    java.lang.String screenName)
554                    throws com.liferay.portal.kernel.exception.PortalException,
555                            com.liferay.portal.kernel.exception.SystemException {
556                    return getService().getUserIdByScreenName(companyId, screenName);
557            }
558    
559            public static boolean hasGroupUser(long groupId, long userId)
560                    throws com.liferay.portal.kernel.exception.SystemException {
561                    return getService().hasGroupUser(groupId, userId);
562            }
563    
564            public static boolean hasOrganizationUser(long organizationId, long userId)
565                    throws com.liferay.portal.kernel.exception.SystemException {
566                    return getService().hasOrganizationUser(organizationId, userId);
567            }
568    
569            public static boolean hasPasswordPolicyUser(long passwordPolicyId,
570                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
571                    return getService().hasPasswordPolicyUser(passwordPolicyId, userId);
572            }
573    
574            public static boolean hasRoleUser(long roleId, long userId)
575                    throws com.liferay.portal.kernel.exception.SystemException {
576                    return getService().hasRoleUser(roleId, userId);
577            }
578    
579            /**
580            * Returns <code>true</code> if the user has the role.
581            *
582            * @return <code>true</code> if the user has the role
583            */
584            public static boolean hasRoleUser(long companyId, java.lang.String name,
585                    long userId, boolean inherited)
586                    throws com.liferay.portal.kernel.exception.PortalException,
587                            com.liferay.portal.kernel.exception.SystemException {
588                    return getService().hasRoleUser(companyId, name, userId, inherited);
589            }
590    
591            public static boolean hasTeamUser(long teamId, long userId)
592                    throws com.liferay.portal.kernel.exception.SystemException {
593                    return getService().hasTeamUser(teamId, userId);
594            }
595    
596            public static boolean hasUserGroupUser(long userGroupId, long userId)
597                    throws com.liferay.portal.kernel.exception.SystemException {
598                    return getService().hasUserGroupUser(userGroupId, userId);
599            }
600    
601            public static boolean isPasswordExpired(com.liferay.portal.model.User user)
602                    throws com.liferay.portal.kernel.exception.PortalException,
603                            com.liferay.portal.kernel.exception.SystemException {
604                    return getService().isPasswordExpired(user);
605            }
606    
607            public static boolean isPasswordExpiringSoon(
608                    com.liferay.portal.model.User user)
609                    throws com.liferay.portal.kernel.exception.PortalException,
610                            com.liferay.portal.kernel.exception.SystemException {
611                    return getService().isPasswordExpiringSoon(user);
612            }
613    
614            public static java.util.List<com.liferay.portal.model.User> search(
615                    long companyId, java.lang.String keywords, java.lang.Boolean active,
616                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
617                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
618                    throws com.liferay.portal.kernel.exception.SystemException {
619                    return getService()
620                                       .search(companyId, keywords, active, params, start, end, obc);
621            }
622    
623            public static com.liferay.portal.kernel.search.Hits search(long companyId,
624                    java.lang.String keywords, java.lang.Boolean active,
625                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
626                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
627                    throws com.liferay.portal.kernel.exception.SystemException {
628                    return getService()
629                                       .search(companyId, keywords, active, params, start, end, sort);
630            }
631    
632            public static java.util.List<com.liferay.portal.model.User> search(
633                    long companyId, java.lang.String firstName,
634                    java.lang.String middleName, java.lang.String lastName,
635                    java.lang.String screenName, java.lang.String emailAddress,
636                    java.lang.Boolean active,
637                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
638                    boolean andSearch, int start, int end,
639                    com.liferay.portal.kernel.util.OrderByComparator obc)
640                    throws com.liferay.portal.kernel.exception.SystemException {
641                    return getService()
642                                       .search(companyId, firstName, middleName, lastName,
643                            screenName, emailAddress, active, params, andSearch, start, end, obc);
644            }
645    
646            public static com.liferay.portal.kernel.search.Hits search(long companyId,
647                    java.lang.String firstName, java.lang.String middleName,
648                    java.lang.String lastName, java.lang.String screenName,
649                    java.lang.String emailAddress, java.lang.Boolean active,
650                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
651                    boolean andSearch, int start, int end,
652                    com.liferay.portal.kernel.search.Sort sort)
653                    throws com.liferay.portal.kernel.exception.SystemException {
654                    return getService()
655                                       .search(companyId, firstName, middleName, lastName,
656                            screenName, emailAddress, active, params, andSearch, start, end,
657                            sort);
658            }
659    
660            public static int searchCount(long companyId, java.lang.String keywords,
661                    java.lang.Boolean active,
662                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
663                    throws com.liferay.portal.kernel.exception.SystemException {
664                    return getService().searchCount(companyId, keywords, active, params);
665            }
666    
667            public static int searchCount(long companyId, java.lang.String firstName,
668                    java.lang.String middleName, java.lang.String lastName,
669                    java.lang.String screenName, java.lang.String emailAddress,
670                    java.lang.Boolean active,
671                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
672                    boolean andSearch)
673                    throws com.liferay.portal.kernel.exception.SystemException {
674                    return getService()
675                                       .searchCount(companyId, firstName, middleName, lastName,
676                            screenName, emailAddress, active, params, andSearch);
677            }
678    
679            public static void sendPassword(long companyId,
680                    java.lang.String emailAddress, java.lang.String remoteAddr,
681                    java.lang.String remoteHost, java.lang.String userAgent,
682                    java.lang.String fromName, java.lang.String fromAddress,
683                    java.lang.String subject, java.lang.String body,
684                    com.liferay.portal.service.ServiceContext serviceContext)
685                    throws com.liferay.portal.kernel.exception.PortalException,
686                            com.liferay.portal.kernel.exception.SystemException {
687                    getService()
688                            .sendPassword(companyId, emailAddress, remoteAddr, remoteHost,
689                            userAgent, fromName, fromAddress, subject, body, serviceContext);
690            }
691    
692            public static void setRoleUsers(long roleId, long[] userIds)
693                    throws com.liferay.portal.kernel.exception.PortalException,
694                            com.liferay.portal.kernel.exception.SystemException {
695                    getService().setRoleUsers(roleId, userIds);
696            }
697    
698            public static void setUserGroupUsers(long userGroupId, long[] userIds)
699                    throws com.liferay.portal.kernel.exception.PortalException,
700                            com.liferay.portal.kernel.exception.SystemException {
701                    getService().setUserGroupUsers(userGroupId, userIds);
702            }
703    
704            public static void unsetGroupUsers(long groupId, long[] userIds)
705                    throws com.liferay.portal.kernel.exception.PortalException,
706                            com.liferay.portal.kernel.exception.SystemException {
707                    getService().unsetGroupUsers(groupId, userIds);
708            }
709    
710            public static void unsetOrganizationUsers(long organizationId,
711                    long[] userIds)
712                    throws com.liferay.portal.kernel.exception.PortalException,
713                            com.liferay.portal.kernel.exception.SystemException {
714                    getService().unsetOrganizationUsers(organizationId, userIds);
715            }
716    
717            public static void unsetPasswordPolicyUsers(long passwordPolicyId,
718                    long[] userIds)
719                    throws com.liferay.portal.kernel.exception.SystemException {
720                    getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds);
721            }
722    
723            public static void unsetRoleUsers(long roleId,
724                    java.util.List<com.liferay.portal.model.User> users)
725                    throws com.liferay.portal.kernel.exception.PortalException,
726                            com.liferay.portal.kernel.exception.SystemException {
727                    getService().unsetRoleUsers(roleId, users);
728            }
729    
730            public static void unsetRoleUsers(long roleId, long[] userIds)
731                    throws com.liferay.portal.kernel.exception.PortalException,
732                            com.liferay.portal.kernel.exception.SystemException {
733                    getService().unsetRoleUsers(roleId, userIds);
734            }
735    
736            public static void unsetTeamUsers(long teamId, long[] userIds)
737                    throws com.liferay.portal.kernel.exception.PortalException,
738                            com.liferay.portal.kernel.exception.SystemException {
739                    getService().unsetTeamUsers(teamId, userIds);
740            }
741    
742            public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
743                    throws com.liferay.portal.kernel.exception.PortalException,
744                            com.liferay.portal.kernel.exception.SystemException {
745                    getService().unsetUserGroupUsers(userGroupId, userIds);
746            }
747    
748            public static com.liferay.portal.model.User updateActive(long userId,
749                    boolean active)
750                    throws com.liferay.portal.kernel.exception.PortalException,
751                            com.liferay.portal.kernel.exception.SystemException {
752                    return getService().updateActive(userId, active);
753            }
754    
755            public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
756                    long userId, boolean agreedToTermsOfUse)
757                    throws com.liferay.portal.kernel.exception.PortalException,
758                            com.liferay.portal.kernel.exception.SystemException {
759                    return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse);
760            }
761    
762            public static void updateAsset(long userId,
763                    com.liferay.portal.model.User user, long[] assetCategoryIds,
764                    java.lang.String[] assetTagNames)
765                    throws com.liferay.portal.kernel.exception.PortalException,
766                            com.liferay.portal.kernel.exception.SystemException {
767                    getService().updateAsset(userId, user, assetCategoryIds, assetTagNames);
768            }
769    
770            public static com.liferay.portal.model.User updateCreateDate(long userId,
771                    java.util.Date createDate)
772                    throws com.liferay.portal.kernel.exception.PortalException,
773                            com.liferay.portal.kernel.exception.SystemException {
774                    return getService().updateCreateDate(userId, createDate);
775            }
776    
777            public static com.liferay.portal.model.User updateEmailAddress(
778                    long userId, java.lang.String password, java.lang.String emailAddress1,
779                    java.lang.String emailAddress2)
780                    throws com.liferay.portal.kernel.exception.PortalException,
781                            com.liferay.portal.kernel.exception.SystemException {
782                    return getService()
783                                       .updateEmailAddress(userId, password, emailAddress1,
784                            emailAddress2);
785            }
786    
787            public static void updateGroups(long userId, long[] newGroupIds)
788                    throws com.liferay.portal.kernel.exception.PortalException,
789                            com.liferay.portal.kernel.exception.SystemException {
790                    getService().updateGroups(userId, newGroupIds);
791            }
792    
793            public static com.liferay.portal.model.User updateLastLogin(long userId,
794                    java.lang.String loginIP)
795                    throws com.liferay.portal.kernel.exception.PortalException,
796                            com.liferay.portal.kernel.exception.SystemException {
797                    return getService().updateLastLogin(userId, loginIP);
798            }
799    
800            public static com.liferay.portal.model.User updateLockout(
801                    com.liferay.portal.model.User user, boolean lockout)
802                    throws com.liferay.portal.kernel.exception.PortalException,
803                            com.liferay.portal.kernel.exception.SystemException {
804                    return getService().updateLockout(user, lockout);
805            }
806    
807            public static com.liferay.portal.model.User updateLockoutByEmailAddress(
808                    long companyId, java.lang.String emailAddress, boolean lockout)
809                    throws com.liferay.portal.kernel.exception.PortalException,
810                            com.liferay.portal.kernel.exception.SystemException {
811                    return getService()
812                                       .updateLockoutByEmailAddress(companyId, emailAddress, lockout);
813            }
814    
815            public static com.liferay.portal.model.User updateLockoutById(long userId,
816                    boolean lockout)
817                    throws com.liferay.portal.kernel.exception.PortalException,
818                            com.liferay.portal.kernel.exception.SystemException {
819                    return getService().updateLockoutById(userId, lockout);
820            }
821    
822            public static com.liferay.portal.model.User updateLockoutByScreenName(
823                    long companyId, java.lang.String screenName, boolean lockout)
824                    throws com.liferay.portal.kernel.exception.PortalException,
825                            com.liferay.portal.kernel.exception.SystemException {
826                    return getService()
827                                       .updateLockoutByScreenName(companyId, screenName, lockout);
828            }
829    
830            public static com.liferay.portal.model.User updateModifiedDate(
831                    long userId, java.util.Date modifiedDate)
832                    throws com.liferay.portal.kernel.exception.PortalException,
833                            com.liferay.portal.kernel.exception.SystemException {
834                    return getService().updateModifiedDate(userId, modifiedDate);
835            }
836    
837            public static void updateOpenId(long userId, java.lang.String openId)
838                    throws com.liferay.portal.kernel.exception.PortalException,
839                            com.liferay.portal.kernel.exception.SystemException {
840                    getService().updateOpenId(userId, openId);
841            }
842    
843            public static void updateOrganizations(long userId,
844                    long[] newOrganizationIds)
845                    throws com.liferay.portal.kernel.exception.PortalException,
846                            com.liferay.portal.kernel.exception.SystemException {
847                    getService().updateOrganizations(userId, newOrganizationIds);
848            }
849    
850            public static com.liferay.portal.model.User updatePassword(long userId,
851                    java.lang.String password1, java.lang.String password2,
852                    boolean passwordReset)
853                    throws com.liferay.portal.kernel.exception.PortalException,
854                            com.liferay.portal.kernel.exception.SystemException {
855                    return getService()
856                                       .updatePassword(userId, password1, password2, passwordReset);
857            }
858    
859            public static com.liferay.portal.model.User updatePassword(long userId,
860                    java.lang.String password1, java.lang.String password2,
861                    boolean passwordReset, boolean silentUpdate)
862                    throws com.liferay.portal.kernel.exception.PortalException,
863                            com.liferay.portal.kernel.exception.SystemException {
864                    return getService()
865                                       .updatePassword(userId, password1, password2, passwordReset,
866                            silentUpdate);
867            }
868    
869            public static com.liferay.portal.model.User updatePasswordManually(
870                    long userId, java.lang.String password, boolean passwordEncrypted,
871                    boolean passwordReset, java.util.Date passwordModifiedDate)
872                    throws com.liferay.portal.kernel.exception.PortalException,
873                            com.liferay.portal.kernel.exception.SystemException {
874                    return getService()
875                                       .updatePasswordManually(userId, password, passwordEncrypted,
876                            passwordReset, passwordModifiedDate);
877            }
878    
879            public static void updatePasswordReset(long userId, boolean passwordReset)
880                    throws com.liferay.portal.kernel.exception.PortalException,
881                            com.liferay.portal.kernel.exception.SystemException {
882                    getService().updatePasswordReset(userId, passwordReset);
883            }
884    
885            public static void updatePortrait(long userId, byte[] bytes)
886                    throws com.liferay.portal.kernel.exception.PortalException,
887                            com.liferay.portal.kernel.exception.SystemException {
888                    getService().updatePortrait(userId, bytes);
889            }
890    
891            public static void updateReminderQuery(long userId,
892                    java.lang.String question, java.lang.String answer)
893                    throws com.liferay.portal.kernel.exception.PortalException,
894                            com.liferay.portal.kernel.exception.SystemException {
895                    getService().updateReminderQuery(userId, question, answer);
896            }
897    
898            public static void updateScreenName(long userId, java.lang.String screenName)
899                    throws com.liferay.portal.kernel.exception.PortalException,
900                            com.liferay.portal.kernel.exception.SystemException {
901                    getService().updateScreenName(userId, screenName);
902            }
903    
904            public static com.liferay.portal.model.User updateUser(long userId,
905                    java.lang.String oldPassword, java.lang.String newPassword1,
906                    java.lang.String newPassword2, boolean passwordReset,
907                    java.lang.String reminderQueryQuestion,
908                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
909                    java.lang.String emailAddress, long facebookId,
910                    java.lang.String openId, java.lang.String languageId,
911                    java.lang.String timeZoneId, java.lang.String greeting,
912                    java.lang.String comments, java.lang.String firstName,
913                    java.lang.String middleName, java.lang.String lastName, int prefixId,
914                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
915                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
916                    java.lang.String facebookSn, java.lang.String icqSn,
917                    java.lang.String jabberSn, java.lang.String msnSn,
918                    java.lang.String mySpaceSn, java.lang.String skypeSn,
919                    java.lang.String twitterSn, java.lang.String ymSn,
920                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
921                    long[] roleIds,
922                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
923                    long[] userGroupIds,
924                    com.liferay.portal.service.ServiceContext serviceContext)
925                    throws com.liferay.portal.kernel.exception.PortalException,
926                            com.liferay.portal.kernel.exception.SystemException {
927                    return getService()
928                                       .updateUser(userId, oldPassword, newPassword1, newPassword2,
929                            passwordReset, reminderQueryQuestion, reminderQueryAnswer,
930                            screenName, emailAddress, facebookId, openId, languageId,
931                            timeZoneId, greeting, comments, firstName, middleName, lastName,
932                            prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
933                            smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn,
934                            skypeSn, twitterSn, ymSn, jobTitle, groupIds, organizationIds,
935                            roleIds, userGroupRoles, userGroupIds, serviceContext);
936            }
937    
938            public static UserLocalService getService() {
939                    if (_service == null) {
940                            _service = (UserLocalService)PortalBeanLocatorUtil.locate(UserLocalService.class.getName());
941                    }
942    
943                    return _service;
944            }
945    
946            public void setService(UserLocalService service) {
947                    _service = service;
948            }
949    
950            private static UserLocalService _service;
951    }