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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.transaction.Isolation;
022    import com.liferay.portal.kernel.transaction.Propagation;
023    import com.liferay.portal.kernel.transaction.Transactional;
024    
025    /**
026     * Provides the local service interface for UserGroup. Methods of this
027     * service will not have security checks based on the propagated JAAS
028     * credentials because this service can only be accessed from within the same
029     * VM.
030     *
031     * @author Brian Wing Shun Chan
032     * @see UserGroupLocalServiceUtil
033     * @see com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl
034     * @see com.liferay.portal.service.impl.UserGroupLocalServiceImpl
035     * @generated
036     */
037    @ProviderType
038    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
039            PortalException.class, SystemException.class})
040    public interface UserGroupLocalService extends BaseLocalService,
041            PersistedModelLocalService {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify or reference this interface directly. Always use {@link UserGroupLocalServiceUtil} to access the user group local service. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
046             */
047    
048            /**
049            * Adds the user group to the database. Also notifies the appropriate model listeners.
050            *
051            * @param userGroup the user group
052            * @return the user group that was added
053            * @throws SystemException if a system exception occurred
054            */
055            public com.liferay.portal.model.UserGroup addUserGroup(
056                    com.liferay.portal.model.UserGroup userGroup)
057                    throws com.liferay.portal.kernel.exception.SystemException;
058    
059            /**
060            * Creates a new user group with the primary key. Does not add the user group to the database.
061            *
062            * @param userGroupId the primary key for the new user group
063            * @return the new user group
064            */
065            public com.liferay.portal.model.UserGroup createUserGroup(long userGroupId);
066    
067            /**
068            * Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners.
069            *
070            * @param userGroupId the primary key of the user group
071            * @return the user group that was removed
072            * @throws PortalException if a user group with the primary key could not be found
073            * @throws SystemException if a system exception occurred
074            */
075            public com.liferay.portal.model.UserGroup deleteUserGroup(long userGroupId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException;
078    
079            /**
080            * Deletes the user group from the database. Also notifies the appropriate model listeners.
081            *
082            * @param userGroup the user group
083            * @return the user group that was removed
084            * @throws PortalException
085            * @throws SystemException if a system exception occurred
086            */
087            public com.liferay.portal.model.UserGroup deleteUserGroup(
088                    com.liferay.portal.model.UserGroup userGroup)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException;
091    
092            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
093    
094            /**
095            * Performs a dynamic query on the database and returns the matching rows.
096            *
097            * @param dynamicQuery the dynamic query
098            * @return the matching rows
099            * @throws SystemException if a system exception occurred
100            */
101            @SuppressWarnings("rawtypes")
102            public java.util.List dynamicQuery(
103                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Performs a dynamic query on the database and returns a range of the matching rows.
108            *
109            * <p>
110            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
111            * </p>
112            *
113            * @param dynamicQuery the dynamic query
114            * @param start the lower bound of the range of model instances
115            * @param end the upper bound of the range of model instances (not inclusive)
116            * @return the range of matching rows
117            * @throws SystemException if a system exception occurred
118            */
119            @SuppressWarnings("rawtypes")
120            public java.util.List dynamicQuery(
121                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
122                    int end) throws com.liferay.portal.kernel.exception.SystemException;
123    
124            /**
125            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
126            *
127            * <p>
128            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
129            * </p>
130            *
131            * @param dynamicQuery the dynamic query
132            * @param start the lower bound of the range of model instances
133            * @param end the upper bound of the range of model instances (not inclusive)
134            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
135            * @return the ordered range of matching rows
136            * @throws SystemException if a system exception occurred
137            */
138            @SuppressWarnings("rawtypes")
139            public java.util.List dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141                    int end,
142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143                    throws com.liferay.portal.kernel.exception.SystemException;
144    
145            /**
146            * Returns the number of rows that match the dynamic query.
147            *
148            * @param dynamicQuery the dynamic query
149            * @return the number of rows that match the dynamic query
150            * @throws SystemException if a system exception occurred
151            */
152            public long dynamicQueryCount(
153                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
154                    throws com.liferay.portal.kernel.exception.SystemException;
155    
156            /**
157            * Returns the number of rows that match the dynamic query.
158            *
159            * @param dynamicQuery the dynamic query
160            * @param projection the projection to apply to the query
161            * @return the number of rows that match the dynamic query
162            * @throws SystemException if a system exception occurred
163            */
164            public long dynamicQueryCount(
165                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
166                    com.liferay.portal.kernel.dao.orm.Projection projection)
167                    throws com.liferay.portal.kernel.exception.SystemException;
168    
169            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170            public com.liferay.portal.model.UserGroup fetchUserGroup(long userGroupId)
171                    throws com.liferay.portal.kernel.exception.SystemException;
172    
173            /**
174            * Returns the user group with the matching UUID and company.
175            *
176            * @param uuid the user group's UUID
177            * @param companyId the primary key of the company
178            * @return the matching user group, or <code>null</code> if a matching user group could not be found
179            * @throws SystemException if a system exception occurred
180            */
181            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182            public com.liferay.portal.model.UserGroup fetchUserGroupByUuidAndCompanyId(
183                    java.lang.String uuid, long companyId)
184                    throws com.liferay.portal.kernel.exception.SystemException;
185    
186            /**
187            * Returns the user group with the primary key.
188            *
189            * @param userGroupId the primary key of the user group
190            * @return the user group
191            * @throws PortalException if a user group with the primary key could not be found
192            * @throws SystemException if a system exception occurred
193            */
194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195            public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId)
196                    throws com.liferay.portal.kernel.exception.PortalException,
197                            com.liferay.portal.kernel.exception.SystemException;
198    
199            @Override
200            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201            public com.liferay.portal.model.PersistedModel getPersistedModel(
202                    java.io.Serializable primaryKeyObj)
203                    throws com.liferay.portal.kernel.exception.PortalException,
204                            com.liferay.portal.kernel.exception.SystemException;
205    
206            /**
207            * Returns the user group with the matching UUID and company.
208            *
209            * @param uuid the user group's UUID
210            * @param companyId the primary key of the company
211            * @return the matching user group
212            * @throws PortalException if a matching user group could not be found
213            * @throws SystemException if a system exception occurred
214            */
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public com.liferay.portal.model.UserGroup getUserGroupByUuidAndCompanyId(
217                    java.lang.String uuid, long companyId)
218                    throws com.liferay.portal.kernel.exception.PortalException,
219                            com.liferay.portal.kernel.exception.SystemException;
220    
221            /**
222            * Returns a range of all the user groups.
223            *
224            * <p>
225            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
226            * </p>
227            *
228            * @param start the lower bound of the range of user groups
229            * @param end the upper bound of the range of user groups (not inclusive)
230            * @return the range of user groups
231            * @throws SystemException if a system exception occurred
232            */
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
235                    int start, int end)
236                    throws com.liferay.portal.kernel.exception.SystemException;
237    
238            /**
239            * Returns the number of user groups.
240            *
241            * @return the number of user groups
242            * @throws SystemException if a system exception occurred
243            */
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public int getUserGroupsCount()
246                    throws com.liferay.portal.kernel.exception.SystemException;
247    
248            /**
249            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
250            *
251            * @param userGroup the user group
252            * @return the user group that was updated
253            * @throws SystemException if a system exception occurred
254            */
255            public com.liferay.portal.model.UserGroup updateUserGroup(
256                    com.liferay.portal.model.UserGroup userGroup)
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * @throws SystemException if a system exception occurred
261            */
262            public void addGroupUserGroup(long groupId, long userGroupId)
263                    throws com.liferay.portal.kernel.exception.SystemException;
264    
265            /**
266            * @throws SystemException if a system exception occurred
267            */
268            public void addGroupUserGroup(long groupId,
269                    com.liferay.portal.model.UserGroup userGroup)
270                    throws com.liferay.portal.kernel.exception.SystemException;
271    
272            /**
273            * @throws SystemException if a system exception occurred
274            */
275            public void addGroupUserGroups(long groupId, long[] userGroupIds)
276                    throws com.liferay.portal.kernel.exception.SystemException;
277    
278            /**
279            * @throws SystemException if a system exception occurred
280            */
281            public void addGroupUserGroups(long groupId,
282                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
283                    throws com.liferay.portal.kernel.exception.SystemException;
284    
285            /**
286            * @throws SystemException if a system exception occurred
287            */
288            public void clearGroupUserGroups(long groupId)
289                    throws com.liferay.portal.kernel.exception.SystemException;
290    
291            /**
292            * @throws SystemException if a system exception occurred
293            */
294            public void deleteGroupUserGroup(long groupId, long userGroupId)
295                    throws com.liferay.portal.kernel.exception.SystemException;
296    
297            /**
298            * @throws SystemException if a system exception occurred
299            */
300            public void deleteGroupUserGroup(long groupId,
301                    com.liferay.portal.model.UserGroup userGroup)
302                    throws com.liferay.portal.kernel.exception.SystemException;
303    
304            /**
305            * @throws SystemException if a system exception occurred
306            */
307            public void deleteGroupUserGroups(long groupId, long[] userGroupIds)
308                    throws com.liferay.portal.kernel.exception.SystemException;
309    
310            /**
311            * @throws SystemException if a system exception occurred
312            */
313            public void deleteGroupUserGroups(long groupId,
314                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
315                    throws com.liferay.portal.kernel.exception.SystemException;
316    
317            /**
318            * @throws SystemException if a system exception occurred
319            */
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
322                    long groupId)
323                    throws com.liferay.portal.kernel.exception.SystemException;
324    
325            /**
326            * @throws SystemException if a system exception occurred
327            */
328            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329            public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
330                    long groupId, int start, int end)
331                    throws com.liferay.portal.kernel.exception.SystemException;
332    
333            /**
334            * @throws SystemException if a system exception occurred
335            */
336            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
337            public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
338                    long groupId, int start, int end,
339                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
340                    throws com.liferay.portal.kernel.exception.SystemException;
341    
342            /**
343            * @throws SystemException if a system exception occurred
344            */
345            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
346            public int getGroupUserGroupsCount(long groupId)
347                    throws com.liferay.portal.kernel.exception.SystemException;
348    
349            /**
350            * @throws SystemException if a system exception occurred
351            */
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public boolean hasGroupUserGroup(long groupId, long userGroupId)
354                    throws com.liferay.portal.kernel.exception.SystemException;
355    
356            /**
357            * @throws SystemException if a system exception occurred
358            */
359            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
360            public boolean hasGroupUserGroups(long groupId)
361                    throws com.liferay.portal.kernel.exception.SystemException;
362    
363            /**
364            * @throws SystemException if a system exception occurred
365            */
366            public void setGroupUserGroups(long groupId, long[] userGroupIds)
367                    throws com.liferay.portal.kernel.exception.SystemException;
368    
369            /**
370            * @throws SystemException if a system exception occurred
371            */
372            public void addTeamUserGroup(long teamId, long userGroupId)
373                    throws com.liferay.portal.kernel.exception.SystemException;
374    
375            /**
376            * @throws SystemException if a system exception occurred
377            */
378            public void addTeamUserGroup(long teamId,
379                    com.liferay.portal.model.UserGroup userGroup)
380                    throws com.liferay.portal.kernel.exception.SystemException;
381    
382            /**
383            * @throws SystemException if a system exception occurred
384            */
385            public void addTeamUserGroups(long teamId, long[] userGroupIds)
386                    throws com.liferay.portal.kernel.exception.SystemException;
387    
388            /**
389            * @throws SystemException if a system exception occurred
390            */
391            public void addTeamUserGroups(long teamId,
392                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
393                    throws com.liferay.portal.kernel.exception.SystemException;
394    
395            /**
396            * @throws SystemException if a system exception occurred
397            */
398            public void clearTeamUserGroups(long teamId)
399                    throws com.liferay.portal.kernel.exception.SystemException;
400    
401            /**
402            * @throws SystemException if a system exception occurred
403            */
404            public void deleteTeamUserGroup(long teamId, long userGroupId)
405                    throws com.liferay.portal.kernel.exception.SystemException;
406    
407            /**
408            * @throws SystemException if a system exception occurred
409            */
410            public void deleteTeamUserGroup(long teamId,
411                    com.liferay.portal.model.UserGroup userGroup)
412                    throws com.liferay.portal.kernel.exception.SystemException;
413    
414            /**
415            * @throws SystemException if a system exception occurred
416            */
417            public void deleteTeamUserGroups(long teamId, long[] userGroupIds)
418                    throws com.liferay.portal.kernel.exception.SystemException;
419    
420            /**
421            * @throws SystemException if a system exception occurred
422            */
423            public void deleteTeamUserGroups(long teamId,
424                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
425                    throws com.liferay.portal.kernel.exception.SystemException;
426    
427            /**
428            * @throws SystemException if a system exception occurred
429            */
430            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
431            public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
432                    long teamId) throws com.liferay.portal.kernel.exception.SystemException;
433    
434            /**
435            * @throws SystemException if a system exception occurred
436            */
437            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
438            public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
439                    long teamId, int start, int end)
440                    throws com.liferay.portal.kernel.exception.SystemException;
441    
442            /**
443            * @throws SystemException if a system exception occurred
444            */
445            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
446            public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
447                    long teamId, int start, int end,
448                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
449                    throws com.liferay.portal.kernel.exception.SystemException;
450    
451            /**
452            * @throws SystemException if a system exception occurred
453            */
454            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
455            public int getTeamUserGroupsCount(long teamId)
456                    throws com.liferay.portal.kernel.exception.SystemException;
457    
458            /**
459            * @throws SystemException if a system exception occurred
460            */
461            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
462            public boolean hasTeamUserGroup(long teamId, long userGroupId)
463                    throws com.liferay.portal.kernel.exception.SystemException;
464    
465            /**
466            * @throws SystemException if a system exception occurred
467            */
468            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
469            public boolean hasTeamUserGroups(long teamId)
470                    throws com.liferay.portal.kernel.exception.SystemException;
471    
472            /**
473            * @throws SystemException if a system exception occurred
474            */
475            public void setTeamUserGroups(long teamId, long[] userGroupIds)
476                    throws com.liferay.portal.kernel.exception.SystemException;
477    
478            /**
479            * @throws SystemException if a system exception occurred
480            */
481            public void addUserUserGroup(long userId, long userGroupId)
482                    throws com.liferay.portal.kernel.exception.SystemException;
483    
484            /**
485            * @throws SystemException if a system exception occurred
486            */
487            public void addUserUserGroup(long userId,
488                    com.liferay.portal.model.UserGroup userGroup)
489                    throws com.liferay.portal.kernel.exception.SystemException;
490    
491            /**
492            * @throws SystemException if a system exception occurred
493            */
494            public void addUserUserGroups(long userId, long[] userGroupIds)
495                    throws com.liferay.portal.kernel.exception.SystemException;
496    
497            /**
498            * @throws SystemException if a system exception occurred
499            */
500            public void addUserUserGroups(long userId,
501                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
502                    throws com.liferay.portal.kernel.exception.SystemException;
503    
504            /**
505            * @throws SystemException if a system exception occurred
506            */
507            public void clearUserUserGroups(long userId)
508                    throws com.liferay.portal.kernel.exception.SystemException;
509    
510            /**
511            * @throws SystemException if a system exception occurred
512            */
513            public void deleteUserUserGroup(long userId, long userGroupId)
514                    throws com.liferay.portal.kernel.exception.SystemException;
515    
516            /**
517            * @throws SystemException if a system exception occurred
518            */
519            public void deleteUserUserGroup(long userId,
520                    com.liferay.portal.model.UserGroup userGroup)
521                    throws com.liferay.portal.kernel.exception.SystemException;
522    
523            /**
524            * @throws SystemException if a system exception occurred
525            */
526            public void deleteUserUserGroups(long userId, long[] userGroupIds)
527                    throws com.liferay.portal.kernel.exception.SystemException;
528    
529            /**
530            * @throws SystemException if a system exception occurred
531            */
532            public void deleteUserUserGroups(long userId,
533                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
534                    throws com.liferay.portal.kernel.exception.SystemException;
535    
536            /**
537            * @throws SystemException if a system exception occurred
538            */
539            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
540            public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
541                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
542    
543            /**
544            * @throws SystemException if a system exception occurred
545            */
546            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
547            public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
548                    long userId, int start, int end)
549                    throws com.liferay.portal.kernel.exception.SystemException;
550    
551            /**
552            * @throws SystemException if a system exception occurred
553            */
554            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
555            public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
556                    long userId, int start, int end,
557                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
558                    throws com.liferay.portal.kernel.exception.SystemException;
559    
560            /**
561            * @throws SystemException if a system exception occurred
562            */
563            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
564            public int getUserUserGroupsCount(long userId)
565                    throws com.liferay.portal.kernel.exception.SystemException;
566    
567            /**
568            * @throws SystemException if a system exception occurred
569            */
570            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
571            public boolean hasUserUserGroup(long userId, long userGroupId)
572                    throws com.liferay.portal.kernel.exception.SystemException;
573    
574            /**
575            * @throws SystemException if a system exception occurred
576            */
577            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
578            public boolean hasUserUserGroups(long userId)
579                    throws com.liferay.portal.kernel.exception.SystemException;
580    
581            /**
582            * @throws PortalException
583            * @throws SystemException if a system exception occurred
584            */
585            public void setUserUserGroups(long userId, long[] userGroupIds)
586                    throws com.liferay.portal.kernel.exception.PortalException,
587                            com.liferay.portal.kernel.exception.SystemException;
588    
589            /**
590            * Returns the Spring bean ID for this bean.
591            *
592            * @return the Spring bean ID for this bean
593            */
594            public java.lang.String getBeanIdentifier();
595    
596            /**
597            * Sets the Spring bean ID for this bean.
598            *
599            * @param beanIdentifier the Spring bean ID for this bean
600            */
601            public void setBeanIdentifier(java.lang.String beanIdentifier);
602    
603            /**
604            * Adds a user group.
605            *
606            * <p>
607            * This method handles the creation and bookkeeping of the user group,
608            * including its resources, metadata, and internal data structures. It is
609            * not necessary to make subsequent calls to setup default groups and
610            * resources for the user group.
611            * </p>
612            *
613            * @param userId the primary key of the user
614            * @param companyId the primary key of the user group's company
615            * @param name the user group's name
616            * @param description the user group's description
617            * @return the user group
618            * @throws PortalException if the user group's information was invalid
619            * @throws SystemException if a system exception occurred
620            * @deprecated As of 6.2.0, replaced by {@link #addUserGroup(long, long,
621            String, String, ServiceContext)}
622            */
623            public com.liferay.portal.model.UserGroup addUserGroup(long userId,
624                    long companyId, java.lang.String name, java.lang.String description)
625                    throws com.liferay.portal.kernel.exception.PortalException,
626                            com.liferay.portal.kernel.exception.SystemException;
627    
628            /**
629            * Adds a user group.
630            *
631            * <p>
632            * This method handles the creation and bookkeeping of the user group,
633            * including its resources, metadata, and internal data structures. It is
634            * not necessary to make subsequent calls to setup default groups and
635            * resources for the user group.
636            * </p>
637            *
638            * @param userId the primary key of the user
639            * @param companyId the primary key of the user group's company
640            * @param name the user group's name
641            * @param description the user group's description
642            * @param serviceContext the service context to be applied (optionally
643            <code>null</code>). Can set expando bridge attributes for the
644            user group.
645            * @return the user group
646            * @throws PortalException if the user group's information was invalid
647            * @throws SystemException if a system exception occurred
648            */
649            public com.liferay.portal.model.UserGroup addUserGroup(long userId,
650                    long companyId, java.lang.String name, java.lang.String description,
651                    com.liferay.portal.service.ServiceContext serviceContext)
652                    throws com.liferay.portal.kernel.exception.PortalException,
653                            com.liferay.portal.kernel.exception.SystemException;
654    
655            /**
656            * Copies the user group's layout to the user.
657            *
658            * @param userGroupId the primary key of the user group
659            * @param userId the primary key of the user
660            * @throws PortalException if a user with the primary key could not be
661            found or if a portal exception occurred
662            * @throws SystemException if a system exception occurred
663            * @deprecated As of 6.2.0
664            */
665            public void copyUserGroupLayouts(long userGroupId, long userId)
666                    throws com.liferay.portal.kernel.exception.PortalException,
667                            com.liferay.portal.kernel.exception.SystemException;
668    
669            /**
670            * Copies the user group's layouts to the users who are not already members
671            * of the user group.
672            *
673            * @param userGroupId the primary key of the user group
674            * @param userIds the primary keys of the users
675            * @throws PortalException if any one of the users could not be found or
676            if a portal exception occurred
677            * @throws SystemException if a system exception occurred
678            * @deprecated As of 6.1.0
679            */
680            public void copyUserGroupLayouts(long userGroupId, long[] userIds)
681                    throws com.liferay.portal.kernel.exception.PortalException,
682                            com.liferay.portal.kernel.exception.SystemException;
683    
684            /**
685            * Copies the user groups' layouts to the user.
686            *
687            * @param userGroupIds the primary keys of the user groups
688            * @param userId the primary key of the user
689            * @throws PortalException if a user with the primary key could not be
690            found or if a portal exception occurred
691            * @throws SystemException if a system exception occurred
692            * @deprecated As of 6.1.0
693            */
694            public void copyUserGroupLayouts(long[] userGroupIds, long userId)
695                    throws com.liferay.portal.kernel.exception.PortalException,
696                            com.liferay.portal.kernel.exception.SystemException;
697    
698            public void deleteUserGroups(long companyId)
699                    throws com.liferay.portal.kernel.exception.PortalException,
700                            com.liferay.portal.kernel.exception.SystemException;
701    
702            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
703            public com.liferay.portal.model.UserGroup fetchUserGroup(long companyId,
704                    java.lang.String name)
705                    throws com.liferay.portal.kernel.exception.SystemException;
706    
707            /**
708            * Returns the user group with the name.
709            *
710            * @param companyId the primary key of the user group's company
711            * @param name the user group's name
712            * @return Returns the user group with the name
713            * @throws PortalException if a user group with the name could not be found
714            * @throws SystemException if a system exception occurred
715            */
716            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
717            public com.liferay.portal.model.UserGroup getUserGroup(long companyId,
718                    java.lang.String name)
719                    throws com.liferay.portal.kernel.exception.PortalException,
720                            com.liferay.portal.kernel.exception.SystemException;
721    
722            /**
723            * Returns all the user groups belonging to the company.
724            *
725            * @param companyId the primary key of the user groups' company
726            * @return the user groups belonging to the company
727            * @throws SystemException if a system exception occurred
728            */
729            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
730            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
731                    long companyId)
732                    throws com.liferay.portal.kernel.exception.SystemException;
733    
734            /**
735            * Returns all the user groups with the primary keys.
736            *
737            * @param userGroupIds the primary keys of the user groups
738            * @return the user groups with the primary keys
739            * @throws PortalException if any one of the user groups could not be found
740            * @throws SystemException if a system exception occurred
741            */
742            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
743            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
744                    long[] userGroupIds)
745                    throws com.liferay.portal.kernel.exception.PortalException,
746                            com.liferay.portal.kernel.exception.SystemException;
747    
748            /**
749            * Returns an ordered range of all the user groups that match the keywords.
750            *
751            * <p>
752            * Useful when paginating results. Returns a maximum of <code>end -
753            * start</code> instances. <code>start</code> and <code>end</code> are not
754            * primary keys, they are indexes in the result set. Thus, <code>0</code>
755            * refers to the first result in the set. Setting both <code>start</code>
756            * and <code>end</code> to {@link
757            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
758            * result set.
759            * </p>
760            *
761            * @param companyId the primary key of the user group's company
762            * @param keywords the keywords (space separated), which may occur in the
763            user group's name or description (optionally <code>null</code>)
764            * @param params the finder params (optionally <code>null</code>). For more
765            information see {@link
766            com.liferay.portal.service.persistence.UserGroupFinder}
767            * @param start the lower bound of the range of user groups to return
768            * @param end the upper bound of the range of user groups to return (not
769            inclusive)
770            * @param obc the comparator to order the user groups (optionally
771            <code>null</code>)
772            * @return the matching user groups ordered by comparator <code>obc</code>
773            * @throws SystemException if a system exception occurred
774            * @see com.liferay.portal.service.persistence.UserGroupFinder
775            */
776            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
777            public java.util.List<com.liferay.portal.model.UserGroup> search(
778                    long companyId, java.lang.String keywords,
779                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
780                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
781                    throws com.liferay.portal.kernel.exception.SystemException;
782    
783            /**
784            * Returns an ordered range of all the user groups that match the keywords,
785            * using the indexer. It is preferable to use this method instead of the
786            * non-indexed version whenever possible for performance reasons.
787            *
788            * <p>
789            * Useful when paginating results. Returns a maximum of <code>end -
790            * start</code> instances. <code>start</code> and <code>end</code> are not
791            * primary keys, they are indexes in the result set. Thus, <code>0</code>
792            * refers to the first result in the set. Setting both <code>start</code>
793            * and <code>end</code> to {@link
794            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
795            * result set.
796            * </p>
797            *
798            * @param companyId the primary key of the user group's company
799            * @param keywords the keywords (space separated), which may occur in the
800            user group's name or description (optionally <code>null</code>)
801            * @param params the finder params (optionally <code>null</code>). For more
802            information see {@link
803            com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer}
804            * @param start the lower bound of the range of user groups to return
805            * @param end the upper bound of the range of user groups to return (not
806            inclusive)
807            * @param sort the field and direction by which to sort (optionally
808            <code>null</code>)
809            * @return the matching user groups ordered by sort
810            * @throws SystemException if a system exception occurred
811            * @see com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer
812            */
813            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
814            public com.liferay.portal.kernel.search.Hits search(long companyId,
815                    java.lang.String keywords,
816                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
817                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
818                    throws com.liferay.portal.kernel.exception.SystemException;
819    
820            /**
821            * Returns an ordered range of all the user groups that match the name and
822            * description. It is preferable to use this method instead of the
823            * non-indexed version whenever possible for performance reasons.
824            *
825            * <p>
826            * Useful when paginating results. Returns a maximum of <code>end -
827            * start</code> instances. <code>start</code> and <code>end</code> are not
828            * primary keys, they are indexes in the result set. Thus, <code>0</code>
829            * refers to the first result in the set. Setting both <code>start</code>
830            * and <code>end</code> to {@link
831            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
832            * result set.
833            * </p>
834            *
835            * @param companyId the primary key of the user group's company
836            * @param name the user group's name (optionally <code>null</code>)
837            * @param description the user group's description (optionally
838            <code>null</code>)
839            * @param params the finder params (optionally <code>null</code>). For more
840            information see {@link
841            com.liferay.portlet.usergroupsadmin.util.UserGroupIndexer}
842            * @param andSearch whether every field must match its keywords or just one
843            field
844            * @param start the lower bound of the range of user groups to return
845            * @param end the upper bound of the range of user groups to return (not
846            inclusive)
847            * @param sort the field and direction by which to sort (optionally
848            <code>null</code>)
849            * @return the matching user groups ordered by sort
850            * @throws SystemException if a system exception occurred
851            * @see com.liferay.portal.service.persistence.UserGroupFinder
852            */
853            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
854            public com.liferay.portal.kernel.search.Hits search(long companyId,
855                    java.lang.String name, java.lang.String description,
856                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
857                    boolean andSearch, int start, int end,
858                    com.liferay.portal.kernel.search.Sort sort)
859                    throws com.liferay.portal.kernel.exception.SystemException;
860    
861            /**
862            * Returns the number of user groups that match the keywords
863            *
864            * @param companyId the primary key of the user group's company
865            * @param keywords the keywords (space separated), which may occur in the
866            user group's name or description (optionally <code>null</code>)
867            * @param params the finder params (optionally <code>null</code>). For more
868            information see {@link
869            com.liferay.portal.service.persistence.UserGroupFinder}
870            * @return the number of matching user groups
871            * @throws SystemException if a system exception occurred
872            * @see com.liferay.portal.service.persistence.UserGroupFinder
873            */
874            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
875            public int searchCount(long companyId, java.lang.String keywords,
876                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
877                    throws com.liferay.portal.kernel.exception.SystemException;
878    
879            /**
880            * Removes the user groups from the group.
881            *
882            * @param groupId the primary key of the group
883            * @param userGroupIds the primary keys of the user groups
884            * @throws SystemException if a system exception occurred
885            */
886            public void unsetGroupUserGroups(long groupId, long[] userGroupIds)
887                    throws com.liferay.portal.kernel.exception.SystemException;
888    
889            /**
890            * Removes the user groups from the team.
891            *
892            * @param teamId the primary key of the team
893            * @param userGroupIds the primary keys of the user groups
894            * @throws SystemException if a system exception occurred
895            */
896            public void unsetTeamUserGroups(long teamId, long[] userGroupIds)
897                    throws com.liferay.portal.kernel.exception.SystemException;
898    
899            /**
900            * Updates the user group.
901            *
902            * @param companyId the primary key of the user group's company
903            * @param userGroupId the primary key of the user group
904            * @param name the user group's name
905            * @param description the user group's description
906            * @return the user group
907            * @throws PortalException if a user group with the primary key could
908            not be found or if the new information was invalid
909            * @throws SystemException if a system exception occurred
910            * @deprecated As of 6.2.0, replaced by {@link #updateUserGroup(long, long,
911            String, String, ServiceContext)}
912            */
913            public com.liferay.portal.model.UserGroup updateUserGroup(long companyId,
914                    long userGroupId, java.lang.String name, java.lang.String description)
915                    throws com.liferay.portal.kernel.exception.PortalException,
916                            com.liferay.portal.kernel.exception.SystemException;
917    
918            /**
919            * Updates the user group.
920            *
921            * @param companyId the primary key of the user group's company
922            * @param userGroupId the primary key of the user group
923            * @param name the user group's name
924            * @param description the user group's description
925            * @param serviceContext the service context to be applied (optionally
926            <code>null</code>). Can set expando bridge attributes for the
927            user group.
928            * @return the user group
929            * @throws PortalException if a user group with the primary key could not be
930            found or if the new information was invalid
931            * @throws SystemException if a system exception occurred
932            */
933            public com.liferay.portal.model.UserGroup updateUserGroup(long companyId,
934                    long userGroupId, java.lang.String name, java.lang.String description,
935                    com.liferay.portal.service.ServiceContext serviceContext)
936                    throws com.liferay.portal.kernel.exception.PortalException,
937                            com.liferay.portal.kernel.exception.SystemException;
938    }