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