1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="UserLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link UserLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       UserLocalService
39   * @generated
40   */
41  public class UserLocalServiceUtil {
42      public static com.liferay.portal.model.User addUser(
43          com.liferay.portal.model.User user)
44          throws com.liferay.portal.SystemException {
45          return getService().addUser(user);
46      }
47  
48      public static com.liferay.portal.model.User createUser(long userId) {
49          return getService().createUser(userId);
50      }
51  
52      public static void deleteUser(long userId)
53          throws com.liferay.portal.PortalException,
54              com.liferay.portal.SystemException {
55          getService().deleteUser(userId);
56      }
57  
58      public static void deleteUser(com.liferay.portal.model.User user)
59          throws com.liferay.portal.SystemException {
60          getService().deleteUser(user);
61      }
62  
63      @SuppressWarnings("rawtypes")
64      public static java.util.List dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.SystemException {
67          return getService().dynamicQuery(dynamicQuery);
68      }
69  
70      @SuppressWarnings("rawtypes")
71      public static java.util.List dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end) throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery, start, end);
75      }
76  
77      @SuppressWarnings("rawtypes")
78      public static java.util.List dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80          int end,
81          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82          throws com.liferay.portal.SystemException {
83          return getService()
84                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85      }
86  
87      public static int dynamicQueryCount(
88          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89          throws com.liferay.portal.SystemException {
90          return getService().dynamicQueryCount(dynamicQuery);
91      }
92  
93      public static com.liferay.portal.model.User getUser(long userId)
94          throws com.liferay.portal.PortalException,
95              com.liferay.portal.SystemException {
96          return getService().getUser(userId);
97      }
98  
99      public static java.util.List<com.liferay.portal.model.User> getUsers(
100         int start, int end) throws com.liferay.portal.SystemException {
101         return getService().getUsers(start, end);
102     }
103 
104     public static int getUsersCount() throws com.liferay.portal.SystemException {
105         return getService().getUsersCount();
106     }
107 
108     public static com.liferay.portal.model.User updateUser(
109         com.liferay.portal.model.User user)
110         throws com.liferay.portal.SystemException {
111         return getService().updateUser(user);
112     }
113 
114     public static com.liferay.portal.model.User updateUser(
115         com.liferay.portal.model.User user, boolean merge)
116         throws com.liferay.portal.SystemException {
117         return getService().updateUser(user, merge);
118     }
119 
120     public static void addDefaultGroups(long userId)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         getService().addDefaultGroups(userId);
124     }
125 
126     public static void addDefaultRoles(long userId)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         getService().addDefaultRoles(userId);
130     }
131 
132     public static void addDefaultUserGroups(long userId)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         getService().addDefaultUserGroups(userId);
136     }
137 
138     public static void addGroupUsers(long groupId, long[] userIds)
139         throws com.liferay.portal.SystemException {
140         getService().addGroupUsers(groupId, userIds);
141     }
142 
143     public static void addOrganizationUsers(long organizationId, long[] userIds)
144         throws com.liferay.portal.SystemException {
145         getService().addOrganizationUsers(organizationId, userIds);
146     }
147 
148     public static void addPasswordPolicyUsers(long passwordPolicyId,
149         long[] userIds) throws com.liferay.portal.SystemException {
150         getService().addPasswordPolicyUsers(passwordPolicyId, userIds);
151     }
152 
153     public static void addRoleUsers(long roleId, long[] userIds)
154         throws com.liferay.portal.SystemException {
155         getService().addRoleUsers(roleId, userIds);
156     }
157 
158     public static void addUserGroupUsers(long userGroupId, long[] userIds)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException {
161         getService().addUserGroupUsers(userGroupId, userIds);
162     }
163 
164     public static com.liferay.portal.model.User addUser(long creatorUserId,
165         long companyId, boolean autoPassword, java.lang.String password1,
166         java.lang.String password2, boolean autoScreenName,
167         java.lang.String screenName, java.lang.String emailAddress,
168         java.lang.String openId, java.util.Locale locale,
169         java.lang.String firstName, java.lang.String middleName,
170         java.lang.String lastName, int prefixId, int suffixId, boolean male,
171         int birthdayMonth, int birthdayDay, int birthdayYear,
172         java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
173         long[] roleIds, long[] userGroupIds, boolean sendEmail,
174         com.liferay.portal.service.ServiceContext serviceContext)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException {
177         return getService()
178                    .addUser(creatorUserId, companyId, autoPassword, password1,
179             password2, autoScreenName, screenName, emailAddress, openId,
180             locale, firstName, middleName, lastName, prefixId, suffixId, male,
181             birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds,
182             organizationIds, roleIds, userGroupIds, sendEmail, serviceContext);
183     }
184 
185     public static int authenticateByEmailAddress(long companyId,
186         java.lang.String emailAddress, java.lang.String password,
187         java.util.Map<java.lang.String, java.lang.String[]> headerMap,
188         java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
189         throws com.liferay.portal.PortalException,
190             com.liferay.portal.SystemException {
191         return getService()
192                    .authenticateByEmailAddress(companyId, emailAddress,
193             password, headerMap, parameterMap);
194     }
195 
196     public static int authenticateByScreenName(long companyId,
197         java.lang.String screenName, java.lang.String password,
198         java.util.Map<java.lang.String, java.lang.String[]> headerMap,
199         java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         return getService()
203                    .authenticateByScreenName(companyId, screenName, password,
204             headerMap, parameterMap);
205     }
206 
207     public static int authenticateByUserId(long companyId, long userId,
208         java.lang.String password,
209         java.util.Map<java.lang.String, java.lang.String[]> headerMap,
210         java.util.Map<java.lang.String, java.lang.String[]> parameterMap)
211         throws com.liferay.portal.PortalException,
212             com.liferay.portal.SystemException {
213         return getService()
214                    .authenticateByUserId(companyId, userId, password,
215             headerMap, parameterMap);
216     }
217 
218     public static long authenticateForBasic(long companyId,
219         java.lang.String authType, java.lang.String login,
220         java.lang.String password)
221         throws com.liferay.portal.PortalException,
222             com.liferay.portal.SystemException {
223         return getService()
224                    .authenticateForBasic(companyId, authType, login, password);
225     }
226 
227     public static boolean authenticateForJAAS(long userId,
228         java.lang.String encPassword) {
229         return getService().authenticateForJAAS(userId, encPassword);
230     }
231 
232     public static void checkLockout(com.liferay.portal.model.User user)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException {
235         getService().checkLockout(user);
236     }
237 
238     public static void checkLoginFailure(com.liferay.portal.model.User user)
239         throws com.liferay.portal.SystemException {
240         getService().checkLoginFailure(user);
241     }
242 
243     public static void checkLoginFailureByEmailAddress(long companyId,
244         java.lang.String emailAddress)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException {
247         getService().checkLoginFailureByEmailAddress(companyId, emailAddress);
248     }
249 
250     public static void checkLoginFailureById(long userId)
251         throws com.liferay.portal.PortalException,
252             com.liferay.portal.SystemException {
253         getService().checkLoginFailureById(userId);
254     }
255 
256     public static void checkLoginFailureByScreenName(long companyId,
257         java.lang.String screenName)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException {
260         getService().checkLoginFailureByScreenName(companyId, screenName);
261     }
262 
263     public static void checkPasswordExpired(com.liferay.portal.model.User user)
264         throws com.liferay.portal.PortalException,
265             com.liferay.portal.SystemException {
266         getService().checkPasswordExpired(user);
267     }
268 
269     public static void clearOrganizationUsers(long organizationId)
270         throws com.liferay.portal.SystemException {
271         getService().clearOrganizationUsers(organizationId);
272     }
273 
274     public static void clearUserGroupUsers(long userGroupId)
275         throws com.liferay.portal.SystemException {
276         getService().clearUserGroupUsers(userGroupId);
277     }
278 
279     public static com.liferay.portal.kernel.util.KeyValuePair decryptUserId(
280         long companyId, java.lang.String name, java.lang.String password)
281         throws com.liferay.portal.PortalException,
282             com.liferay.portal.SystemException {
283         return getService().decryptUserId(companyId, name, password);
284     }
285 
286     public static void deletePasswordPolicyUser(long passwordPolicyId,
287         long userId) throws com.liferay.portal.SystemException {
288         getService().deletePasswordPolicyUser(passwordPolicyId, userId);
289     }
290 
291     public static void deletePortrait(long userId)
292         throws com.liferay.portal.PortalException,
293             com.liferay.portal.SystemException {
294         getService().deletePortrait(userId);
295     }
296 
297     public static void deleteRoleUser(long roleId, long userId)
298         throws com.liferay.portal.SystemException {
299         getService().deleteRoleUser(roleId, userId);
300     }
301 
302     public static java.util.List<com.liferay.portal.model.User> getCompanyUsers(
303         long companyId, int start, int end)
304         throws com.liferay.portal.SystemException {
305         return getService().getCompanyUsers(companyId, start, end);
306     }
307 
308     public static int getCompanyUsersCount(long companyId)
309         throws com.liferay.portal.SystemException {
310         return getService().getCompanyUsersCount(companyId);
311     }
312 
313     public static java.lang.String encryptUserId(java.lang.String name)
314         throws com.liferay.portal.PortalException,
315             com.liferay.portal.SystemException {
316         return getService().encryptUserId(name);
317     }
318 
319     public static com.liferay.portal.model.User getDefaultUser(long companyId)
320         throws com.liferay.portal.PortalException,
321             com.liferay.portal.SystemException {
322         return getService().getDefaultUser(companyId);
323     }
324 
325     public static long getDefaultUserId(long companyId)
326         throws com.liferay.portal.PortalException,
327             com.liferay.portal.SystemException {
328         return getService().getDefaultUserId(companyId);
329     }
330 
331     public static long[] getGroupUserIds(long groupId)
332         throws com.liferay.portal.SystemException {
333         return getService().getGroupUserIds(groupId);
334     }
335 
336     public static java.util.List<com.liferay.portal.model.User> getGroupUsers(
337         long groupId) throws com.liferay.portal.SystemException {
338         return getService().getGroupUsers(groupId);
339     }
340 
341     public static int getGroupUsersCount(long groupId)
342         throws com.liferay.portal.SystemException {
343         return getService().getGroupUsersCount(groupId);
344     }
345 
346     public static int getGroupUsersCount(long groupId, boolean active)
347         throws com.liferay.portal.PortalException,
348             com.liferay.portal.SystemException {
349         return getService().getGroupUsersCount(groupId, active);
350     }
351 
352     public static java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries(
353         java.lang.String type) throws com.liferay.portal.SystemException {
354         return getService().getNoAnnouncementsDeliveries(type);
355     }
356 
357     public static java.util.List<com.liferay.portal.model.User> getNoContacts()
358         throws com.liferay.portal.SystemException {
359         return getService().getNoContacts();
360     }
361 
362     public static java.util.List<com.liferay.portal.model.User> getNoGroups()
363         throws com.liferay.portal.SystemException {
364         return getService().getNoGroups();
365     }
366 
367     public static long[] getOrganizationUserIds(long organizationId)
368         throws com.liferay.portal.SystemException {
369         return getService().getOrganizationUserIds(organizationId);
370     }
371 
372     public static java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
373         long organizationId) throws com.liferay.portal.SystemException {
374         return getService().getOrganizationUsers(organizationId);
375     }
376 
377     public static int getOrganizationUsersCount(long organizationId)
378         throws com.liferay.portal.SystemException {
379         return getService().getOrganizationUsersCount(organizationId);
380     }
381 
382     public static int getOrganizationUsersCount(long organizationId,
383         boolean active)
384         throws com.liferay.portal.PortalException,
385             com.liferay.portal.SystemException {
386         return getService().getOrganizationUsersCount(organizationId, active);
387     }
388 
389     public static long[] getRoleUserIds(long roleId)
390         throws com.liferay.portal.SystemException {
391         return getService().getRoleUserIds(roleId);
392     }
393 
394     public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
395         long roleId) throws com.liferay.portal.SystemException {
396         return getService().getRoleUsers(roleId);
397     }
398 
399     public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
400         long roleId, int start, int end)
401         throws com.liferay.portal.SystemException {
402         return getService().getRoleUsers(roleId, start, end);
403     }
404 
405     public static int getRoleUsersCount(long roleId)
406         throws com.liferay.portal.SystemException {
407         return getService().getRoleUsersCount(roleId);
408     }
409 
410     public static int getRoleUsersCount(long roleId, boolean active)
411         throws com.liferay.portal.PortalException,
412             com.liferay.portal.SystemException {
413         return getService().getRoleUsersCount(roleId, active);
414     }
415 
416     public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
417         long userId, int start, int end,
418         com.liferay.portal.kernel.util.OrderByComparator obc)
419         throws com.liferay.portal.PortalException,
420             com.liferay.portal.SystemException {
421         return getService().getSocialUsers(userId, start, end, obc);
422     }
423 
424     public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
425         long userId, int type, int start, int end,
426         com.liferay.portal.kernel.util.OrderByComparator obc)
427         throws com.liferay.portal.PortalException,
428             com.liferay.portal.SystemException {
429         return getService().getSocialUsers(userId, type, start, end, obc);
430     }
431 
432     public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
433         long userId1, long userId2, int start, int end,
434         com.liferay.portal.kernel.util.OrderByComparator obc)
435         throws com.liferay.portal.PortalException,
436             com.liferay.portal.SystemException {
437         return getService().getSocialUsers(userId1, userId2, start, end, obc);
438     }
439 
440     public static java.util.List<com.liferay.portal.model.User> getSocialUsers(
441         long userId1, long userId2, int type, int start, int end,
442         com.liferay.portal.kernel.util.OrderByComparator obc)
443         throws com.liferay.portal.PortalException,
444             com.liferay.portal.SystemException {
445         return getService()
446                    .getSocialUsers(userId1, userId2, type, start, end, obc);
447     }
448 
449     public static int getSocialUsersCount(long userId)
450         throws com.liferay.portal.PortalException,
451             com.liferay.portal.SystemException {
452         return getService().getSocialUsersCount(userId);
453     }
454 
455     public static int getSocialUsersCount(long userId, int type)
456         throws com.liferay.portal.PortalException,
457             com.liferay.portal.SystemException {
458         return getService().getSocialUsersCount(userId, type);
459     }
460 
461     public static int getSocialUsersCount(long userId1, long userId2)
462         throws com.liferay.portal.PortalException,
463             com.liferay.portal.SystemException {
464         return getService().getSocialUsersCount(userId1, userId2);
465     }
466 
467     public static int getSocialUsersCount(long userId1, long userId2, int type)
468         throws com.liferay.portal.PortalException,
469             com.liferay.portal.SystemException {
470         return getService().getSocialUsersCount(userId1, userId2, type);
471     }
472 
473     public static java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
474         long userGroupId) throws com.liferay.portal.SystemException {
475         return getService().getUserGroupUsers(userGroupId);
476     }
477 
478     public static int getUserGroupUsersCount(long userGroupId)
479         throws com.liferay.portal.SystemException {
480         return getService().getUserGroupUsersCount(userGroupId);
481     }
482 
483     public static int getUserGroupUsersCount(long userGroupId, boolean active)
484         throws com.liferay.portal.PortalException,
485             com.liferay.portal.SystemException {
486         return getService().getUserGroupUsersCount(userGroupId, active);
487     }
488 
489     public static com.liferay.portal.model.User getUserByContactId(
490         long contactId)
491         throws com.liferay.portal.PortalException,
492             com.liferay.portal.SystemException {
493         return getService().getUserByContactId(contactId);
494     }
495 
496     public static com.liferay.portal.model.User getUserByEmailAddress(
497         long companyId, java.lang.String emailAddress)
498         throws com.liferay.portal.PortalException,
499             com.liferay.portal.SystemException {
500         return getService().getUserByEmailAddress(companyId, emailAddress);
501     }
502 
503     public static com.liferay.portal.model.User getUserById(long userId)
504         throws com.liferay.portal.PortalException,
505             com.liferay.portal.SystemException {
506         return getService().getUserById(userId);
507     }
508 
509     public static com.liferay.portal.model.User getUserById(long companyId,
510         long userId)
511         throws com.liferay.portal.PortalException,
512             com.liferay.portal.SystemException {
513         return getService().getUserById(companyId, userId);
514     }
515 
516     public static com.liferay.portal.model.User getUserByOpenId(
517         java.lang.String openId)
518         throws com.liferay.portal.PortalException,
519             com.liferay.portal.SystemException {
520         return getService().getUserByOpenId(openId);
521     }
522 
523     public static com.liferay.portal.model.User getUserByPortraitId(
524         long portraitId)
525         throws com.liferay.portal.PortalException,
526             com.liferay.portal.SystemException {
527         return getService().getUserByPortraitId(portraitId);
528     }
529 
530     public static com.liferay.portal.model.User getUserByScreenName(
531         long companyId, java.lang.String screenName)
532         throws com.liferay.portal.PortalException,
533             com.liferay.portal.SystemException {
534         return getService().getUserByScreenName(companyId, screenName);
535     }
536 
537     public static com.liferay.portal.model.User getUserByUuid(
538         java.lang.String uuid)
539         throws com.liferay.portal.PortalException,
540             com.liferay.portal.SystemException {
541         return getService().getUserByUuid(uuid);
542     }
543 
544     public static long getUserIdByEmailAddress(long companyId,
545         java.lang.String emailAddress)
546         throws com.liferay.portal.PortalException,
547             com.liferay.portal.SystemException {
548         return getService().getUserIdByEmailAddress(companyId, emailAddress);
549     }
550 
551     public static long getUserIdByScreenName(long companyId,
552         java.lang.String screenName)
553         throws com.liferay.portal.PortalException,
554             com.liferay.portal.SystemException {
555         return getService().getUserIdByScreenName(companyId, screenName);
556     }
557 
558     public static boolean hasGroupUser(long groupId, long userId)
559         throws com.liferay.portal.SystemException {
560         return getService().hasGroupUser(groupId, userId);
561     }
562 
563     public static boolean hasOrganizationUser(long organizationId, long userId)
564         throws com.liferay.portal.SystemException {
565         return getService().hasOrganizationUser(organizationId, userId);
566     }
567 
568     public static boolean hasPasswordPolicyUser(long passwordPolicyId,
569         long userId) throws com.liferay.portal.SystemException {
570         return getService().hasPasswordPolicyUser(passwordPolicyId, userId);
571     }
572 
573     public static boolean hasRoleUser(long roleId, long userId)
574         throws com.liferay.portal.SystemException {
575         return getService().hasRoleUser(roleId, userId);
576     }
577 
578     /**
579     * Returns true if the user has the role.
580     *
581     * @return true if the user has the role
582     */
583     public static boolean hasRoleUser(long companyId, java.lang.String name,
584         long userId, boolean inherited)
585         throws com.liferay.portal.PortalException,
586             com.liferay.portal.SystemException {
587         return getService().hasRoleUser(companyId, name, userId, inherited);
588     }
589 
590     public static boolean hasUserGroupUser(long userGroupId, long userId)
591         throws com.liferay.portal.SystemException {
592         return getService().hasUserGroupUser(userGroupId, userId);
593     }
594 
595     public static boolean isPasswordExpired(com.liferay.portal.model.User user)
596         throws com.liferay.portal.PortalException,
597             com.liferay.portal.SystemException {
598         return getService().isPasswordExpired(user);
599     }
600 
601     public static boolean isPasswordExpiringSoon(
602         com.liferay.portal.model.User user)
603         throws com.liferay.portal.PortalException,
604             com.liferay.portal.SystemException {
605         return getService().isPasswordExpiringSoon(user);
606     }
607 
608     public static void reIndex(long userId)
609         throws com.liferay.portal.SystemException {
610         getService().reIndex(userId);
611     }
612 
613     public static void reIndex(java.lang.String[] ids)
614         throws com.liferay.portal.SystemException {
615         getService().reIndex(ids);
616     }
617 
618     public static com.liferay.portal.kernel.search.Hits search(long companyId,
619         java.lang.String keywords, java.lang.Boolean active,
620         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
621         int start, int end, com.liferay.portal.kernel.search.Sort sort)
622         throws com.liferay.portal.SystemException {
623         return getService()
624                    .search(companyId, keywords, active, params, start, end, sort);
625     }
626 
627     public static com.liferay.portal.kernel.search.Hits search(long companyId,
628         long userId, java.lang.String keywords, java.lang.Boolean active,
629         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
630         int start, int end, com.liferay.portal.kernel.search.Sort sort)
631         throws com.liferay.portal.SystemException {
632         return getService()
633                    .search(companyId, userId, keywords, active, params, start,
634             end, sort);
635     }
636 
637     public static com.liferay.portal.kernel.search.Hits search(long companyId,
638         java.lang.String firstName, java.lang.String middleName,
639         java.lang.String lastName, java.lang.String screenName,
640         java.lang.String emailAddress, java.lang.Boolean active,
641         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
642         boolean andSearch, int start, int end,
643         com.liferay.portal.kernel.search.Sort sort)
644         throws com.liferay.portal.SystemException {
645         return getService()
646                    .search(companyId, firstName, middleName, lastName,
647             screenName, emailAddress, active, params, andSearch, start, end,
648             sort);
649     }
650 
651     public static com.liferay.portal.kernel.search.Hits search(long companyId,
652         long userId, java.lang.String firstName, java.lang.String middleName,
653         java.lang.String lastName, java.lang.String screenName,
654         java.lang.String emailAddress, java.lang.Boolean active,
655         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
656         boolean andSearch, int start, int end,
657         com.liferay.portal.kernel.search.Sort sort)
658         throws com.liferay.portal.SystemException {
659         return getService()
660                    .search(companyId, userId, firstName, middleName, lastName,
661             screenName, emailAddress, active, params, andSearch, start, end,
662             sort);
663     }
664 
665     public static java.util.List<com.liferay.portal.model.User> search(
666         long companyId, java.lang.String keywords, java.lang.Boolean active,
667         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
668         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
669         throws com.liferay.portal.SystemException {
670         return getService()
671                    .search(companyId, keywords, active, params, start, end, obc);
672     }
673 
674     public static java.util.List<com.liferay.portal.model.User> search(
675         long companyId, java.lang.String firstName,
676         java.lang.String middleName, java.lang.String lastName,
677         java.lang.String screenName, java.lang.String emailAddress,
678         java.lang.Boolean active,
679         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
680         boolean andSearch, int start, int end,
681         com.liferay.portal.kernel.util.OrderByComparator obc)
682         throws com.liferay.portal.SystemException {
683         return getService()
684                    .search(companyId, firstName, middleName, lastName,
685             screenName, emailAddress, active, params, andSearch, start, end, obc);
686     }
687 
688     public static int searchCount(long companyId, java.lang.String keywords,
689         java.lang.Boolean active,
690         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
691         throws com.liferay.portal.SystemException {
692         return getService().searchCount(companyId, keywords, active, params);
693     }
694 
695     public static int searchCount(long companyId, java.lang.String firstName,
696         java.lang.String middleName, java.lang.String lastName,
697         java.lang.String screenName, java.lang.String emailAddress,
698         java.lang.Boolean active,
699         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
700         boolean andSearch) throws com.liferay.portal.SystemException {
701         return getService()
702                    .searchCount(companyId, firstName, middleName, lastName,
703             screenName, emailAddress, active, params, andSearch);
704     }
705 
706     public static void sendPassword(long companyId,
707         java.lang.String emailAddress, java.lang.String remoteAddr,
708         java.lang.String remoteHost, java.lang.String userAgent,
709         java.lang.String fromName, java.lang.String fromAddress,
710         java.lang.String subject, java.lang.String body)
711         throws com.liferay.portal.PortalException,
712             com.liferay.portal.SystemException {
713         getService()
714             .sendPassword(companyId, emailAddress, remoteAddr, remoteHost,
715             userAgent, fromName, fromAddress, subject, body);
716     }
717 
718     public static void setRoleUsers(long roleId, long[] userIds)
719         throws com.liferay.portal.SystemException {
720         getService().setRoleUsers(roleId, userIds);
721     }
722 
723     public static void setUserGroupUsers(long userGroupId, long[] userIds)
724         throws com.liferay.portal.PortalException,
725             com.liferay.portal.SystemException {
726         getService().setUserGroupUsers(userGroupId, userIds);
727     }
728 
729     public static void unsetGroupUsers(long groupId, long[] userIds)
730         throws com.liferay.portal.SystemException {
731         getService().unsetGroupUsers(groupId, userIds);
732     }
733 
734     public static void unsetOrganizationUsers(long organizationId,
735         long[] userIds)
736         throws com.liferay.portal.PortalException,
737             com.liferay.portal.SystemException {
738         getService().unsetOrganizationUsers(organizationId, userIds);
739     }
740 
741     public static void unsetPasswordPolicyUsers(long passwordPolicyId,
742         long[] userIds) throws com.liferay.portal.SystemException {
743         getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds);
744     }
745 
746     public static void unsetRoleUsers(long roleId, long[] userIds)
747         throws com.liferay.portal.PortalException,
748             com.liferay.portal.SystemException {
749         getService().unsetRoleUsers(roleId, userIds);
750     }
751 
752     public static void unsetRoleUsers(long roleId,
753         java.util.List<com.liferay.portal.model.User> users)
754         throws com.liferay.portal.PortalException,
755             com.liferay.portal.SystemException {
756         getService().unsetRoleUsers(roleId, users);
757     }
758 
759     public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
760         throws com.liferay.portal.SystemException {
761         getService().unsetUserGroupUsers(userGroupId, userIds);
762     }
763 
764     public static com.liferay.portal.model.User updateActive(long userId,
765         boolean active)
766         throws com.liferay.portal.PortalException,
767             com.liferay.portal.SystemException {
768         return getService().updateActive(userId, active);
769     }
770 
771     public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
772         long userId, boolean agreedToTermsOfUse)
773         throws com.liferay.portal.PortalException,
774             com.liferay.portal.SystemException {
775         return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse);
776     }
777 
778     public static com.liferay.portal.model.User updateCreateDate(long userId,
779         java.util.Date createDate)
780         throws com.liferay.portal.PortalException,
781             com.liferay.portal.SystemException {
782         return getService().updateCreateDate(userId, createDate);
783     }
784 
785     public static com.liferay.portal.model.User updateEmailAddress(
786         long userId, java.lang.String password, java.lang.String emailAddress1,
787         java.lang.String emailAddress2)
788         throws com.liferay.portal.PortalException,
789             com.liferay.portal.SystemException {
790         return getService()
791                    .updateEmailAddress(userId, password, emailAddress1,
792             emailAddress2);
793     }
794 
795     public static void updateGroups(long userId, long[] newGroupIds)
796         throws com.liferay.portal.SystemException {
797         getService().updateGroups(userId, newGroupIds);
798     }
799 
800     public static com.liferay.portal.model.User updateLastLogin(long userId,
801         java.lang.String loginIP)
802         throws com.liferay.portal.PortalException,
803             com.liferay.portal.SystemException {
804         return getService().updateLastLogin(userId, loginIP);
805     }
806 
807     public static com.liferay.portal.model.User updateLockout(
808         com.liferay.portal.model.User user, boolean lockout)
809         throws com.liferay.portal.PortalException,
810             com.liferay.portal.SystemException {
811         return getService().updateLockout(user, lockout);
812     }
813 
814     public static com.liferay.portal.model.User updateLockoutByEmailAddress(
815         long companyId, java.lang.String emailAddress, boolean lockout)
816         throws com.liferay.portal.PortalException,
817             com.liferay.portal.SystemException {
818         return getService()
819                    .updateLockoutByEmailAddress(companyId, emailAddress, lockout);
820     }
821 
822     public static com.liferay.portal.model.User updateLockoutById(long userId,
823         boolean lockout)
824         throws com.liferay.portal.PortalException,
825             com.liferay.portal.SystemException {
826         return getService().updateLockoutById(userId, lockout);
827     }
828 
829     public static com.liferay.portal.model.User updateLockoutByScreenName(
830         long companyId, java.lang.String screenName, boolean lockout)
831         throws com.liferay.portal.PortalException,
832             com.liferay.portal.SystemException {
833         return getService()
834                    .updateLockoutByScreenName(companyId, screenName, lockout);
835     }
836 
837     public static com.liferay.portal.model.User updateModifiedDate(
838         long userId, java.util.Date modifiedDate)
839         throws com.liferay.portal.PortalException,
840             com.liferay.portal.SystemException {
841         return getService().updateModifiedDate(userId, modifiedDate);
842     }
843 
844     public static void updateOpenId(long userId, java.lang.String openId)
845         throws com.liferay.portal.PortalException,
846             com.liferay.portal.SystemException {
847         getService().updateOpenId(userId, openId);
848     }
849 
850     public static void updateOrganizations(long userId,
851         long[] newOrganizationIds)
852         throws com.liferay.portal.PortalException,
853             com.liferay.portal.SystemException {
854         getService().updateOrganizations(userId, newOrganizationIds);
855     }
856 
857     public static com.liferay.portal.model.User updatePassword(long userId,
858         java.lang.String password1, java.lang.String password2,
859         boolean passwordReset)
860         throws com.liferay.portal.PortalException,
861             com.liferay.portal.SystemException {
862         return getService()
863                    .updatePassword(userId, password1, password2, passwordReset);
864     }
865 
866     public static com.liferay.portal.model.User updatePassword(long userId,
867         java.lang.String password1, java.lang.String password2,
868         boolean passwordReset, boolean silentUpdate)
869         throws com.liferay.portal.PortalException,
870             com.liferay.portal.SystemException {
871         return getService()
872                    .updatePassword(userId, password1, password2, passwordReset,
873             silentUpdate);
874     }
875 
876     public static com.liferay.portal.model.User updatePasswordManually(
877         long userId, java.lang.String password, boolean passwordEncrypted,
878         boolean passwordReset, java.util.Date passwordModifiedDate)
879         throws com.liferay.portal.PortalException,
880             com.liferay.portal.SystemException {
881         return getService()
882                    .updatePasswordManually(userId, password, passwordEncrypted,
883             passwordReset, passwordModifiedDate);
884     }
885 
886     public static void updatePasswordReset(long userId, boolean passwordReset)
887         throws com.liferay.portal.PortalException,
888             com.liferay.portal.SystemException {
889         getService().updatePasswordReset(userId, passwordReset);
890     }
891 
892     public static void updatePortrait(long userId, byte[] bytes)
893         throws com.liferay.portal.PortalException,
894             com.liferay.portal.SystemException {
895         getService().updatePortrait(userId, bytes);
896     }
897 
898     public static void updateReminderQuery(long userId,
899         java.lang.String question, java.lang.String answer)
900         throws com.liferay.portal.PortalException,
901             com.liferay.portal.SystemException {
902         getService().updateReminderQuery(userId, question, answer);
903     }
904 
905     public static void updateScreenName(long userId, java.lang.String screenName)
906         throws com.liferay.portal.PortalException,
907             com.liferay.portal.SystemException {
908         getService().updateScreenName(userId, screenName);
909     }
910 
911     public static com.liferay.portal.model.User updateUser(long userId,
912         java.lang.String oldPassword, java.lang.String newPassword1,
913         java.lang.String newPassword2, boolean passwordReset,
914         java.lang.String reminderQueryQuestion,
915         java.lang.String reminderQueryAnswer, java.lang.String screenName,
916         java.lang.String emailAddress, java.lang.String openId,
917         java.lang.String languageId, java.lang.String timeZoneId,
918         java.lang.String greeting, java.lang.String comments,
919         java.lang.String firstName, java.lang.String middleName,
920         java.lang.String lastName, int prefixId, int suffixId, boolean male,
921         int birthdayMonth, int birthdayDay, int birthdayYear,
922         java.lang.String smsSn, java.lang.String aimSn,
923         java.lang.String facebookSn, java.lang.String icqSn,
924         java.lang.String jabberSn, java.lang.String msnSn,
925         java.lang.String mySpaceSn, java.lang.String skypeSn,
926         java.lang.String twitterSn, java.lang.String ymSn,
927         java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
928         long[] roleIds,
929         java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
930         long[] userGroupIds,
931         com.liferay.portal.service.ServiceContext serviceContext)
932         throws com.liferay.portal.PortalException,
933             com.liferay.portal.SystemException {
934         return getService()
935                    .updateUser(userId, oldPassword, newPassword1, newPassword2,
936             passwordReset, reminderQueryQuestion, reminderQueryAnswer,
937             screenName, emailAddress, openId, languageId, timeZoneId, greeting,
938             comments, firstName, middleName, lastName, prefixId, suffixId,
939             male, birthdayMonth, birthdayDay, birthdayYear, smsSn, aimSn,
940             facebookSn, icqSn, jabberSn, msnSn, mySpaceSn, skypeSn, twitterSn,
941             ymSn, jobTitle, groupIds, organizationIds, roleIds, userGroupRoles,
942             userGroupIds, serviceContext);
943     }
944 
945     public static void updateTagsAsset(long userId,
946         com.liferay.portal.model.User user, java.lang.String[] tagsEntries)
947         throws com.liferay.portal.PortalException,
948             com.liferay.portal.SystemException {
949         getService().updateTagsAsset(userId, user, tagsEntries);
950     }
951 
952     public static UserLocalService getService() {
953         if (_service == null) {
954             _service = (UserLocalService)PortalBeanLocatorUtil.locate(UserLocalService.class.getName());
955 
956             ReferenceRegistry.registerReference(UserLocalServiceUtil.class,
957                 "_service");
958             MethodCache.remove(UserLocalService.class);
959         }
960 
961         return _service;
962     }
963 
964     public void setService(UserLocalService service) {
965         MethodCache.remove(UserLocalService.class);
966 
967         _service = service;
968 
969         ReferenceRegistry.registerReference(UserLocalServiceUtil.class,
970             "_service");
971         MethodCache.remove(UserLocalService.class);
972     }
973 
974     private static UserLocalService _service;
975 }