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