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     * The interface for the group local service.
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see GroupLocalServiceUtil
032     * @see com.liferay.portal.service.base.GroupLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.GroupLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface GroupLocalService extends BaseLocalService,
039            PersistedModelLocalService {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify or reference this interface directly. Always use {@link GroupLocalServiceUtil} to access the group local service. Add custom service methods to {@link com.liferay.portal.service.impl.GroupLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
044             */
045    
046            /**
047            * Adds the group to the database. Also notifies the appropriate model listeners.
048            *
049            * @param group the group
050            * @return the group that was added
051            * @throws SystemException if a system exception occurred
052            */
053            public com.liferay.portal.model.Group addGroup(
054                    com.liferay.portal.model.Group group)
055                    throws com.liferay.portal.kernel.exception.SystemException;
056    
057            /**
058            * Creates a new group with the primary key. Does not add the group to the database.
059            *
060            * @param groupId the primary key for the new group
061            * @return the new group
062            */
063            public com.liferay.portal.model.Group createGroup(long groupId);
064    
065            /**
066            * Deletes the group with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param groupId the primary key of the group
069            * @return the group that was removed
070            * @throws PortalException if a group with the primary key could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portal.model.Group deleteGroup(long groupId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Deletes the group from the database. Also notifies the appropriate model listeners.
079            *
080            * @param group the group
081            * @return the group that was removed
082            * @throws PortalException
083            * @throws SystemException if a system exception occurred
084            */
085            public com.liferay.portal.model.Group deleteGroup(
086                    com.liferay.portal.model.Group group)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException;
089    
090            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
091    
092            /**
093            * Performs a dynamic query on the database and returns the matching rows.
094            *
095            * @param dynamicQuery the dynamic query
096            * @return the matching rows
097            * @throws SystemException if a system exception occurred
098            */
099            @SuppressWarnings("rawtypes")
100            public java.util.List dynamicQuery(
101                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
102                    throws com.liferay.portal.kernel.exception.SystemException;
103    
104            /**
105            * Performs a dynamic query on the database and returns a range of the matching rows.
106            *
107            * <p>
108            * 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.
109            * </p>
110            *
111            * @param dynamicQuery the dynamic query
112            * @param start the lower bound of the range of model instances
113            * @param end the upper bound of the range of model instances (not inclusive)
114            * @return the range of matching rows
115            * @throws SystemException if a system exception occurred
116            */
117            @SuppressWarnings("rawtypes")
118            public java.util.List dynamicQuery(
119                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120                    int end) throws com.liferay.portal.kernel.exception.SystemException;
121    
122            /**
123            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
124            *
125            * <p>
126            * 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.
127            * </p>
128            *
129            * @param dynamicQuery the dynamic query
130            * @param start the lower bound of the range of model instances
131            * @param end the upper bound of the range of model instances (not inclusive)
132            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
133            * @return the ordered range of matching rows
134            * @throws SystemException if a system exception occurred
135            */
136            @SuppressWarnings("rawtypes")
137            public java.util.List dynamicQuery(
138                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139                    int end,
140                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141                    throws com.liferay.portal.kernel.exception.SystemException;
142    
143            /**
144            * Returns the number of rows that match the dynamic query.
145            *
146            * @param dynamicQuery the dynamic query
147            * @return the number of rows that match the dynamic query
148            * @throws SystemException if a system exception occurred
149            */
150            public long dynamicQueryCount(
151                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155            public com.liferay.portal.model.Group fetchGroup(long groupId)
156                    throws com.liferay.portal.kernel.exception.SystemException;
157    
158            /**
159            * Returns the group with the primary key.
160            *
161            * @param groupId the primary key of the group
162            * @return the group
163            * @throws PortalException if a group with the primary key could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public com.liferay.portal.model.Group getGroup(long groupId)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException;
170    
171            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172            public com.liferay.portal.model.PersistedModel getPersistedModel(
173                    java.io.Serializable primaryKeyObj)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException;
176    
177            /**
178            * Returns a range of all the groups.
179            *
180            * <p>
181            * 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.
182            * </p>
183            *
184            * @param start the lower bound of the range of groups
185            * @param end the upper bound of the range of groups (not inclusive)
186            * @return the range of groups
187            * @throws SystemException if a system exception occurred
188            */
189            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190            public java.util.List<com.liferay.portal.model.Group> getGroups(int start,
191                    int end) throws com.liferay.portal.kernel.exception.SystemException;
192    
193            /**
194            * Returns the number of groups.
195            *
196            * @return the number of groups
197            * @throws SystemException if a system exception occurred
198            */
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public int getGroupsCount()
201                    throws com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
205            *
206            * @param group the group
207            * @return the group that was updated
208            * @throws SystemException if a system exception occurred
209            */
210            public com.liferay.portal.model.Group updateGroup(
211                    com.liferay.portal.model.Group group)
212                    throws com.liferay.portal.kernel.exception.SystemException;
213    
214            /**
215            * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
216            *
217            * @param group the group
218            * @param merge whether to merge the group with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
219            * @return the group that was updated
220            * @throws SystemException if a system exception occurred
221            */
222            public com.liferay.portal.model.Group updateGroup(
223                    com.liferay.portal.model.Group group, boolean merge)
224                    throws com.liferay.portal.kernel.exception.SystemException;
225    
226            /**
227            * @throws SystemException if a system exception occurred
228            */
229            public void addOrganizationGroup(long organizationId, long groupId)
230                    throws com.liferay.portal.kernel.exception.SystemException;
231    
232            /**
233            * @throws SystemException if a system exception occurred
234            */
235            public void addOrganizationGroup(long organizationId,
236                    com.liferay.portal.model.Group group)
237                    throws com.liferay.portal.kernel.exception.SystemException;
238    
239            /**
240            * @throws SystemException if a system exception occurred
241            */
242            public void addOrganizationGroups(long organizationId, long[] groupIds)
243                    throws com.liferay.portal.kernel.exception.SystemException;
244    
245            /**
246            * @throws SystemException if a system exception occurred
247            */
248            public void addOrganizationGroups(long organizationId,
249                    java.util.List<com.liferay.portal.model.Group> Groups)
250                    throws com.liferay.portal.kernel.exception.SystemException;
251    
252            /**
253            * @throws SystemException if a system exception occurred
254            */
255            public void clearOrganizationGroups(long organizationId)
256                    throws com.liferay.portal.kernel.exception.SystemException;
257    
258            /**
259            * @throws SystemException if a system exception occurred
260            */
261            public void deleteOrganizationGroup(long organizationId, long groupId)
262                    throws com.liferay.portal.kernel.exception.SystemException;
263    
264            /**
265            * @throws SystemException if a system exception occurred
266            */
267            public void deleteOrganizationGroup(long organizationId,
268                    com.liferay.portal.model.Group group)
269                    throws com.liferay.portal.kernel.exception.SystemException;
270    
271            /**
272            * @throws SystemException if a system exception occurred
273            */
274            public void deleteOrganizationGroups(long organizationId, long[] groupIds)
275                    throws com.liferay.portal.kernel.exception.SystemException;
276    
277            /**
278            * @throws SystemException if a system exception occurred
279            */
280            public void deleteOrganizationGroups(long organizationId,
281                    java.util.List<com.liferay.portal.model.Group> Groups)
282                    throws com.liferay.portal.kernel.exception.SystemException;
283    
284            /**
285            * @throws SystemException if a system exception occurred
286            */
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
289                    long organizationId)
290                    throws com.liferay.portal.kernel.exception.SystemException;
291    
292            /**
293            * @throws SystemException if a system exception occurred
294            */
295            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
297                    long organizationId, int start, int end)
298                    throws com.liferay.portal.kernel.exception.SystemException;
299    
300            /**
301            * @throws SystemException if a system exception occurred
302            */
303            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
305                    long organizationId, int start, int end,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException;
308    
309            /**
310            * @throws SystemException if a system exception occurred
311            */
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public int getOrganizationGroupsCount(long organizationId)
314                    throws com.liferay.portal.kernel.exception.SystemException;
315    
316            /**
317            * @throws SystemException if a system exception occurred
318            */
319            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
320            public boolean hasOrganizationGroup(long organizationId, long groupId)
321                    throws com.liferay.portal.kernel.exception.SystemException;
322    
323            /**
324            * @throws SystemException if a system exception occurred
325            */
326            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
327            public boolean hasOrganizationGroups(long organizationId)
328                    throws com.liferay.portal.kernel.exception.SystemException;
329    
330            /**
331            * @throws SystemException if a system exception occurred
332            */
333            public void setOrganizationGroups(long organizationId, long[] groupIds)
334                    throws com.liferay.portal.kernel.exception.SystemException;
335    
336            /**
337            * @throws SystemException if a system exception occurred
338            */
339            public void addPermissionGroup(long permissionId, long groupId)
340                    throws com.liferay.portal.kernel.exception.SystemException;
341    
342            /**
343            * @throws SystemException if a system exception occurred
344            */
345            public void addPermissionGroup(long permissionId,
346                    com.liferay.portal.model.Group group)
347                    throws com.liferay.portal.kernel.exception.SystemException;
348    
349            /**
350            * @throws SystemException if a system exception occurred
351            */
352            public void addPermissionGroups(long permissionId, long[] groupIds)
353                    throws com.liferay.portal.kernel.exception.SystemException;
354    
355            /**
356            * @throws SystemException if a system exception occurred
357            */
358            public void addPermissionGroups(long permissionId,
359                    java.util.List<com.liferay.portal.model.Group> Groups)
360                    throws com.liferay.portal.kernel.exception.SystemException;
361    
362            /**
363            * @throws SystemException if a system exception occurred
364            */
365            public void clearPermissionGroups(long permissionId)
366                    throws com.liferay.portal.kernel.exception.SystemException;
367    
368            /**
369            * @throws SystemException if a system exception occurred
370            */
371            public void deletePermissionGroup(long permissionId, long groupId)
372                    throws com.liferay.portal.kernel.exception.SystemException;
373    
374            /**
375            * @throws SystemException if a system exception occurred
376            */
377            public void deletePermissionGroup(long permissionId,
378                    com.liferay.portal.model.Group group)
379                    throws com.liferay.portal.kernel.exception.SystemException;
380    
381            /**
382            * @throws SystemException if a system exception occurred
383            */
384            public void deletePermissionGroups(long permissionId, long[] groupIds)
385                    throws com.liferay.portal.kernel.exception.SystemException;
386    
387            /**
388            * @throws SystemException if a system exception occurred
389            */
390            public void deletePermissionGroups(long permissionId,
391                    java.util.List<com.liferay.portal.model.Group> Groups)
392                    throws com.liferay.portal.kernel.exception.SystemException;
393    
394            /**
395            * @throws SystemException if a system exception occurred
396            */
397            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
398            public java.util.List<com.liferay.portal.model.Group> getPermissionGroups(
399                    long permissionId)
400                    throws com.liferay.portal.kernel.exception.SystemException;
401    
402            /**
403            * @throws SystemException if a system exception occurred
404            */
405            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
406            public java.util.List<com.liferay.portal.model.Group> getPermissionGroups(
407                    long permissionId, int start, int end)
408                    throws com.liferay.portal.kernel.exception.SystemException;
409    
410            /**
411            * @throws SystemException if a system exception occurred
412            */
413            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
414            public java.util.List<com.liferay.portal.model.Group> getPermissionGroups(
415                    long permissionId, int start, int end,
416                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
417                    throws com.liferay.portal.kernel.exception.SystemException;
418    
419            /**
420            * @throws SystemException if a system exception occurred
421            */
422            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
423            public int getPermissionGroupsCount(long permissionId)
424                    throws com.liferay.portal.kernel.exception.SystemException;
425    
426            /**
427            * @throws SystemException if a system exception occurred
428            */
429            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
430            public boolean hasPermissionGroup(long permissionId, long groupId)
431                    throws com.liferay.portal.kernel.exception.SystemException;
432    
433            /**
434            * @throws SystemException if a system exception occurred
435            */
436            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
437            public boolean hasPermissionGroups(long permissionId)
438                    throws com.liferay.portal.kernel.exception.SystemException;
439    
440            /**
441            * @throws SystemException if a system exception occurred
442            */
443            public void setPermissionGroups(long permissionId, long[] groupIds)
444                    throws com.liferay.portal.kernel.exception.SystemException;
445    
446            /**
447            * @throws SystemException if a system exception occurred
448            */
449            public void addRoleGroup(long roleId, long groupId)
450                    throws com.liferay.portal.kernel.exception.SystemException;
451    
452            /**
453            * @throws SystemException if a system exception occurred
454            */
455            public void addRoleGroup(long roleId, com.liferay.portal.model.Group group)
456                    throws com.liferay.portal.kernel.exception.SystemException;
457    
458            /**
459            * @throws SystemException if a system exception occurred
460            */
461            public void addRoleGroups(long roleId, long[] groupIds)
462                    throws com.liferay.portal.kernel.exception.SystemException;
463    
464            /**
465            * @throws SystemException if a system exception occurred
466            */
467            public void addRoleGroups(long roleId,
468                    java.util.List<com.liferay.portal.model.Group> Groups)
469                    throws com.liferay.portal.kernel.exception.SystemException;
470    
471            /**
472            * @throws SystemException if a system exception occurred
473            */
474            public void clearRoleGroups(long roleId)
475                    throws com.liferay.portal.kernel.exception.SystemException;
476    
477            /**
478            * @throws SystemException if a system exception occurred
479            */
480            public void deleteRoleGroup(long roleId, long groupId)
481                    throws com.liferay.portal.kernel.exception.SystemException;
482    
483            /**
484            * @throws SystemException if a system exception occurred
485            */
486            public void deleteRoleGroup(long roleId,
487                    com.liferay.portal.model.Group group)
488                    throws com.liferay.portal.kernel.exception.SystemException;
489    
490            /**
491            * @throws SystemException if a system exception occurred
492            */
493            public void deleteRoleGroups(long roleId, long[] groupIds)
494                    throws com.liferay.portal.kernel.exception.SystemException;
495    
496            /**
497            * @throws SystemException if a system exception occurred
498            */
499            public void deleteRoleGroups(long roleId,
500                    java.util.List<com.liferay.portal.model.Group> Groups)
501                    throws com.liferay.portal.kernel.exception.SystemException;
502    
503            /**
504            * @throws SystemException if a system exception occurred
505            */
506            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
507            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
508                    long roleId) throws com.liferay.portal.kernel.exception.SystemException;
509    
510            /**
511            * @throws SystemException if a system exception occurred
512            */
513            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
514            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
515                    long roleId, int start, int end)
516                    throws com.liferay.portal.kernel.exception.SystemException;
517    
518            /**
519            * @throws SystemException if a system exception occurred
520            */
521            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
522            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
523                    long roleId, int start, int end,
524                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
525                    throws com.liferay.portal.kernel.exception.SystemException;
526    
527            /**
528            * @throws SystemException if a system exception occurred
529            */
530            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
531            public int getRoleGroupsCount(long roleId)
532                    throws com.liferay.portal.kernel.exception.SystemException;
533    
534            /**
535            * @throws SystemException if a system exception occurred
536            */
537            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
538            public boolean hasRoleGroup(long roleId, long groupId)
539                    throws com.liferay.portal.kernel.exception.SystemException;
540    
541            /**
542            * @throws SystemException if a system exception occurred
543            */
544            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
545            public boolean hasRoleGroups(long roleId)
546                    throws com.liferay.portal.kernel.exception.SystemException;
547    
548            /**
549            * @throws SystemException if a system exception occurred
550            */
551            public void setRoleGroups(long roleId, long[] groupIds)
552                    throws com.liferay.portal.kernel.exception.SystemException;
553    
554            /**
555            * @throws SystemException if a system exception occurred
556            */
557            public void addUserGroupGroup(long userGroupId, long groupId)
558                    throws com.liferay.portal.kernel.exception.SystemException;
559    
560            /**
561            * @throws SystemException if a system exception occurred
562            */
563            public void addUserGroupGroup(long userGroupId,
564                    com.liferay.portal.model.Group group)
565                    throws com.liferay.portal.kernel.exception.SystemException;
566    
567            /**
568            * @throws SystemException if a system exception occurred
569            */
570            public void addUserGroupGroups(long userGroupId, long[] groupIds)
571                    throws com.liferay.portal.kernel.exception.SystemException;
572    
573            /**
574            * @throws SystemException if a system exception occurred
575            */
576            public void addUserGroupGroups(long userGroupId,
577                    java.util.List<com.liferay.portal.model.Group> Groups)
578                    throws com.liferay.portal.kernel.exception.SystemException;
579    
580            /**
581            * @throws SystemException if a system exception occurred
582            */
583            public void clearUserGroupGroups(long userGroupId)
584                    throws com.liferay.portal.kernel.exception.SystemException;
585    
586            /**
587            * @throws SystemException if a system exception occurred
588            */
589            public void deleteUserGroupGroup(long userGroupId, long groupId)
590                    throws com.liferay.portal.kernel.exception.SystemException;
591    
592            /**
593            * @throws SystemException if a system exception occurred
594            */
595            public void deleteUserGroupGroup(long userGroupId,
596                    com.liferay.portal.model.Group group)
597                    throws com.liferay.portal.kernel.exception.SystemException;
598    
599            /**
600            * @throws SystemException if a system exception occurred
601            */
602            public void deleteUserGroupGroups(long userGroupId, long[] groupIds)
603                    throws com.liferay.portal.kernel.exception.SystemException;
604    
605            /**
606            * @throws SystemException if a system exception occurred
607            */
608            public void deleteUserGroupGroups(long userGroupId,
609                    java.util.List<com.liferay.portal.model.Group> Groups)
610                    throws com.liferay.portal.kernel.exception.SystemException;
611    
612            /**
613            * @throws SystemException if a system exception occurred
614            */
615            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
616            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
617                    long userGroupId)
618                    throws com.liferay.portal.kernel.exception.SystemException;
619    
620            /**
621            * @throws SystemException if a system exception occurred
622            */
623            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
624            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
625                    long userGroupId, int start, int end)
626                    throws com.liferay.portal.kernel.exception.SystemException;
627    
628            /**
629            * @throws SystemException if a system exception occurred
630            */
631            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
632            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
633                    long userGroupId, int start, int end,
634                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
635                    throws com.liferay.portal.kernel.exception.SystemException;
636    
637            /**
638            * @throws SystemException if a system exception occurred
639            */
640            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
641            public int getUserGroupGroupsCount(long userGroupId)
642                    throws com.liferay.portal.kernel.exception.SystemException;
643    
644            /**
645            * @throws SystemException if a system exception occurred
646            */
647            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
648            public boolean hasUserGroupGroup(long userGroupId, long groupId)
649                    throws com.liferay.portal.kernel.exception.SystemException;
650    
651            /**
652            * @throws SystemException if a system exception occurred
653            */
654            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
655            public boolean hasUserGroupGroups(long userGroupId)
656                    throws com.liferay.portal.kernel.exception.SystemException;
657    
658            /**
659            * @throws SystemException if a system exception occurred
660            */
661            public void setUserGroupGroups(long userGroupId, long[] groupIds)
662                    throws com.liferay.portal.kernel.exception.SystemException;
663    
664            /**
665            * @throws SystemException if a system exception occurred
666            */
667            public void addUserGroup(long userId, long groupId)
668                    throws com.liferay.portal.kernel.exception.SystemException;
669    
670            /**
671            * @throws SystemException if a system exception occurred
672            */
673            public void addUserGroup(long userId, com.liferay.portal.model.Group group)
674                    throws com.liferay.portal.kernel.exception.SystemException;
675    
676            /**
677            * @throws SystemException if a system exception occurred
678            */
679            public void addUserGroups(long userId, long[] groupIds)
680                    throws com.liferay.portal.kernel.exception.SystemException;
681    
682            /**
683            * @throws SystemException if a system exception occurred
684            */
685            public void addUserGroups(long userId,
686                    java.util.List<com.liferay.portal.model.Group> Groups)
687                    throws com.liferay.portal.kernel.exception.SystemException;
688    
689            /**
690            * @throws SystemException if a system exception occurred
691            */
692            public void clearUserGroups(long userId)
693                    throws com.liferay.portal.kernel.exception.SystemException;
694    
695            /**
696            * @throws SystemException if a system exception occurred
697            */
698            public void deleteUserGroup(long userId, long groupId)
699                    throws com.liferay.portal.kernel.exception.SystemException;
700    
701            /**
702            * @throws SystemException if a system exception occurred
703            */
704            public void deleteUserGroup(long userId,
705                    com.liferay.portal.model.Group group)
706                    throws com.liferay.portal.kernel.exception.SystemException;
707    
708            /**
709            * @throws SystemException if a system exception occurred
710            */
711            public void deleteUserGroups(long userId, long[] groupIds)
712                    throws com.liferay.portal.kernel.exception.SystemException;
713    
714            /**
715            * @throws SystemException if a system exception occurred
716            */
717            public void deleteUserGroups(long userId,
718                    java.util.List<com.liferay.portal.model.Group> Groups)
719                    throws com.liferay.portal.kernel.exception.SystemException;
720    
721            /**
722            * @throws PortalException
723            * @throws SystemException if a system exception occurred
724            */
725            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
726            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
727                    long userId)
728                    throws com.liferay.portal.kernel.exception.PortalException,
729                            com.liferay.portal.kernel.exception.SystemException;
730    
731            /**
732            * @throws PortalException
733            * @throws SystemException if a system exception occurred
734            */
735            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
736            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
737                    long userId, int start, int end)
738                    throws com.liferay.portal.kernel.exception.PortalException,
739                            com.liferay.portal.kernel.exception.SystemException;
740    
741            /**
742            * @throws PortalException
743            * @throws SystemException if a system exception occurred
744            */
745            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
746            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
747                    long userId, int start, int end,
748                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
749                    throws com.liferay.portal.kernel.exception.PortalException,
750                            com.liferay.portal.kernel.exception.SystemException;
751    
752            /**
753            * @throws SystemException if a system exception occurred
754            */
755            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
756            public int getUserGroupsCount(long userId)
757                    throws com.liferay.portal.kernel.exception.SystemException;
758    
759            /**
760            * @throws SystemException if a system exception occurred
761            */
762            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
763            public boolean hasUserGroup(long userId, long groupId)
764                    throws com.liferay.portal.kernel.exception.SystemException;
765    
766            /**
767            * @throws SystemException if a system exception occurred
768            */
769            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
770            public boolean hasUserGroups(long userId)
771                    throws com.liferay.portal.kernel.exception.SystemException;
772    
773            /**
774            * @throws SystemException if a system exception occurred
775            */
776            public void setUserGroups(long userId, long[] groupIds)
777                    throws com.liferay.portal.kernel.exception.SystemException;
778    
779            /**
780            * Returns the Spring bean ID for this bean.
781            *
782            * @return the Spring bean ID for this bean
783            */
784            public java.lang.String getBeanIdentifier();
785    
786            /**
787            * Sets the Spring bean ID for this bean.
788            *
789            * @param beanIdentifier the Spring bean ID for this bean
790            */
791            public void setBeanIdentifier(java.lang.String beanIdentifier);
792    
793            /**
794            * Adds a group.
795            *
796            * @param userId the primary key of the group's creator/owner
797            * @param className the entity's class name
798            * @param classPK the primary key of the entity's instance
799            * @param liveGroupId the primary key of the live group
800            * @param name the entity's name
801            * @param description the group's description (optionally
802            <code>null</code>)
803            * @param type the group's type. For more information see {@link
804            com.liferay.portal.model.GroupConstants}
805            * @param friendlyURL the group's friendlyURL (optionally
806            <code>null</code>)
807            * @param site whether the group is to be associated with a main site
808            * @param active whether the group is active
809            * @param serviceContext the service context to be applied (optionally
810            <code>null</code>). Can set asset category IDs and asset tag
811            names for the group, and whether the group is for staging.
812            * @return the group
813            * @throws PortalException if a creator could not be found, if the group's
814            information was invalid, if a layout could not be found, or if a
815            valid friendly URL could not be created for the group
816            * @throws SystemException if a system exception occurred
817            */
818            public com.liferay.portal.model.Group addGroup(long userId,
819                    java.lang.String className, long classPK, long liveGroupId,
820                    java.lang.String name, java.lang.String description, int type,
821                    java.lang.String friendlyURL, boolean site, boolean active,
822                    com.liferay.portal.service.ServiceContext serviceContext)
823                    throws com.liferay.portal.kernel.exception.PortalException,
824                            com.liferay.portal.kernel.exception.SystemException;
825    
826            /**
827            * Adds the group using the default live group.
828            *
829            * @param userId the primary key of the group's creator/owner
830            * @param className the entity's class name
831            * @param classPK the primary key of the entity's instance
832            * @param name the entity's name
833            * @param description the group's description (optionally
834            <code>null</code>)
835            * @param type the group's type. For more information see {@link
836            com.liferay.portal.model.GroupConstants}
837            * @param friendlyURL the group's friendlyURL
838            * @param site whether the group is to be associated with a main site
839            * @param active whether the group is active
840            * @param serviceContext the service context to be applied (optionally
841            <code>null</code>). Can set asset category IDs and asset tag
842            names for the group, and whether the group is for staging.
843            * @return the group
844            * @throws PortalException if a creator could not be found, if the group's
845            information was invalid, if a layout could not be found, or if a
846            valid friendly URL could not be created for the group
847            * @throws SystemException if a system exception occurred
848            */
849            public com.liferay.portal.model.Group addGroup(long userId,
850                    java.lang.String className, long classPK, java.lang.String name,
851                    java.lang.String description, int type, java.lang.String friendlyURL,
852                    boolean site, boolean active,
853                    com.liferay.portal.service.ServiceContext serviceContext)
854                    throws com.liferay.portal.kernel.exception.PortalException,
855                            com.liferay.portal.kernel.exception.SystemException;
856    
857            /**
858            * Adds a company group if it does not exist. This method is typically used
859            * when a virtual host is added.
860            *
861            * @param companyId the primary key of the company
862            * @throws PortalException if a default user for the company could not be
863            found, if the group's information was invalid, if a layout could
864            not be found, or if a valid friendly URL could not be created for
865            the group
866            * @throws SystemException if a system exception occurred
867            */
868            public void checkCompanyGroup(long companyId)
869                    throws com.liferay.portal.kernel.exception.PortalException,
870                            com.liferay.portal.kernel.exception.SystemException;
871    
872            /**
873            * Creates systems groups and other related data needed by the system on the
874            * very first startup. Also takes care of creating the control panel groups
875            * and layouts.
876            *
877            * @param companyId the primary key of the company
878            * @throws PortalException if a new system group could not be created
879            * @throws SystemException if a system exception occurred
880            */
881            public void checkSystemGroups(long companyId)
882                    throws com.liferay.portal.kernel.exception.PortalException,
883                            com.liferay.portal.kernel.exception.SystemException;
884    
885            /**
886            * Returns the group with the matching friendly URL.
887            *
888            * @param companyId the primary key of the company
889            * @param friendlyURL the friendly URL
890            * @return the group with the friendly URL, or <code>null</code> if a
891            matching group could not be found
892            * @throws SystemException if a system exception occurred
893            */
894            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
895            public com.liferay.portal.model.Group fetchFriendlyURLGroup(
896                    long companyId, java.lang.String friendlyURL)
897                    throws com.liferay.portal.kernel.exception.SystemException;
898    
899            /**
900            * Returns the group with the matching group name.
901            *
902            * @param companyId the primary key of the company
903            * @param name the group's name
904            * @return the group with the name and associated company, or
905            <code>null</code> if a matching group could not be found
906            * @throws SystemException if a system exception occurred
907            */
908            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
909            public com.liferay.portal.model.Group fetchGroup(long companyId,
910                    java.lang.String name)
911                    throws com.liferay.portal.kernel.exception.SystemException;
912    
913            /**
914            * Returns the company group.
915            *
916            * @param companyId the primary key of the company
917            * @return the group associated with the company
918            * @throws PortalException if a matching group could not be found
919            * @throws SystemException if a system exception occurred
920            */
921            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
922            public com.liferay.portal.model.Group getCompanyGroup(long companyId)
923                    throws com.liferay.portal.kernel.exception.PortalException,
924                            com.liferay.portal.kernel.exception.SystemException;
925    
926            /**
927            * Returns a range of all the groups associated with the company.
928            *
929            * <p>
930            * Useful when paginating results. Returns a maximum of <code>end -
931            * start</code> instances. <code>start</code> and <code>end</code> are not
932            * primary keys, they are indexes in the result set. Thus, <code>0</code>
933            * refers to the first result in the set. Setting both <code>start</code>
934            * and <code>end</code> to {@link
935            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
936            * result set.
937            * </p>
938            *
939            * @param companyId the primary key of the company
940            * @param start the lower bound of the range of groups to return
941            * @param end the upper bound of the range of groups to return (not
942            inclusive)
943            * @return the range of groups associated with the company
944            * @throws SystemException if a system exception occurred
945            */
946            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
947            public java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
948                    long companyId, int start, int end)
949                    throws com.liferay.portal.kernel.exception.SystemException;
950    
951            /**
952            * Returns the number of groups associated with the company.
953            *
954            * @param companyId the primary key of the company
955            * @return the number of groups associated with the company
956            * @throws SystemException if a system exception occurred
957            */
958            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
959            public int getCompanyGroupsCount(long companyId)
960                    throws com.liferay.portal.kernel.exception.SystemException;
961    
962            /**
963            * Returns the group with the matching friendly URL.
964            *
965            * @param companyId the primary key of the company
966            * @param friendlyURL the group's friendlyURL
967            * @return the group with the friendly URL
968            * @throws PortalException if a matching group could not be found, or if the
969            friendly URL was invalid
970            * @throws SystemException if a system exception occurred
971            */
972            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
973            public com.liferay.portal.model.Group getFriendlyURLGroup(long companyId,
974                    java.lang.String friendlyURL)
975                    throws com.liferay.portal.kernel.exception.PortalException,
976                            com.liferay.portal.kernel.exception.SystemException;
977    
978            /**
979            * Returns the group with the matching group name.
980            *
981            * @param companyId the primary key of the company
982            * @param name the group's name
983            * @return the group with the name
984            * @throws PortalException if a matching group could not be found
985            * @throws SystemException if a system exception occurred
986            */
987            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
988            public com.liferay.portal.model.Group getGroup(long companyId,
989                    java.lang.String name)
990                    throws com.liferay.portal.kernel.exception.PortalException,
991                            com.liferay.portal.kernel.exception.SystemException;
992    
993            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
994            public java.lang.String getGroupDescriptiveName(
995                    com.liferay.portal.model.Group group, java.util.Locale locale)
996                    throws com.liferay.portal.kernel.exception.PortalException,
997                            com.liferay.portal.kernel.exception.SystemException;
998    
999            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1000            public java.lang.String getGroupDescriptiveName(long groupId,
1001                    java.util.Locale locale)
1002                    throws com.liferay.portal.kernel.exception.PortalException,
1003                            com.liferay.portal.kernel.exception.SystemException;
1004    
1005            /**
1006            * Returns the groups with the matching primary keys.
1007            *
1008            * @param groupIds the primary keys of the groups
1009            * @return the groups with the primary keys
1010            * @throws PortalException if any one of the groups could not be found
1011            * @throws SystemException if a system exception occurred
1012            */
1013            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1014            public java.util.List<com.liferay.portal.model.Group> getGroups(
1015                    long[] groupIds)
1016                    throws com.liferay.portal.kernel.exception.PortalException,
1017                            com.liferay.portal.kernel.exception.SystemException;
1018    
1019            /**
1020            * Returns the group associated with the layout.
1021            *
1022            * @param companyId the primary key of the company
1023            * @param plid the primary key of the layout
1024            * @return the group associated with the layout
1025            * @throws PortalException if a matching group could not be found
1026            * @throws SystemException if a system exception occurred
1027            */
1028            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1029            public com.liferay.portal.model.Group getLayoutGroup(long companyId,
1030                    long plid)
1031                    throws com.liferay.portal.kernel.exception.PortalException,
1032                            com.liferay.portal.kernel.exception.SystemException;
1033    
1034            /**
1035            * Returns the group associated with the layout prototype.
1036            *
1037            * @param companyId the primary key of the company
1038            * @param layoutPrototypeId the primary key of the layout prototype
1039            * @return the group associated with the layout prototype
1040            * @throws PortalException if a matching group could not be found
1041            * @throws SystemException if a system exception occurred
1042            */
1043            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1044            public com.liferay.portal.model.Group getLayoutPrototypeGroup(
1045                    long companyId, long layoutPrototypeId)
1046                    throws com.liferay.portal.kernel.exception.PortalException,
1047                            com.liferay.portal.kernel.exception.SystemException;
1048    
1049            /**
1050            * Returns the group associated with the layout set prototype.
1051            *
1052            * @param companyId the primary key of the company
1053            * @param layoutSetPrototypeId the primary key of the layout set prototype
1054            * @return the group associated with the layout set prototype
1055            * @throws PortalException if a matching group could not be found
1056            * @throws SystemException if a system exception occurred
1057            */
1058            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1059            public com.liferay.portal.model.Group getLayoutSetPrototypeGroup(
1060                    long companyId, long layoutSetPrototypeId)
1061                    throws com.liferay.portal.kernel.exception.PortalException,
1062                            com.liferay.portal.kernel.exception.SystemException;
1063    
1064            /**
1065            * Returns all live groups.
1066            *
1067            * @return all live groups
1068            * @throws SystemException if a system exception occurred
1069            */
1070            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1071            public java.util.List<com.liferay.portal.model.Group> getLiveGroups()
1072                    throws com.liferay.portal.kernel.exception.SystemException;
1073    
1074            /**
1075            * Returns a range of all non-system groups of a specified type (className)
1076            * that have no layouts.
1077            *
1078            * <p>
1079            * Useful when paginating results. Returns a maximum of <code>end -
1080            * start</code> instances. <code>start</code> and <code>end</code> are not
1081            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1082            * refers to the first result in the set. Setting both <code>start</code>
1083            * and <code>end</code> to {@link
1084            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1085            * result set.
1086            * </p>
1087            *
1088            * @param className the entity's class name
1089            * @param privateLayout whether to include groups with private layout sets
1090            or non-private layout sets
1091            * @param start the lower bound of the range of groups to return
1092            * @param end the upper bound of the range of groups to return (not
1093            inclusive)
1094            * @return the range of matching groups
1095            * @throws SystemException if a system exception occurred
1096            */
1097            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1098            public java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
1099                    java.lang.String className, boolean privateLayout, int start, int end)
1100                    throws com.liferay.portal.kernel.exception.SystemException;
1101    
1102            /**
1103            * Returns all non-system groups having <code>null</code> or empty friendly
1104            * URLs.
1105            *
1106            * @return the non-system groups having <code>null</code> or empty friendly
1107            URLs
1108            * @throws SystemException if a system exception occurred
1109            */
1110            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1111            public java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
1112                    throws com.liferay.portal.kernel.exception.SystemException;
1113    
1114            /**
1115            * Returns the specified organization group.
1116            *
1117            * @param companyId the primary key of the company
1118            * @param organizationId the primary key of the organization
1119            * @return the group associated with the organization
1120            * @throws PortalException if a matching group could not be found
1121            * @throws SystemException if a system exception occurred
1122            */
1123            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1124            public com.liferay.portal.model.Group getOrganizationGroup(long companyId,
1125                    long organizationId)
1126                    throws com.liferay.portal.kernel.exception.PortalException,
1127                            com.liferay.portal.kernel.exception.SystemException;
1128    
1129            /**
1130            * Returns the specified organization groups.
1131            *
1132            * @param organizations the organizations
1133            * @return the groups associated with the organizations
1134            */
1135            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1136            public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
1137                    java.util.List<com.liferay.portal.model.Organization> organizations);
1138    
1139            /**
1140            * Returns all the groups related to the organizations.
1141            *
1142            * @param organizations the organizations
1143            * @return the groups related to the organizations
1144            * @throws SystemException if a system exception occurred
1145            */
1146            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1147            public java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups(
1148                    java.util.List<com.liferay.portal.model.Organization> organizations)
1149                    throws com.liferay.portal.kernel.exception.SystemException;
1150    
1151            /**
1152            * Returns the staging group.
1153            *
1154            * @param liveGroupId the primary key of the live group
1155            * @return the staging group
1156            * @throws PortalException if a matching staging group could not be found
1157            * @throws SystemException if a system exception occurred
1158            */
1159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1160            public com.liferay.portal.model.Group getStagingGroup(long liveGroupId)
1161                    throws com.liferay.portal.kernel.exception.PortalException,
1162                            com.liferay.portal.kernel.exception.SystemException;
1163    
1164            /**
1165            * Returns the group associated with the user.
1166            *
1167            * @param companyId the primary key of the company
1168            * @param userId the primary key of the user
1169            * @return the group associated with the user
1170            * @throws PortalException if a matching group could not be found
1171            * @throws SystemException if a system exception occurred
1172            */
1173            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1174            public com.liferay.portal.model.Group getUserGroup(long companyId,
1175                    long userId)
1176                    throws com.liferay.portal.kernel.exception.PortalException,
1177                            com.liferay.portal.kernel.exception.SystemException;
1178    
1179            /**
1180            * Returns the specified "user group" group. That is, the group that
1181            * represents the {@link com.liferay.portal.model.UserGroup} entity.
1182            *
1183            * @param companyId the primary key of the company
1184            * @param userGroupId the primary key of the user group
1185            * @return the group associated with the user group
1186            * @throws PortalException if a matching group could not be found
1187            * @throws SystemException if a system exception occurred
1188            */
1189            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1190            public com.liferay.portal.model.Group getUserGroupGroup(long companyId,
1191                    long userGroupId)
1192                    throws com.liferay.portal.kernel.exception.PortalException,
1193                            com.liferay.portal.kernel.exception.SystemException;
1194    
1195            /**
1196            * Returns all the user's site groups and immediate organization groups,
1197            * optionally including the user's inherited organization groups and user
1198            * groups. System and staged groups are not included.
1199            *
1200            * @param userId the primary key of the user
1201            * @param inherit whether to include the user's inherited organization
1202            groups and user groups
1203            * @return the user's groups and immediate organization groups
1204            * @throws PortalException if a user with the primary key could not be found
1205            * @throws SystemException if a system exception occurred
1206            */
1207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1208            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
1209                    long userId, boolean inherit)
1210                    throws com.liferay.portal.kernel.exception.PortalException,
1211                            com.liferay.portal.kernel.exception.SystemException;
1212    
1213            /**
1214            * Returns a name ordered range of all the user's site groups and immediate
1215            * organization groups, optionally including the user's inherited
1216            * organization groups and user groups. System and staged groups are not
1217            * included.
1218            *
1219            * <p>
1220            * Useful when paginating results. Returns a maximum of <code>end -
1221            * start</code> instances. <code>start</code> and <code>end</code> are not
1222            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1223            * refers to the first result in the set. Setting both <code>start</code>
1224            * and <code>end</code> to {@link
1225            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1226            * result set.
1227            * </p>
1228            *
1229            * @param userId the primary key of the user
1230            * @param inherit whether to include the user's inherited organization
1231            groups and user groups
1232            * @param start the lower bound of the range of groups to return
1233            * @param end the upper bound of the range of groups to return (not
1234            inclusive)
1235            * @return the range of the user's groups and immediate organization groups
1236            ordered by name
1237            * @throws PortalException if a user with the primary key could not be found
1238            * @throws SystemException if a system exception occurred
1239            */
1240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1241            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
1242                    long userId, boolean inherit, int start, int end)
1243                    throws com.liferay.portal.kernel.exception.PortalException,
1244                            com.liferay.portal.kernel.exception.SystemException;
1245    
1246            /**
1247            * Returns the groups associated with the user groups.
1248            *
1249            * @param userGroups the user groups
1250            * @return the groups associated with the user groups
1251            * @throws PortalException if any one of the user group's group could not be
1252            found
1253            * @throws SystemException if a system exception occurred
1254            */
1255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1256            public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
1257                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1258                    throws com.liferay.portal.kernel.exception.PortalException,
1259                            com.liferay.portal.kernel.exception.SystemException;
1260    
1261            /**
1262            * Returns all the groups related to the user groups.
1263            *
1264            * @param userGroups the user groups
1265            * @return the groups related to the user groups
1266            * @throws SystemException if a system exception occurred
1267            */
1268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1269            public java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups(
1270                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1271                    throws com.liferay.portal.kernel.exception.SystemException;
1272    
1273            /**
1274            * Returns the range of all groups associated with the user's organization
1275            * groups, including the ancestors of the organization groups, unless portal
1276            * property <code>organizations.membership.strict</code> is set to
1277            * <code>true</code>.
1278            *
1279            * <p>
1280            * Useful when paginating results. Returns a maximum of <code>end -
1281            * start</code> instances. <code>start</code> and <code>end</code> are not
1282            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1283            * refers to the first result in the set. Setting both <code>start</code>
1284            * and <code>end</code> to {@link
1285            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1286            * result set.
1287            * </p>
1288            *
1289            * @param userId the primary key of the user
1290            * @param start the lower bound of the range of groups to consider
1291            * @param end the upper bound of the range of groups to consider (not
1292            inclusive)
1293            * @return the range of groups associated with the user's organization
1294            groups
1295            * @throws PortalException if a user with the primary key could not be found
1296            or if another portal exception occurred
1297            * @throws SystemException if a system exception occurred
1298            */
1299            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1300            public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
1301                    long userId, int start, int end)
1302                    throws com.liferay.portal.kernel.exception.PortalException,
1303                            com.liferay.portal.kernel.exception.SystemException;
1304    
1305            /**
1306            * Returns <code>true</code> if the live group has a staging group.
1307            *
1308            * @param liveGroupId the primary key of the live group
1309            * @return <code>true</code> if the live group has a staging group;
1310            <code>false</code> otherwise
1311            * @throws SystemException if a system exception occurred
1312            */
1313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1314            public boolean hasStagingGroup(long liveGroupId)
1315                    throws com.liferay.portal.kernel.exception.SystemException;
1316    
1317            /**
1318            * Returns <code>true</code> if the user is immediately associated with the
1319            * group, or optionally if the user is associated with the group via the
1320            * user's organizations, inherited organizations, or user groups.
1321            *
1322            * @param userId the primary key of the user
1323            * @param groupId the primary key of the group
1324            * @param inherit whether to include organization groups and user groups to
1325            which the user belongs in the determination
1326            * @return <code>true</code> if the user is associated with the group;
1327            <code>false</code> otherwise
1328            * @throws SystemException if a system exception occurred
1329            */
1330            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1331            public boolean hasUserGroup(long userId, long groupId, boolean inherit)
1332                    throws com.liferay.portal.kernel.exception.SystemException;
1333    
1334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1335            public com.liferay.portal.model.Group loadFetchGroup(long companyId,
1336                    java.lang.String name)
1337                    throws com.liferay.portal.kernel.exception.SystemException;
1338    
1339            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1340            public com.liferay.portal.model.Group loadGetGroup(long companyId,
1341                    java.lang.String name)
1342                    throws com.liferay.portal.kernel.exception.PortalException,
1343                            com.liferay.portal.kernel.exception.SystemException;
1344    
1345            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1346            public java.util.List<com.liferay.portal.model.Group> search(
1347                    long companyId,
1348                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1349                    int start, int end)
1350                    throws com.liferay.portal.kernel.exception.SystemException;
1351    
1352            /**
1353            * Returns a name ordered range of all the groups that match the class name
1354            * IDs, name, and description, optionally including the user's inherited
1355            * organization groups and user groups. System and staged groups are not
1356            * included.
1357            *
1358            * <p>
1359            * Useful when paginating results. Returns a maximum of <code>end -
1360            * start</code> instances. <code>start</code> and <code>end</code> are not
1361            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1362            * refers to the first result in the set. Setting both <code>start</code>
1363            * and <code>end</code> to {@link
1364            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1365            * result set.
1366            * </p>
1367            *
1368            * @param companyId the primary key of the company
1369            * @param classNameIds the class names of entities to include in the search
1370            (optionally <code>null</code>)
1371            * @param name the group's name (optionally <code>null</code>)
1372            * @param description the group's description (optionally
1373            <code>null</code>)
1374            * @param params the finder params (optionally <code>null</code>). To
1375            include a user's organizations, inherited organizations, and user
1376            groups in the search, add an entry with key
1377            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1378            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1379            For more information see {@link
1380            com.liferay.portal.service.persistence.GroupFinder}
1381            com.liferay.portal.service.persistence.GroupFinder}
1382            * @param start the lower bound of the range of groups to return
1383            * @param end the upper bound of the range of groups to return (not
1384            inclusive)
1385            * @return the matching groups ordered by name
1386            * @throws SystemException if a system exception occurred
1387            */
1388            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1389            public java.util.List<com.liferay.portal.model.Group> search(
1390                    long companyId, long[] classNameIds, java.lang.String name,
1391                    java.lang.String description,
1392                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1393                    int start, int end)
1394                    throws com.liferay.portal.kernel.exception.SystemException;
1395    
1396            /**
1397            * Returns an ordered range of all the groups that match the class name IDs,
1398            * name, and description, optionally including the user's inherited
1399            * organization groups and user groups. System and staged groups are not
1400            * included.
1401            *
1402            * <p>
1403            * Useful when paginating results. Returns a maximum of <code>end -
1404            * start</code> instances. <code>start</code> and <code>end</code> are not
1405            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1406            * refers to the first result in the set. Setting both <code>start</code>
1407            * and <code>end</code> to {@link
1408            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1409            * result set.
1410            * </p>
1411            *
1412            * @param companyId the primary key of the company
1413            * @param classNameIds the group's class name IDs (optionally
1414            <code>null</code>)
1415            * @param name the group's name (optionally <code>null</code>)
1416            * @param description the group's description (optionally
1417            <code>null</code>)
1418            * @param params the finder params (optionally <code>null</code>). To
1419            include a user's organizations, inherited organizations, and user
1420            groups in the search, add an entry with key
1421            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1422            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1423            For more information see {@link
1424            com.liferay.portal.service.persistence.GroupFinder}
1425            * @param start the lower bound of the range of groups to return
1426            * @param end the upper bound of the range of groups to return (not
1427            inclusive)
1428            * @param obc the comparator to order the groups (optionally
1429            <code>null</code>)
1430            * @return the matching groups ordered by comparator <code>obc</code>
1431            * @throws SystemException if a system exception occurred
1432            */
1433            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1434            public java.util.List<com.liferay.portal.model.Group> search(
1435                    long companyId, long[] classNameIds, java.lang.String name,
1436                    java.lang.String description,
1437                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1438                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1439                    throws com.liferay.portal.kernel.exception.SystemException;
1440    
1441            /**
1442            * Returns a name ordered range of all the site groups and organization
1443            * groups that match the name and description, optionally including the
1444            * user's inherited organization groups and user groups. System and staged
1445            * groups are not included.
1446            *
1447            * <p>
1448            * Useful when paginating results. Returns a maximum of <code>end -
1449            * start</code> instances. <code>start</code> and <code>end</code> are not
1450            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1451            * refers to the first result in the set. Setting both <code>start</code>
1452            * and <code>end</code> to {@link
1453            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1454            * result set.
1455            * </p>
1456            *
1457            * @param companyId the primary key of the company
1458            * @param name the group's name (optionally <code>null</code>)
1459            * @param description the group's description (optionally
1460            <code>null</code>)
1461            * @param params the finder params (optionally <code>null</code>). To
1462            include the user's inherited organizations and user groups in the
1463            search, add entries having &quot;usersGroups&quot; and
1464            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1465            information see {@link
1466            com.liferay.portal.service.persistence.GroupFinder}
1467            * @param start the lower bound of the range of groups to return
1468            * @param end the upper bound of the range of groups to return (not
1469            inclusive)
1470            * @return the matching groups ordered by name
1471            * @throws SystemException if a system exception occurred
1472            */
1473            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1474            public java.util.List<com.liferay.portal.model.Group> search(
1475                    long companyId, java.lang.String name, java.lang.String description,
1476                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1477                    int start, int end)
1478                    throws com.liferay.portal.kernel.exception.SystemException;
1479    
1480            /**
1481            * Returns an ordered range of all the site groups and organization groups
1482            * that match the name and description, optionally including the user's
1483            * inherited organization groups and user groups. System and staged groups
1484            * are not included.
1485            *
1486            * <p>
1487            * Useful when paginating results. Returns a maximum of <code>end -
1488            * start</code> instances. <code>start</code> and <code>end</code> are not
1489            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1490            * refers to the first result in the set. Setting both <code>start</code>
1491            * and <code>end</code> to {@link
1492            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1493            * result set.
1494            * </p>
1495            *
1496            * @param companyId the primary key of the company
1497            * @param name the group's name (optionally <code>null</code>)
1498            * @param description the group's description (optionally
1499            <code>null</code>)
1500            * @param params the finder params (optionally <code>null</code>). To
1501            include the user's inherited organizations and user groups in the
1502            search, add entries having &quot;usersGroups&quot; and
1503            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1504            information see {@link
1505            com.liferay.portal.service.persistence.GroupFinder}
1506            * @param start the lower bound of the range of groups to return
1507            * @param end the upper bound of the range of groups to return (not
1508            inclusive)
1509            * @param obc the comparator to order the groups (optionally
1510            <code>null</code>)
1511            * @return the matching groups ordered by comparator <code>obc</code>
1512            * @throws SystemException if a system exception occurred
1513            */
1514            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1515            public java.util.List<com.liferay.portal.model.Group> search(
1516                    long companyId, java.lang.String name, java.lang.String description,
1517                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1518                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1519                    throws com.liferay.portal.kernel.exception.SystemException;
1520    
1521            /**
1522            * Returns the number of groups that match the class name IDs, name, and
1523            * description, optionally including the user's inherited organization
1524            * groups and user groups. System and staged groups are not included.
1525            *
1526            * @param companyId the primary key of the company
1527            * @param classNameIds the class names of entities to include in the search
1528            (optionally <code>null</code>)
1529            * @param name the group's name (optionally <code>null</code>)
1530            * @param description the group's description (optionally
1531            <code>null</code>)
1532            * @param params the finder params (optionally <code>null</code>). To
1533            include the user's inherited organization groups and user groups
1534            in the search, add entries having &quot;usersGroups&quot; and
1535            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1536            information see {@link
1537            com.liferay.portal.service.persistence.GroupFinder}
1538            * @return the number of matching groups
1539            * @throws SystemException if a system exception occurred
1540            */
1541            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1542            public int searchCount(long companyId, long[] classNameIds,
1543                    java.lang.String name, java.lang.String description,
1544                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
1545                    throws com.liferay.portal.kernel.exception.SystemException;
1546    
1547            /**
1548            * Returns the number of groups and immediate organization groups that match
1549            * the name and description, optionally including the user's inherited
1550            * organization groups and user groups. System and staged groups are not
1551            * included.
1552            *
1553            * @param companyId the primary key of the company
1554            * @param name the group's name (optionally <code>null</code>)
1555            * @param description the group's description (optionally
1556            <code>null</code>)
1557            * @param params the finder params (optionally <code>null</code>). To
1558            include the user's inherited organization groups and user groups
1559            in the search, add entries having &quot;usersGroups&quot; and
1560            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1561            information see {@link
1562            com.liferay.portal.service.persistence.GroupFinder}
1563            * @return the number of matching groups
1564            * @throws SystemException if a system exception occurred
1565            */
1566            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1567            public int searchCount(long companyId, java.lang.String name,
1568                    java.lang.String description,
1569                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
1570                    throws com.liferay.portal.kernel.exception.SystemException;
1571    
1572            /**
1573            * Removes the groups from the role.
1574            *
1575            * @param roleId the primary key of the role
1576            * @param groupIds the primary keys of the groups
1577            * @throws SystemException if a system exception occurred
1578            */
1579            public void unsetRoleGroups(long roleId, long[] groupIds)
1580                    throws com.liferay.portal.kernel.exception.SystemException;
1581    
1582            /**
1583            * Removes the user from the groups.
1584            *
1585            * @param userId the primary key of the user
1586            * @param groupIds the primary keys of the groups
1587            * @throws SystemException if a system exception occurred
1588            */
1589            public void unsetUserGroups(long userId, long[] groupIds)
1590                    throws com.liferay.portal.kernel.exception.SystemException;
1591    
1592            /**
1593            * Updates the group's asset replacing categories and tag names.
1594            *
1595            * @param userId the primary key of the user
1596            * @param group the group
1597            * @param assetCategoryIds the primary keys of the asset categories
1598            (optionally <code>null</code>)
1599            * @param assetTagNames the asset tag names (optionally <code>null</code>)
1600            * @throws PortalException if a user with the primary key could not be found
1601            * @throws SystemException if a system exception occurred
1602            */
1603            public void updateAsset(long userId, com.liferay.portal.model.Group group,
1604                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
1605                    throws com.liferay.portal.kernel.exception.PortalException,
1606                            com.liferay.portal.kernel.exception.SystemException;
1607    
1608            /**
1609            * Updates the group's friendly URL.
1610            *
1611            * @param groupId the primary key of the group
1612            * @param friendlyURL the group's new friendlyURL (optionally
1613            <code>null</code>)
1614            * @return the group
1615            * @throws PortalException if a group with the primary key could not be
1616            found or if a valid friendly URL could not be created for the
1617            group
1618            * @throws SystemException if a system exception occurred
1619            */
1620            public com.liferay.portal.model.Group updateFriendlyURL(long groupId,
1621                    java.lang.String friendlyURL)
1622                    throws com.liferay.portal.kernel.exception.PortalException,
1623                            com.liferay.portal.kernel.exception.SystemException;
1624    
1625            /**
1626            * Updates the group's type settings.
1627            *
1628            * @param groupId the primary key of the group
1629            * @param typeSettings the group's new type settings (optionally
1630            <code>null</code>)
1631            * @return the group
1632            * @throws PortalException if a group with the primary key could not be
1633            found
1634            * @throws SystemException if a system exception occurred
1635            */
1636            public com.liferay.portal.model.Group updateGroup(long groupId,
1637                    java.lang.String typeSettings)
1638                    throws com.liferay.portal.kernel.exception.PortalException,
1639                            com.liferay.portal.kernel.exception.SystemException;
1640    
1641            /**
1642            * Updates the group.
1643            *
1644            * @param groupId the primary key of the group
1645            * @param name the group's new name
1646            * @param description the group's new description (optionally
1647            <code>null</code>)
1648            * @param type the group's new type. For more information see {@link
1649            com.liferay.portal.model.GroupConstants}
1650            * @param friendlyURL the group's new friendlyURL (optionally
1651            <code>null</code>)
1652            * @param active whether the group is active
1653            * @param serviceContext the service context to be applied (optionally
1654            <code>null</code>). Can set asset category IDs and asset tag
1655            names for the group.
1656            * @return the group
1657            * @throws PortalException if a group with the primary key could not be
1658            found or if the friendly URL was invalid or could one not be
1659            created
1660            * @throws SystemException if a system exception occurred
1661            */
1662            public com.liferay.portal.model.Group updateGroup(long groupId,
1663                    java.lang.String name, java.lang.String description, int type,
1664                    java.lang.String friendlyURL, boolean active,
1665                    com.liferay.portal.service.ServiceContext serviceContext)
1666                    throws com.liferay.portal.kernel.exception.PortalException,
1667                            com.liferay.portal.kernel.exception.SystemException;
1668    
1669            /**
1670            * Associates the group with a main site if the group is an organization.
1671            *
1672            * @param groupId the primary key of the group
1673            * @param site whether the group is to be associated with a main site
1674            * @return the group
1675            * @throws PortalException if a group with the primary key could not be
1676            found
1677            * @throws SystemException if a system exception occurred
1678            */
1679            public com.liferay.portal.model.Group updateSite(long groupId, boolean site)
1680                    throws com.liferay.portal.kernel.exception.PortalException,
1681                            com.liferay.portal.kernel.exception.SystemException;
1682    }