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