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