001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * Provides the local service interface for Group. Methods of this
025     * service will not have security checks based on the propagated JAAS
026     * credentials because this service can only be accessed from within the same
027     * VM.
028     *
029     * @author Brian Wing Shun Chan
030     * @see GroupLocalServiceUtil
031     * @see com.liferay.portal.service.base.GroupLocalServiceBaseImpl
032     * @see com.liferay.portal.service.impl.GroupLocalServiceImpl
033     * @generated
034     */
035    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
036            PortalException.class, SystemException.class})
037    public interface GroupLocalService extends BaseLocalService,
038            PersistedModelLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * 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.
043             */
044    
045            /**
046            * Adds the group to the database. Also notifies the appropriate model listeners.
047            *
048            * @param group the group
049            * @return the group that was added
050            * @throws SystemException if a system exception occurred
051            */
052            public com.liferay.portal.model.Group addGroup(
053                    com.liferay.portal.model.Group group)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            /**
057            * Creates a new group with the primary key. Does not add the group to the database.
058            *
059            * @param groupId the primary key for the new group
060            * @return the new group
061            */
062            public com.liferay.portal.model.Group createGroup(long groupId);
063    
064            /**
065            * Deletes the group with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param groupId the primary key of the group
068            * @return the group that was removed
069            * @throws PortalException if a group with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public com.liferay.portal.model.Group deleteGroup(long groupId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            /**
077            * Deletes the group from the database. Also notifies the appropriate model listeners.
078            *
079            * @param group the group
080            * @return the group that was removed
081            * @throws PortalException
082            * @throws SystemException if a system exception occurred
083            */
084            public com.liferay.portal.model.Group deleteGroup(
085                    com.liferay.portal.model.Group group)
086                    throws com.liferay.portal.kernel.exception.PortalException,
087                            com.liferay.portal.kernel.exception.SystemException;
088    
089            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
090    
091            /**
092            * Performs a dynamic query on the database and returns the matching rows.
093            *
094            * @param dynamicQuery the dynamic query
095            * @return the matching rows
096            * @throws SystemException if a system exception occurred
097            */
098            @SuppressWarnings("rawtypes")
099            public java.util.List dynamicQuery(
100                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
101                    throws com.liferay.portal.kernel.exception.SystemException;
102    
103            /**
104            * Performs a dynamic query on the database and returns a range of the matching rows.
105            *
106            * <p>
107            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.GroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
108            * </p>
109            *
110            * @param dynamicQuery the dynamic query
111            * @param start the lower bound of the range of model instances
112            * @param end the upper bound of the range of model instances (not inclusive)
113            * @return the range of matching rows
114            * @throws SystemException if a system exception occurred
115            */
116            @SuppressWarnings("rawtypes")
117            public java.util.List dynamicQuery(
118                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
119                    int end) throws com.liferay.portal.kernel.exception.SystemException;
120    
121            /**
122            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
123            *
124            * <p>
125            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.GroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
126            * </p>
127            *
128            * @param dynamicQuery the dynamic query
129            * @param start the lower bound of the range of model instances
130            * @param end the upper bound of the range of model instances (not inclusive)
131            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
132            * @return the ordered range of matching rows
133            * @throws SystemException if a system exception occurred
134            */
135            @SuppressWarnings("rawtypes")
136            public java.util.List dynamicQuery(
137                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
138                    int end,
139                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
140                    throws com.liferay.portal.kernel.exception.SystemException;
141    
142            /**
143            * Returns the number of rows that match the dynamic query.
144            *
145            * @param dynamicQuery the dynamic query
146            * @return the number of rows that match the dynamic query
147            * @throws SystemException if a system exception occurred
148            */
149            public long dynamicQueryCount(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Returns the number of rows that match the dynamic query.
155            *
156            * @param dynamicQuery the dynamic query
157            * @param projection the projection to apply to the query
158            * @return the number of rows that match the dynamic query
159            * @throws SystemException if a system exception occurred
160            */
161            public long dynamicQueryCount(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
163                    com.liferay.portal.kernel.dao.orm.Projection projection)
164                    throws com.liferay.portal.kernel.exception.SystemException;
165    
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public com.liferay.portal.model.Group fetchGroup(long groupId)
168                    throws com.liferay.portal.kernel.exception.SystemException;
169    
170            /**
171            * Returns the group with the matching UUID and company.
172            *
173            * @param uuid the group's UUID
174            * @param companyId the primary key of the company
175            * @return the matching group, or <code>null</code> if a matching group could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179            public com.liferay.portal.model.Group fetchGroupByUuidAndCompanyId(
180                    java.lang.String uuid, long companyId)
181                    throws com.liferay.portal.kernel.exception.SystemException;
182    
183            /**
184            * Returns the group with the primary key.
185            *
186            * @param groupId the primary key of the group
187            * @return the group
188            * @throws PortalException if a group with the primary key could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public com.liferay.portal.model.Group getGroup(long groupId)
193                    throws com.liferay.portal.kernel.exception.PortalException,
194                            com.liferay.portal.kernel.exception.SystemException;
195    
196            @Override
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public com.liferay.portal.model.PersistedModel getPersistedModel(
199                    java.io.Serializable primaryKeyObj)
200                    throws com.liferay.portal.kernel.exception.PortalException,
201                            com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Returns the group with the matching UUID and company.
205            *
206            * @param uuid the group's UUID
207            * @param companyId the primary key of the company
208            * @return the matching group
209            * @throws PortalException if a matching group could not be found
210            * @throws SystemException if a system exception occurred
211            */
212            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213            public com.liferay.portal.model.Group getGroupByUuidAndCompanyId(
214                    java.lang.String uuid, long companyId)
215                    throws com.liferay.portal.kernel.exception.PortalException,
216                            com.liferay.portal.kernel.exception.SystemException;
217    
218            /**
219            * Returns a range of all the groups.
220            *
221            * <p>
222            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.GroupModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
223            * </p>
224            *
225            * @param start the lower bound of the range of groups
226            * @param end the upper bound of the range of groups (not inclusive)
227            * @return the range of groups
228            * @throws SystemException if a system exception occurred
229            */
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public java.util.List<com.liferay.portal.model.Group> getGroups(int start,
232                    int end) throws com.liferay.portal.kernel.exception.SystemException;
233    
234            /**
235            * Returns the number of groups.
236            *
237            * @return the number of groups
238            * @throws SystemException if a system exception occurred
239            */
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public int getGroupsCount()
242                    throws com.liferay.portal.kernel.exception.SystemException;
243    
244            /**
245            * Updates the group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
246            *
247            * @param group the group
248            * @return the group that was updated
249            * @throws SystemException if a system exception occurred
250            */
251            public com.liferay.portal.model.Group updateGroup(
252                    com.liferay.portal.model.Group group)
253                    throws com.liferay.portal.kernel.exception.SystemException;
254    
255            /**
256            * @throws SystemException if a system exception occurred
257            */
258            public void addOrganizationGroup(long organizationId, long groupId)
259                    throws com.liferay.portal.kernel.exception.SystemException;
260    
261            /**
262            * @throws SystemException if a system exception occurred
263            */
264            public void addOrganizationGroup(long organizationId,
265                    com.liferay.portal.model.Group group)
266                    throws com.liferay.portal.kernel.exception.SystemException;
267    
268            /**
269            * @throws SystemException if a system exception occurred
270            */
271            public void addOrganizationGroups(long organizationId, long[] groupIds)
272                    throws com.liferay.portal.kernel.exception.SystemException;
273    
274            /**
275            * @throws SystemException if a system exception occurred
276            */
277            public void addOrganizationGroups(long organizationId,
278                    java.util.List<com.liferay.portal.model.Group> Groups)
279                    throws com.liferay.portal.kernel.exception.SystemException;
280    
281            /**
282            * @throws SystemException if a system exception occurred
283            */
284            public void clearOrganizationGroups(long organizationId)
285                    throws com.liferay.portal.kernel.exception.SystemException;
286    
287            /**
288            * @throws SystemException if a system exception occurred
289            */
290            public void deleteOrganizationGroup(long organizationId, long groupId)
291                    throws com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * @throws SystemException if a system exception occurred
295            */
296            public void deleteOrganizationGroup(long organizationId,
297                    com.liferay.portal.model.Group group)
298                    throws com.liferay.portal.kernel.exception.SystemException;
299    
300            /**
301            * @throws SystemException if a system exception occurred
302            */
303            public void deleteOrganizationGroups(long organizationId, long[] groupIds)
304                    throws com.liferay.portal.kernel.exception.SystemException;
305    
306            /**
307            * @throws SystemException if a system exception occurred
308            */
309            public void deleteOrganizationGroups(long organizationId,
310                    java.util.List<com.liferay.portal.model.Group> Groups)
311                    throws com.liferay.portal.kernel.exception.SystemException;
312    
313            /**
314            * @throws SystemException if a system exception occurred
315            */
316            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
318                    long organizationId)
319                    throws com.liferay.portal.kernel.exception.SystemException;
320    
321            /**
322            * @throws SystemException if a system exception occurred
323            */
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
326                    long organizationId, int start, int end)
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * @throws SystemException if a system exception occurred
331            */
332            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
333            public java.util.List<com.liferay.portal.model.Group> getOrganizationGroups(
334                    long organizationId, int start, int end,
335                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
336                    throws com.liferay.portal.kernel.exception.SystemException;
337    
338            /**
339            * @throws SystemException if a system exception occurred
340            */
341            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
342            public int getOrganizationGroupsCount(long organizationId)
343                    throws com.liferay.portal.kernel.exception.SystemException;
344    
345            /**
346            * @throws SystemException if a system exception occurred
347            */
348            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
349            public boolean hasOrganizationGroup(long organizationId, long groupId)
350                    throws com.liferay.portal.kernel.exception.SystemException;
351    
352            /**
353            * @throws SystemException if a system exception occurred
354            */
355            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356            public boolean hasOrganizationGroups(long organizationId)
357                    throws com.liferay.portal.kernel.exception.SystemException;
358    
359            /**
360            * @throws SystemException if a system exception occurred
361            */
362            public void setOrganizationGroups(long organizationId, long[] groupIds)
363                    throws com.liferay.portal.kernel.exception.SystemException;
364    
365            /**
366            * @throws SystemException if a system exception occurred
367            */
368            public void addRoleGroup(long roleId, long groupId)
369                    throws com.liferay.portal.kernel.exception.SystemException;
370    
371            /**
372            * @throws SystemException if a system exception occurred
373            */
374            public void addRoleGroup(long roleId, com.liferay.portal.model.Group group)
375                    throws com.liferay.portal.kernel.exception.SystemException;
376    
377            /**
378            * @throws SystemException if a system exception occurred
379            */
380            public void addRoleGroups(long roleId, long[] groupIds)
381                    throws com.liferay.portal.kernel.exception.SystemException;
382    
383            /**
384            * @throws SystemException if a system exception occurred
385            */
386            public void addRoleGroups(long roleId,
387                    java.util.List<com.liferay.portal.model.Group> Groups)
388                    throws com.liferay.portal.kernel.exception.SystemException;
389    
390            /**
391            * @throws SystemException if a system exception occurred
392            */
393            public void clearRoleGroups(long roleId)
394                    throws com.liferay.portal.kernel.exception.SystemException;
395    
396            /**
397            * @throws SystemException if a system exception occurred
398            */
399            public void deleteRoleGroup(long roleId, long groupId)
400                    throws com.liferay.portal.kernel.exception.SystemException;
401    
402            /**
403            * @throws SystemException if a system exception occurred
404            */
405            public void deleteRoleGroup(long roleId,
406                    com.liferay.portal.model.Group group)
407                    throws com.liferay.portal.kernel.exception.SystemException;
408    
409            /**
410            * @throws SystemException if a system exception occurred
411            */
412            public void deleteRoleGroups(long roleId, long[] groupIds)
413                    throws com.liferay.portal.kernel.exception.SystemException;
414    
415            /**
416            * @throws SystemException if a system exception occurred
417            */
418            public void deleteRoleGroups(long roleId,
419                    java.util.List<com.liferay.portal.model.Group> Groups)
420                    throws com.liferay.portal.kernel.exception.SystemException;
421    
422            /**
423            * @throws SystemException if a system exception occurred
424            */
425            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
426            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
427                    long roleId) throws com.liferay.portal.kernel.exception.SystemException;
428    
429            /**
430            * @throws SystemException if a system exception occurred
431            */
432            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
433            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
434                    long roleId, int start, int end)
435                    throws com.liferay.portal.kernel.exception.SystemException;
436    
437            /**
438            * @throws SystemException if a system exception occurred
439            */
440            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
441            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
442                    long roleId, int start, int end,
443                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
444                    throws com.liferay.portal.kernel.exception.SystemException;
445    
446            /**
447            * @throws SystemException if a system exception occurred
448            */
449            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
450            public int getRoleGroupsCount(long roleId)
451                    throws com.liferay.portal.kernel.exception.SystemException;
452    
453            /**
454            * @throws SystemException if a system exception occurred
455            */
456            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
457            public boolean hasRoleGroup(long roleId, long groupId)
458                    throws com.liferay.portal.kernel.exception.SystemException;
459    
460            /**
461            * @throws SystemException if a system exception occurred
462            */
463            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
464            public boolean hasRoleGroups(long roleId)
465                    throws com.liferay.portal.kernel.exception.SystemException;
466    
467            /**
468            * @throws SystemException if a system exception occurred
469            */
470            public void setRoleGroups(long roleId, long[] groupIds)
471                    throws com.liferay.portal.kernel.exception.SystemException;
472    
473            /**
474            * @throws SystemException if a system exception occurred
475            */
476            public void addUserGroupGroup(long userGroupId, long groupId)
477                    throws com.liferay.portal.kernel.exception.SystemException;
478    
479            /**
480            * @throws SystemException if a system exception occurred
481            */
482            public void addUserGroupGroup(long userGroupId,
483                    com.liferay.portal.model.Group group)
484                    throws com.liferay.portal.kernel.exception.SystemException;
485    
486            /**
487            * @throws SystemException if a system exception occurred
488            */
489            public void addUserGroupGroups(long userGroupId, long[] groupIds)
490                    throws com.liferay.portal.kernel.exception.SystemException;
491    
492            /**
493            * @throws SystemException if a system exception occurred
494            */
495            public void addUserGroupGroups(long userGroupId,
496                    java.util.List<com.liferay.portal.model.Group> Groups)
497                    throws com.liferay.portal.kernel.exception.SystemException;
498    
499            /**
500            * @throws SystemException if a system exception occurred
501            */
502            public void clearUserGroupGroups(long userGroupId)
503                    throws com.liferay.portal.kernel.exception.SystemException;
504    
505            /**
506            * @throws SystemException if a system exception occurred
507            */
508            public void deleteUserGroupGroup(long userGroupId, long groupId)
509                    throws com.liferay.portal.kernel.exception.SystemException;
510    
511            /**
512            * @throws SystemException if a system exception occurred
513            */
514            public void deleteUserGroupGroup(long userGroupId,
515                    com.liferay.portal.model.Group group)
516                    throws com.liferay.portal.kernel.exception.SystemException;
517    
518            /**
519            * @throws SystemException if a system exception occurred
520            */
521            public void deleteUserGroupGroups(long userGroupId, long[] groupIds)
522                    throws com.liferay.portal.kernel.exception.SystemException;
523    
524            /**
525            * @throws SystemException if a system exception occurred
526            */
527            public void deleteUserGroupGroups(long userGroupId,
528                    java.util.List<com.liferay.portal.model.Group> Groups)
529                    throws com.liferay.portal.kernel.exception.SystemException;
530    
531            /**
532            * @throws SystemException if a system exception occurred
533            */
534            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
535            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
536                    long userGroupId)
537                    throws com.liferay.portal.kernel.exception.SystemException;
538    
539            /**
540            * @throws SystemException if a system exception occurred
541            */
542            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
543            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
544                    long userGroupId, int start, int end)
545                    throws com.liferay.portal.kernel.exception.SystemException;
546    
547            /**
548            * @throws SystemException if a system exception occurred
549            */
550            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
551            public java.util.List<com.liferay.portal.model.Group> getUserGroupGroups(
552                    long userGroupId, int start, int end,
553                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
554                    throws com.liferay.portal.kernel.exception.SystemException;
555    
556            /**
557            * @throws SystemException if a system exception occurred
558            */
559            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
560            public int getUserGroupGroupsCount(long userGroupId)
561                    throws com.liferay.portal.kernel.exception.SystemException;
562    
563            /**
564            * @throws SystemException if a system exception occurred
565            */
566            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
567            public boolean hasUserGroupGroup(long userGroupId, long groupId)
568                    throws com.liferay.portal.kernel.exception.SystemException;
569    
570            /**
571            * @throws SystemException if a system exception occurred
572            */
573            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
574            public boolean hasUserGroupGroups(long userGroupId)
575                    throws com.liferay.portal.kernel.exception.SystemException;
576    
577            /**
578            * @throws SystemException if a system exception occurred
579            */
580            public void setUserGroupGroups(long userGroupId, long[] groupIds)
581                    throws com.liferay.portal.kernel.exception.SystemException;
582    
583            /**
584            * @throws SystemException if a system exception occurred
585            */
586            public void addUserGroup(long userId, long groupId)
587                    throws com.liferay.portal.kernel.exception.SystemException;
588    
589            /**
590            * @throws SystemException if a system exception occurred
591            */
592            public void addUserGroup(long userId, com.liferay.portal.model.Group group)
593                    throws com.liferay.portal.kernel.exception.SystemException;
594    
595            /**
596            * @throws SystemException if a system exception occurred
597            */
598            public void addUserGroups(long userId, long[] groupIds)
599                    throws com.liferay.portal.kernel.exception.SystemException;
600    
601            /**
602            * @throws SystemException if a system exception occurred
603            */
604            public void addUserGroups(long userId,
605                    java.util.List<com.liferay.portal.model.Group> Groups)
606                    throws com.liferay.portal.kernel.exception.SystemException;
607    
608            /**
609            * @throws SystemException if a system exception occurred
610            */
611            public void clearUserGroups(long userId)
612                    throws com.liferay.portal.kernel.exception.SystemException;
613    
614            /**
615            * @throws SystemException if a system exception occurred
616            */
617            public void deleteUserGroup(long userId, long groupId)
618                    throws com.liferay.portal.kernel.exception.SystemException;
619    
620            /**
621            * @throws SystemException if a system exception occurred
622            */
623            public void deleteUserGroup(long userId,
624                    com.liferay.portal.model.Group group)
625                    throws com.liferay.portal.kernel.exception.SystemException;
626    
627            /**
628            * @throws SystemException if a system exception occurred
629            */
630            public void deleteUserGroups(long userId, long[] groupIds)
631                    throws com.liferay.portal.kernel.exception.SystemException;
632    
633            /**
634            * @throws SystemException if a system exception occurred
635            */
636            public void deleteUserGroups(long userId,
637                    java.util.List<com.liferay.portal.model.Group> Groups)
638                    throws com.liferay.portal.kernel.exception.SystemException;
639    
640            /**
641            * @throws SystemException if a system exception occurred
642            */
643            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
644            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
645                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
646    
647            /**
648            * @throws SystemException if a system exception occurred
649            */
650            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
651            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
652                    long userId, int start, int end)
653                    throws com.liferay.portal.kernel.exception.SystemException;
654    
655            /**
656            * @throws PortalException
657            * @throws SystemException if a system exception occurred
658            */
659            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
660            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
661                    long userId, int start, int end,
662                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
663                    throws com.liferay.portal.kernel.exception.PortalException,
664                            com.liferay.portal.kernel.exception.SystemException;
665    
666            /**
667            * @throws SystemException if a system exception occurred
668            */
669            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
670            public int getUserGroupsCount(long userId)
671                    throws com.liferay.portal.kernel.exception.SystemException;
672    
673            /**
674            * @throws SystemException if a system exception occurred
675            */
676            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
677            public boolean hasUserGroup(long userId, long groupId)
678                    throws com.liferay.portal.kernel.exception.SystemException;
679    
680            /**
681            * @throws SystemException if a system exception occurred
682            */
683            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
684            public boolean hasUserGroups(long userId)
685                    throws com.liferay.portal.kernel.exception.SystemException;
686    
687            /**
688            * @throws SystemException if a system exception occurred
689            */
690            public void setUserGroups(long userId, long[] groupIds)
691                    throws com.liferay.portal.kernel.exception.SystemException;
692    
693            /**
694            * Returns the Spring bean ID for this bean.
695            *
696            * @return the Spring bean ID for this bean
697            */
698            public java.lang.String getBeanIdentifier();
699    
700            /**
701            * Sets the Spring bean ID for this bean.
702            *
703            * @param beanIdentifier the Spring bean ID for this bean
704            */
705            public void setBeanIdentifier(java.lang.String beanIdentifier);
706    
707            /**
708            * Adds a group.
709            *
710            * @param userId the primary key of the group's creator/owner
711            * @param parentGroupId the primary key of the parent group
712            * @param className the entity's class name
713            * @param classPK the primary key of the entity's instance
714            * @param liveGroupId the primary key of the live group
715            * @param name the entity's name
716            * @param description the group's description (optionally
717            <code>null</code>)
718            * @param type the group's type. For more information see {@link
719            com.liferay.portal.model.GroupConstants}
720            * @param friendlyURL the group's friendlyURL (optionally
721            <code>null</code>)
722            * @param site whether the group is to be associated with a main site
723            * @param active whether the group is active
724            * @param serviceContext the service context to be applied (optionally
725            <code>null</code>). Can set asset category IDs and asset tag
726            names for the group, and whether the group is for staging.
727            * @return the group
728            * @throws PortalException if a creator could not be found, if the group's
729            information was invalid, if a layout could not be found, or if a
730            valid friendly URL could not be created for the group
731            * @throws SystemException if a system exception occurred
732            */
733            public com.liferay.portal.model.Group addGroup(long userId,
734                    long parentGroupId, java.lang.String className, long classPK,
735                    long liveGroupId, java.lang.String name, java.lang.String description,
736                    int type, boolean manualMembership, int membershipRestriction,
737                    java.lang.String friendlyURL, boolean site, boolean active,
738                    com.liferay.portal.service.ServiceContext serviceContext)
739                    throws com.liferay.portal.kernel.exception.PortalException,
740                            com.liferay.portal.kernel.exception.SystemException;
741    
742            /**
743            * Adds the group using the default live group.
744            *
745            * @param userId the primary key of the group's creator/owner
746            * @param parentGroupId the primary key of the parent group
747            * @param className the entity's class name
748            * @param classPK the primary key of the entity's instance
749            * @param name the entity's name
750            * @param description the group's description (optionally
751            <code>null</code>)
752            * @param type the group's type. For more information see {@link
753            com.liferay.portal.model.GroupConstants}
754            * @param friendlyURL the group's friendlyURL
755            * @param site whether the group is to be associated with a main site
756            * @param active whether the group is active
757            * @param serviceContext the service context to be applied (optionally
758            <code>null</code>). Can set asset category IDs and asset tag
759            names for the group, and whether the group is for staging.
760            * @return the group
761            * @throws PortalException if a creator could not be found, if the
762            group's information was invalid, if a layout could not be
763            found, or if a valid friendly URL could not be created for
764            the group
765            * @throws SystemException if a system exception occurred
766            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String,
767            long, long, String, String, int, boolean, int, String,
768            boolean, boolean, ServiceContext)}
769            */
770            public com.liferay.portal.model.Group addGroup(long userId,
771                    long parentGroupId, java.lang.String className, long classPK,
772                    java.lang.String name, java.lang.String description, int type,
773                    java.lang.String friendlyURL, boolean site, boolean active,
774                    com.liferay.portal.service.ServiceContext serviceContext)
775                    throws com.liferay.portal.kernel.exception.PortalException,
776                            com.liferay.portal.kernel.exception.SystemException;
777    
778            /**
779            * Adds a group.
780            *
781            * @param userId the primary key of the group's creator/owner
782            * @param className the entity's class name
783            * @param classPK the primary key of the entity's instance
784            * @param liveGroupId the primary key of the live group
785            * @param name the entity's name
786            * @param description the group's description (optionally
787            <code>null</code>)
788            * @param type the group's type. For more information see {@link
789            com.liferay.portal.model.GroupConstants}
790            * @param friendlyURL the group's friendlyURL (optionally
791            <code>null</code>)
792            * @param site whether the group is to be associated with a main site
793            * @param active whether the group is active
794            * @param serviceContext the service context to be applied (optionally
795            <code>null</code>). Can set asset category IDs and asset tag
796            names for the group, and whether the group is for staging.
797            * @return the group
798            * @throws PortalException if a creator could not be found, if the
799            group's information was invalid, if a layout could not be
800            found, or if a valid friendly URL could not be created for
801            the group
802            * @throws SystemException if a system exception occurred
803            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String,
804            long, long, String, String, int, boolean, int, String,
805            boolean, boolean, ServiceContext)}
806            */
807            public com.liferay.portal.model.Group addGroup(long userId,
808                    java.lang.String className, long classPK, long liveGroupId,
809                    java.lang.String name, java.lang.String description, int type,
810                    java.lang.String friendlyURL, boolean site, boolean active,
811                    com.liferay.portal.service.ServiceContext serviceContext)
812                    throws com.liferay.portal.kernel.exception.PortalException,
813                            com.liferay.portal.kernel.exception.SystemException;
814    
815            /**
816            * Adds the group using the default live group.
817            *
818            * @param userId the primary key of the group's creator/owner
819            * @param className the entity's class name
820            * @param classPK the primary key of the entity's instance
821            * @param name the entity's name
822            * @param description the group's description (optionally
823            <code>null</code>)
824            * @param type the group's type. For more information see {@link
825            com.liferay.portal.model.GroupConstants}
826            * @param friendlyURL the group's friendlyURL
827            * @param site whether the group is to be associated with a main site
828            * @param active whether the group is active
829            * @param serviceContext the service context to be applied (optionally
830            <code>null</code>). Can set asset category IDs and asset tag
831            names for the group, and whether the group is for staging.
832            * @return the group
833            * @throws PortalException if a creator could not be found, if the
834            group's information was invalid, if a layout could not be
835            found, or if a valid friendly URL could not be created for
836            the group
837            * @throws SystemException if a system exception occurred
838            * @deprecated As of 6.2.0, replaced by {@link #addGroup(long, long, String,
839            long, long, String, String, int, boolean, int, String,
840            boolean, boolean, ServiceContext)}
841            */
842            public com.liferay.portal.model.Group addGroup(long userId,
843                    java.lang.String className, long classPK, java.lang.String name,
844                    java.lang.String description, int type, java.lang.String friendlyURL,
845                    boolean site, boolean active,
846                    com.liferay.portal.service.ServiceContext serviceContext)
847                    throws com.liferay.portal.kernel.exception.PortalException,
848                            com.liferay.portal.kernel.exception.SystemException;
849    
850            /**
851            * Adds a company group if it does not exist. This method is typically used
852            * when a virtual host is added.
853            *
854            * @param companyId the primary key of the company
855            * @throws PortalException if a default user for the company could not be
856            found, if the group's information was invalid, if a layout could
857            not be found, or if a valid friendly URL could not be created for
858            the group
859            * @throws SystemException if a system exception occurred
860            */
861            public void checkCompanyGroup(long companyId)
862                    throws com.liferay.portal.kernel.exception.PortalException,
863                            com.liferay.portal.kernel.exception.SystemException;
864    
865            /**
866            * Creates systems groups and other related data needed by the system on the
867            * very first startup. Also takes care of creating the Control Panel groups
868            * and layouts.
869            *
870            * @param companyId the primary key of the company
871            * @throws PortalException if a new system group could not be created
872            * @throws SystemException if a system exception occurred
873            */
874            public void checkSystemGroups(long companyId)
875                    throws com.liferay.portal.kernel.exception.PortalException,
876                            com.liferay.portal.kernel.exception.SystemException;
877    
878            public void disableStaging(long groupId)
879                    throws com.liferay.portal.kernel.exception.PortalException,
880                            com.liferay.portal.kernel.exception.SystemException;
881    
882            public void enableStaging(long groupId)
883                    throws com.liferay.portal.kernel.exception.PortalException,
884                            com.liferay.portal.kernel.exception.SystemException;
885    
886            /**
887            * Returns the group with the matching friendly URL.
888            *
889            * @param companyId the primary key of the company
890            * @param friendlyURL the friendly URL
891            * @return the group with the friendly URL, or <code>null</code> if a
892            matching group could not be found
893            * @throws SystemException if a system exception occurred
894            */
895            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
896            public com.liferay.portal.model.Group fetchFriendlyURLGroup(
897                    long companyId, java.lang.String friendlyURL)
898                    throws com.liferay.portal.kernel.exception.SystemException;
899    
900            /**
901            * Returns the group with the matching group name by first searching the
902            * system groups and then using the finder cache.
903            *
904            * @param companyId the primary key of the company
905            * @param name the group's name
906            * @return the group with the name and associated company, or
907            <code>null</code> if a matching group could not be found
908            * @throws SystemException if a system exception occurred
909            */
910            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
911            public com.liferay.portal.model.Group fetchGroup(long companyId,
912                    java.lang.String name)
913                    throws com.liferay.portal.kernel.exception.SystemException;
914    
915            /**
916            * Returns the company group.
917            *
918            * @param companyId the primary key of the company
919            * @return the group associated with the company
920            * @throws PortalException if a matching group could not be found
921            * @throws SystemException if a system exception occurred
922            */
923            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
924            public com.liferay.portal.model.Group getCompanyGroup(long companyId)
925                    throws com.liferay.portal.kernel.exception.PortalException,
926                            com.liferay.portal.kernel.exception.SystemException;
927    
928            /**
929            * Returns a range of all the groups associated with the company.
930            *
931            * <p>
932            * Useful when paginating results. Returns a maximum of <code>end -
933            * start</code> instances. <code>start</code> and <code>end</code> are not
934            * primary keys, they are indexes in the result set. Thus, <code>0</code>
935            * refers to the first result in the set. Setting both <code>start</code>
936            * and <code>end</code> to {@link
937            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
938            * result set.
939            * </p>
940            *
941            * @param companyId the primary key of the company
942            * @param start the lower bound of the range of groups to return
943            * @param end the upper bound of the range of groups to return (not
944            inclusive)
945            * @return the range of groups associated with the company
946            * @throws SystemException if a system exception occurred
947            */
948            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
949            public java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
950                    long companyId, int start, int end)
951                    throws com.liferay.portal.kernel.exception.SystemException;
952    
953            /**
954            * Returns the number of groups associated with the company.
955            *
956            * @param companyId the primary key of the company
957            * @return the number of groups associated with the company
958            * @throws SystemException if a system exception occurred
959            */
960            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
961            public int getCompanyGroupsCount(long companyId)
962                    throws com.liferay.portal.kernel.exception.SystemException;
963    
964            /**
965            * Returns the group with the matching friendly URL.
966            *
967            * @param companyId the primary key of the company
968            * @param friendlyURL the group's friendlyURL
969            * @return the group with the friendly URL
970            * @throws PortalException if a matching group could not be found, or if the
971            friendly URL was invalid
972            * @throws SystemException if a system exception occurred
973            */
974            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
975            public com.liferay.portal.model.Group getFriendlyURLGroup(long companyId,
976                    java.lang.String friendlyURL)
977                    throws com.liferay.portal.kernel.exception.PortalException,
978                            com.liferay.portal.kernel.exception.SystemException;
979    
980            /**
981            * Returns the group with the matching group name.
982            *
983            * @param companyId the primary key of the company
984            * @param name the group's name
985            * @return the group with the name
986            * @throws PortalException if a matching group could not be found
987            * @throws SystemException if a system exception occurred
988            */
989            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
990            public com.liferay.portal.model.Group getGroup(long companyId,
991                    java.lang.String name)
992                    throws com.liferay.portal.kernel.exception.PortalException,
993                            com.liferay.portal.kernel.exception.SystemException;
994    
995            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
996            public java.lang.String getGroupDescriptiveName(
997                    com.liferay.portal.model.Group group, java.util.Locale locale)
998                    throws com.liferay.portal.kernel.exception.PortalException,
999                            com.liferay.portal.kernel.exception.SystemException;
1000    
1001            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1002            public java.lang.String getGroupDescriptiveName(long groupId,
1003                    java.util.Locale locale)
1004                    throws com.liferay.portal.kernel.exception.PortalException,
1005                            com.liferay.portal.kernel.exception.SystemException;
1006    
1007            /**
1008            * Returns all the groups that are direct children of the parent group.
1009            *
1010            * @param companyId the primary key of the company
1011            * @param parentGroupId the primary key of the parent group
1012            * @param site whether the group is to be associated with a main site
1013            * @return the matching groups, or <code>null</code> if no matches were
1014            found
1015            * @throws SystemException if a system exception occurred
1016            */
1017            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1018            public java.util.List<com.liferay.portal.model.Group> getGroups(
1019                    long companyId, long parentGroupId, boolean site)
1020                    throws com.liferay.portal.kernel.exception.SystemException;
1021    
1022            /**
1023            * Returns all the groups that are direct children of the parent group with
1024            * the matching className.
1025            *
1026            * @param companyId the primary key of the company
1027            * @param className the class name of the group
1028            * @param parentGroupId the primary key of the parent group
1029            * @return the matching groups, or <code>null</code> if no matches were
1030            found
1031            * @throws SystemException if a system exception occurred
1032            */
1033            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1034            public java.util.List<com.liferay.portal.model.Group> getGroups(
1035                    long companyId, java.lang.String className, long parentGroupId)
1036                    throws com.liferay.portal.kernel.exception.SystemException;
1037    
1038            /**
1039            * Returns a range of all the groups that are direct children of the parent
1040            * group with the matching className.
1041            *
1042            * @param companyId the primary key of the company
1043            * @param className the class name of the group
1044            * @param parentGroupId the primary key of the parent group
1045            * @param start the lower bound of the range of results
1046            * @param end the upper bound of the range of results (not inclusive)
1047            * @return the range of matching groups
1048            * @throws SystemException if a system exception occurred
1049            */
1050            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1051            public java.util.List<com.liferay.portal.model.Group> getGroups(
1052                    long companyId, java.lang.String className, long parentGroupId,
1053                    int start, int end)
1054                    throws com.liferay.portal.kernel.exception.SystemException;
1055    
1056            /**
1057            * Returns the groups with the matching primary keys.
1058            *
1059            * @param groupIds the primary keys of the groups
1060            * @return the groups with the primary keys
1061            * @throws PortalException if any one of the groups could not be found
1062            * @throws SystemException if a system exception occurred
1063            */
1064            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1065            public java.util.List<com.liferay.portal.model.Group> getGroups(
1066                    long[] groupIds)
1067                    throws com.liferay.portal.kernel.exception.PortalException,
1068                            com.liferay.portal.kernel.exception.SystemException;
1069    
1070            /**
1071            * Returns the number of groups that are direct children of the parent
1072            * group.
1073            *
1074            * @param companyId the primary key of the company
1075            * @param parentGroupId the primary key of the parent group
1076            * @param site whether the group is to be associated with a main site
1077            * @return the number of matching groups
1078            * @throws SystemException if a system exception occurred
1079            */
1080            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1081            public int getGroupsCount(long companyId, long parentGroupId, boolean site)
1082                    throws com.liferay.portal.kernel.exception.SystemException;
1083    
1084            /**
1085            * Returns the number of groups that are direct children of the parent group
1086            * with the matching className.
1087            *
1088            * @param companyId the primary key of the company
1089            * @param className the class name of the group
1090            * @param parentGroupId the primary key of the parent group
1091            * @return the number of matching groups
1092            * @throws SystemException if a system exception occurred
1093            */
1094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1095            public int getGroupsCount(long companyId, java.lang.String className,
1096                    long parentGroupId)
1097                    throws com.liferay.portal.kernel.exception.SystemException;
1098    
1099            /**
1100            * Returns the group associated with the layout.
1101            *
1102            * @param companyId the primary key of the company
1103            * @param plid the primary key of the layout
1104            * @return the group associated with the layout
1105            * @throws PortalException if a matching group could not be found
1106            * @throws SystemException if a system exception occurred
1107            */
1108            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1109            public com.liferay.portal.model.Group getLayoutGroup(long companyId,
1110                    long plid)
1111                    throws com.liferay.portal.kernel.exception.PortalException,
1112                            com.liferay.portal.kernel.exception.SystemException;
1113    
1114            /**
1115            * Returns the group associated with the layout prototype.
1116            *
1117            * @param companyId the primary key of the company
1118            * @param layoutPrototypeId the primary key of the layout prototype
1119            * @return the group associated with the layout prototype
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 getLayoutPrototypeGroup(
1125                    long companyId, long layoutPrototypeId)
1126                    throws com.liferay.portal.kernel.exception.PortalException,
1127                            com.liferay.portal.kernel.exception.SystemException;
1128    
1129            /**
1130            * Returns the group associated with the layout set prototype.
1131            *
1132            * @param companyId the primary key of the company
1133            * @param layoutSetPrototypeId the primary key of the layout set prototype
1134            * @return the group associated with the layout set prototype
1135            * @throws PortalException if a matching group could not be found
1136            * @throws SystemException if a system exception occurred
1137            */
1138            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1139            public com.liferay.portal.model.Group getLayoutSetPrototypeGroup(
1140                    long companyId, long layoutSetPrototypeId)
1141                    throws com.liferay.portal.kernel.exception.PortalException,
1142                            com.liferay.portal.kernel.exception.SystemException;
1143    
1144            /**
1145            * Returns a range of all groups that are children of the parent group and
1146            * that have at least one layout.
1147            *
1148            * <p>
1149            * Useful when paginating results. Returns a maximum of <code>end -
1150            * start</code> instances. <code>start</code> and <code>end</code> are not
1151            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1152            * refers to the first result in the set. Setting both <code>start</code>
1153            * and <code>end</code> to {@link
1154            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1155            * result set.
1156            * </p>
1157            *
1158            * @param companyId the primary key of the company
1159            * @param parentGroupId the primary key of the parent group
1160            * @param site whether the group is to be associated with a main site
1161            * @param start the lower bound of the range of groups to return
1162            * @param end the upper bound of the range of groups to return (not
1163            inclusive)
1164            * @return the range of matching groups
1165            * @throws SystemException if a system exception occurred
1166            */
1167            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1168            public java.util.List<com.liferay.portal.model.Group> getLayoutsGroups(
1169                    long companyId, long parentGroupId, boolean site, int start, int end)
1170                    throws com.liferay.portal.kernel.exception.SystemException;
1171    
1172            /**
1173            * Returns the number of groups that are children or the parent group and
1174            * that have at least one layout
1175            *
1176            * @param companyId the primary key of the company
1177            * @param parentGroupId the primary key of the parent group
1178            * @param site whether the group is to be associated with a main site
1179            * @return the number of matching groups
1180            * @throws SystemException if a system exception occurred
1181            */
1182            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1183            public int getLayoutsGroupsCount(long companyId, long parentGroupId,
1184                    boolean site)
1185                    throws com.liferay.portal.kernel.exception.SystemException;
1186    
1187            /**
1188            * Returns all live groups.
1189            *
1190            * @return all live groups
1191            * @throws SystemException if a system exception occurred
1192            */
1193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1194            public java.util.List<com.liferay.portal.model.Group> getLiveGroups()
1195                    throws com.liferay.portal.kernel.exception.SystemException;
1196    
1197            /**
1198            * Returns a range of all non-system groups of a specified type (className)
1199            * that have no layouts.
1200            *
1201            * <p>
1202            * Useful when paginating results. Returns a maximum of <code>end -
1203            * start</code> instances. <code>start</code> and <code>end</code> are not
1204            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1205            * refers to the first result in the set. Setting both <code>start</code>
1206            * and <code>end</code> to {@link
1207            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1208            * result set.
1209            * </p>
1210            *
1211            * @param className the entity's class name
1212            * @param privateLayout whether to include groups with private layout sets
1213            or non-private layout sets
1214            * @param start the lower bound of the range of groups to return
1215            * @param end the upper bound of the range of groups to return (not
1216            inclusive)
1217            * @return the range of matching groups
1218            * @throws SystemException if a system exception occurred
1219            */
1220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1221            public java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
1222                    java.lang.String className, boolean privateLayout, int start, int end)
1223                    throws com.liferay.portal.kernel.exception.SystemException;
1224    
1225            /**
1226            * Returns all non-system groups having <code>null</code> or empty friendly
1227            * URLs.
1228            *
1229            * @return the non-system groups having <code>null</code> or empty friendly
1230            URLs
1231            * @throws SystemException if a system exception occurred
1232            */
1233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1234            public java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
1235                    throws com.liferay.portal.kernel.exception.SystemException;
1236    
1237            /**
1238            * Returns the specified organization group.
1239            *
1240            * @param companyId the primary key of the company
1241            * @param organizationId the primary key of the organization
1242            * @return the group associated with the organization
1243            * @throws PortalException if a matching group could not be found
1244            * @throws SystemException if a system exception occurred
1245            */
1246            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1247            public com.liferay.portal.model.Group getOrganizationGroup(long companyId,
1248                    long organizationId)
1249                    throws com.liferay.portal.kernel.exception.PortalException,
1250                            com.liferay.portal.kernel.exception.SystemException;
1251    
1252            /**
1253            * Returns the specified organization groups.
1254            *
1255            * @param organizations the organizations
1256            * @return the groups associated with the organizations
1257            */
1258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1259            public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
1260                    java.util.List<com.liferay.portal.model.Organization> organizations);
1261    
1262            /**
1263            * Returns all the groups related to the organizations.
1264            *
1265            * @param organizations the organizations
1266            * @return the groups related to the organizations
1267            * @throws SystemException if a system exception occurred
1268            */
1269            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1270            public java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups(
1271                    java.util.List<com.liferay.portal.model.Organization> organizations)
1272                    throws com.liferay.portal.kernel.exception.SystemException;
1273    
1274            /**
1275            * Returns the group followed by all its parent groups ordered by closest
1276            * ancestor.
1277            *
1278            * @param groupId the primary key of the group
1279            * @return the group followed by all its parent groups ordered by closest
1280            ancestor
1281            * @throws PortalException if a group with the primary key could not be
1282            found
1283            * @throws SystemException if a system exception occurred
1284            */
1285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1286            public java.util.List<com.liferay.portal.model.Group> getParentGroups(
1287                    long groupId)
1288                    throws com.liferay.portal.kernel.exception.PortalException,
1289                            com.liferay.portal.kernel.exception.SystemException;
1290    
1291            /**
1292            * Returns the staging group.
1293            *
1294            * @param liveGroupId the primary key of the live group
1295            * @return the staging group
1296            * @throws PortalException if a matching staging group could not be found
1297            * @throws SystemException if a system exception occurred
1298            */
1299            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1300            public com.liferay.portal.model.Group getStagingGroup(long liveGroupId)
1301                    throws com.liferay.portal.kernel.exception.PortalException,
1302                            com.liferay.portal.kernel.exception.SystemException;
1303    
1304            /**
1305            * Returns the group associated with the user.
1306            *
1307            * @param companyId the primary key of the company
1308            * @param userId the primary key of the user
1309            * @return the group associated with the user
1310            * @throws PortalException if a matching group could not be found
1311            * @throws SystemException if a system exception occurred
1312            */
1313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1314            public com.liferay.portal.model.Group getUserGroup(long companyId,
1315                    long userId)
1316                    throws com.liferay.portal.kernel.exception.PortalException,
1317                            com.liferay.portal.kernel.exception.SystemException;
1318    
1319            /**
1320            * Returns the specified "user group" group. That is, the group that
1321            * represents the {@link com.liferay.portal.model.UserGroup} entity.
1322            *
1323            * @param companyId the primary key of the company
1324            * @param userGroupId the primary key of the user group
1325            * @return the group associated with the user group
1326            * @throws PortalException if a matching group could not be found
1327            * @throws SystemException if a system exception occurred
1328            */
1329            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1330            public com.liferay.portal.model.Group getUserGroupGroup(long companyId,
1331                    long userGroupId)
1332                    throws com.liferay.portal.kernel.exception.PortalException,
1333                            com.liferay.portal.kernel.exception.SystemException;
1334    
1335            /**
1336            * Returns all the user's site groups and immediate organization groups,
1337            * optionally including the user's inherited organization groups and user
1338            * groups. System and staged groups are not included.
1339            *
1340            * @param userId the primary key of the user
1341            * @param inherit whether to include the user's inherited organization
1342            groups and user groups
1343            * @return the user's groups and immediate organization groups
1344            * @throws PortalException if a user with the primary key could not be found
1345            * @throws SystemException if a system exception occurred
1346            */
1347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1348            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
1349                    long userId, boolean inherit)
1350                    throws com.liferay.portal.kernel.exception.PortalException,
1351                            com.liferay.portal.kernel.exception.SystemException;
1352    
1353            /**
1354            * Returns an ordered range of all the user's site groups and immediate
1355            * organization groups, optionally including the user's inherited
1356            * organization groups and user groups. System and staged groups are not
1357            * included.
1358            *
1359            * <p>
1360            * Useful when paginating results. Returns a maximum of <code>end -
1361            * start</code> instances. <code>start</code> and <code>end</code> are not
1362            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1363            * refers to the first result in the set. Setting both <code>start</code>
1364            * and <code>end</code> to {@link
1365            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1366            * result set.
1367            * </p>
1368            *
1369            * @param userId the primary key of the user
1370            * @param inherit whether to include the user's inherited organization
1371            groups and user groups
1372            * @param start the lower bound of the range of groups to return
1373            * @param end the upper bound of the range of groups to return (not
1374            inclusive)
1375            * @return the range of the user's groups and immediate organization groups
1376            ordered by name
1377            * @throws PortalException if a user with the primary key could not be found
1378            * @throws SystemException if a system exception occurred
1379            */
1380            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1381            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
1382                    long userId, boolean inherit, int start, int end)
1383                    throws com.liferay.portal.kernel.exception.PortalException,
1384                            com.liferay.portal.kernel.exception.SystemException;
1385    
1386            /**
1387            * Returns the groups associated with the user groups.
1388            *
1389            * @param userGroups the user groups
1390            * @return the groups associated with the user groups
1391            * @throws PortalException if any one of the user group's group could not be
1392            found
1393            * @throws SystemException if a system exception occurred
1394            */
1395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1396            public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
1397                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1398                    throws com.liferay.portal.kernel.exception.PortalException,
1399                            com.liferay.portal.kernel.exception.SystemException;
1400    
1401            /**
1402            * Returns all the groups related to the user groups.
1403            *
1404            * @param userGroups the user groups
1405            * @return the groups related to the user groups
1406            * @throws SystemException if a system exception occurred
1407            */
1408            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1409            public java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups(
1410                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
1411                    throws com.liferay.portal.kernel.exception.SystemException;
1412    
1413            /**
1414            * Returns the range of all groups associated with the user's organization
1415            * groups, including the ancestors of the organization groups, unless portal
1416            * property <code>organizations.membership.strict</code> is set to
1417            * <code>true</code>.
1418            *
1419            * <p>
1420            * Useful when paginating results. Returns a maximum of <code>end -
1421            * start</code> instances. <code>start</code> and <code>end</code> are not
1422            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1423            * refers to the first result in the set. Setting both <code>start</code>
1424            * and <code>end</code> to {@link
1425            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1426            * result set.
1427            * </p>
1428            *
1429            * @param userId the primary key of the user
1430            * @param start the lower bound of the range of groups to consider
1431            * @param end the upper bound of the range of groups to consider (not
1432            inclusive)
1433            * @return the range of groups associated with the user's organization
1434            groups
1435            * @throws PortalException if a user with the primary key could not be found
1436            or if another portal exception occurred
1437            * @throws SystemException if a system exception occurred
1438            */
1439            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1440            public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
1441                    long userId, int start, int end)
1442                    throws com.liferay.portal.kernel.exception.PortalException,
1443                            com.liferay.portal.kernel.exception.SystemException;
1444    
1445            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1446            public com.liferay.portal.model.Group getUserPersonalSiteGroup(
1447                    long companyId)
1448                    throws com.liferay.portal.kernel.exception.PortalException,
1449                            com.liferay.portal.kernel.exception.SystemException;
1450    
1451            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1452            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups(
1453                    long userId)
1454                    throws com.liferay.portal.kernel.exception.PortalException,
1455                            com.liferay.portal.kernel.exception.SystemException;
1456    
1457            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1458            public java.util.List<com.liferay.portal.model.Group> getUserSitesGroups(
1459                    long userId, boolean includeAdministrative)
1460                    throws com.liferay.portal.kernel.exception.PortalException,
1461                            com.liferay.portal.kernel.exception.SystemException;
1462    
1463            /**
1464            * Returns <code>true</code> if the live group has a staging group.
1465            *
1466            * @param liveGroupId the primary key of the live group
1467            * @return <code>true</code> if the live group has a staging group;
1468            <code>false</code> otherwise
1469            * @throws SystemException if a system exception occurred
1470            */
1471            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1472            public boolean hasStagingGroup(long liveGroupId)
1473                    throws com.liferay.portal.kernel.exception.SystemException;
1474    
1475            /**
1476            * Returns <code>true</code> if the user is immediately associated with the
1477            * group, or optionally if the user is associated with the group via the
1478            * user's organizations, inherited organizations, or user groups.
1479            *
1480            * @param userId the primary key of the user
1481            * @param groupId the primary key of the group
1482            * @param inherit whether to include organization groups and user groups to
1483            which the user belongs in the determination
1484            * @return <code>true</code> if the user is associated with the group;
1485            <code>false</code> otherwise
1486            * @throws SystemException if a system exception occurred
1487            */
1488            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1489            public boolean hasUserGroup(long userId, long groupId, boolean inherit)
1490                    throws com.liferay.portal.kernel.exception.SystemException;
1491    
1492            /**
1493            * Returns the group with the matching group name by first searching the
1494            * system groups and then using the finder cache.
1495            *
1496            * @param companyId the primary key of the company
1497            * @param name the group's name
1498            * @return the group with the name and associated company, or
1499            <code>null</code> if a matching group could not be found
1500            * @throws SystemException if a system exception occurred
1501            */
1502            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1503            public com.liferay.portal.model.Group loadFetchGroup(long companyId,
1504                    java.lang.String name)
1505                    throws com.liferay.portal.kernel.exception.SystemException;
1506    
1507            /**
1508            * Returns the group with the matching group name.
1509            *
1510            * @param companyId the primary key of the company
1511            * @param name the group's name
1512            * @return the group with the name and associated company
1513            * @throws PortalException if a matching group could not be found
1514            * @throws SystemException if a system exception occurred
1515            */
1516            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1517            public com.liferay.portal.model.Group loadGetGroup(long companyId,
1518                    java.lang.String name)
1519                    throws com.liferay.portal.kernel.exception.PortalException,
1520                            com.liferay.portal.kernel.exception.SystemException;
1521    
1522            /**
1523            * Rebuilds the group tree.
1524            *
1525            * <p>
1526            * Only call this method if the tree has become stale through operations
1527            * other than normal CRUD. Under normal circumstances the tree is
1528            * automatically rebuilt whenever necessary.
1529            * </p>
1530            *
1531            * @param companyId the primary key of the group's company
1532            * @throws PortalException if a group with the primary key could not be
1533            found
1534            * @throws SystemException if a system exception occurred
1535            */
1536            public void rebuildTree(long companyId)
1537                    throws com.liferay.portal.kernel.exception.PortalException,
1538                            com.liferay.portal.kernel.exception.SystemException;
1539    
1540            /**
1541            * Returns an ordered range of all the company's groups, optionally
1542            * including the user's inherited organization groups and user groups.
1543            * System and staged groups are not included.
1544            *
1545            * <p>
1546            * Useful when paginating results. Returns a maximum of <code>end -
1547            * start</code> instances. <code>start</code> and <code>end</code> are not
1548            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1549            * refers to the first result in the set. Setting both <code>start</code>
1550            * and <code>end</code> to {@link
1551            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1552            * result set.
1553            * </p>
1554            *
1555            * @param companyId the primary key of the company
1556            * @param params the finder params (optionally <code>null</code>). To
1557            include a user's organizations, inherited organizations, and user
1558            groups in the search, add an entry with key
1559            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1560            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1561            For more information see {@link
1562            com.liferay.portal.service.persistence.GroupFinder}
1563            * @param start the lower bound of the range of groups to return
1564            * @param end the upper bound of the range of groups to return (not
1565            inclusive)
1566            * @return the matching groups ordered by name
1567            * @throws SystemException if a system exception occurred
1568            */
1569            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1570            public java.util.List<com.liferay.portal.model.Group> search(
1571                    long companyId,
1572                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1573                    int start, int end)
1574                    throws com.liferay.portal.kernel.exception.SystemException;
1575    
1576            /**
1577            * Returns an ordered range of all the groups belonging to the parent group
1578            * that match the keywords, optionally including the user's inherited
1579            * organization groups and user groups. System and staged groups are not
1580            * included.
1581            *
1582            * <p>
1583            * Useful when paginating results. Returns a maximum of <code>end -
1584            * start</code> instances. <code>start</code> and <code>end</code> are not
1585            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1586            * refers to the first result in the set. Setting both <code>start</code>
1587            * and <code>end</code> to {@link
1588            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1589            * result set.
1590            * </p>
1591            *
1592            * @param companyId the primary key of the company
1593            * @param parentGroupId the primary key of the parent group
1594            * @param keywords the keywords (space separated), which may occur in the
1595            sites's name, or description (optionally <code>null</code>)
1596            * @param params the finder params (optionally <code>null</code>). To
1597            include the user's inherited organizations and user groups in the
1598            search, add entries having &quot;usersGroups&quot; and
1599            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1600            information see {@link
1601            com.liferay.portal.service.persistence.GroupFinder}
1602            * @param start the lower bound of the range of groups to return
1603            * @param end the upper bound of the range of groups to return (not
1604            inclusive)
1605            * @return the matching groups ordered by name
1606            * @throws SystemException if a system exception occurred
1607            */
1608            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1609            public java.util.List<com.liferay.portal.model.Group> search(
1610                    long companyId, long parentGroupId, java.lang.String keywords,
1611                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1612                    int start, int end)
1613                    throws com.liferay.portal.kernel.exception.SystemException;
1614    
1615            /**
1616            * Returns an ordered range of all the groups belonging to the parent group
1617            * that match the keywords, optionally including the user's inherited
1618            * organization groups and user groups. System and staged groups are not
1619            * included.
1620            *
1621            * <p>
1622            * Useful when paginating results. Returns a maximum of <code>end -
1623            * start</code> instances. <code>start</code> and <code>end</code> are not
1624            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1625            * refers to the first result in the set. Setting both <code>start</code>
1626            * and <code>end</code> to {@link
1627            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1628            * result set.
1629            * </p>
1630            *
1631            * @param companyId the primary key of the company
1632            * @param parentGroupId the primary key of the parent group
1633            * @param keywords the keywords (space separated), which may occur in the
1634            sites's name, or description (optionally <code>null</code>)
1635            * @param params the finder params (optionally <code>null</code>). To
1636            include the user's inherited organizations and user groups in the
1637            search, add entries having &quot;usersGroups&quot; and
1638            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1639            information see {@link
1640            com.liferay.portal.service.persistence.GroupFinder}
1641            * @param start the lower bound of the range of groups to return
1642            * @param end the upper bound of the range of groups to return (not
1643            inclusive)
1644            * @param obc the comparator to order the groups (optionally
1645            <code>null</code>)
1646            * @return the matching groups ordered by comparator <code>obc</code>
1647            * @throws SystemException if a system exception occurred
1648            */
1649            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1650            public java.util.List<com.liferay.portal.model.Group> search(
1651                    long companyId, long parentGroupId, java.lang.String keywords,
1652                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1653                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1654                    throws com.liferay.portal.kernel.exception.SystemException;
1655    
1656            /**
1657            * Returns an ordered range of all the site groups belonging to the parent
1658            * group and organization groups that match the name and description,
1659            * optionally including the user's inherited organization groups and user
1660            * groups. System and staged groups are not included.
1661            *
1662            * <p>
1663            * Useful when paginating results. Returns a maximum of <code>end -
1664            * start</code> instances. <code>start</code> and <code>end</code> are not
1665            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1666            * refers to the first result in the set. Setting both <code>start</code>
1667            * and <code>end</code> to {@link
1668            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1669            * result set.
1670            * </p>
1671            *
1672            * @param companyId the primary key of the company
1673            * @param parentGroupId the primary key of the parent group
1674            * @param name the group's name (optionally <code>null</code>)
1675            * @param description the group's description (optionally
1676            <code>null</code>)
1677            * @param params the finder params (optionally <code>null</code>). To
1678            include the user's inherited organizations and user groups in the
1679            search, add entries having &quot;usersGroups&quot; and
1680            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1681            information see {@link
1682            com.liferay.portal.service.persistence.GroupFinder}
1683            * @param andOperator whether every field must match its keywords, or just
1684            one field.
1685            * @param start the lower bound of the range of groups to return
1686            * @param end the upper bound of the range of groups to return (not
1687            inclusive)
1688            * @return the matching groups ordered by name
1689            * @throws SystemException if a system exception occurred
1690            */
1691            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1692            public java.util.List<com.liferay.portal.model.Group> search(
1693                    long companyId, long parentGroupId, java.lang.String name,
1694                    java.lang.String description,
1695                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1696                    boolean andOperator, int start, int end)
1697                    throws com.liferay.portal.kernel.exception.SystemException;
1698    
1699            /**
1700            * Returns an ordered range of all the site groups belonging to the parent
1701            * group and organization groups that match the name and description,
1702            * optionally including the user's inherited organization groups and user
1703            * groups. System and staged groups are not included.
1704            *
1705            * <p>
1706            * Useful when paginating results. Returns a maximum of <code>end -
1707            * start</code> instances. <code>start</code> and <code>end</code> are not
1708            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1709            * refers to the first result in the set. Setting both <code>start</code>
1710            * and <code>end</code> to {@link
1711            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1712            * result set.
1713            * </p>
1714            *
1715            * @param companyId the primary key of the company
1716            * @param parentGroupId the primary key of the parent group
1717            * @param name the group's name (optionally <code>null</code>)
1718            * @param description the group's description (optionally
1719            <code>null</code>)
1720            * @param params the finder params (optionally <code>null</code>). To
1721            include the user's inherited organizations and user groups in the
1722            search, add entries having &quot;usersGroups&quot; and
1723            &quot;inherit&quot; as keys mapped to the the user's ID. For more
1724            information see {@link
1725            com.liferay.portal.service.persistence.GroupFinder}
1726            * @param andOperator whether every field must match its keywords, or just
1727            one field.
1728            * @param start the lower bound of the range of groups to return
1729            * @param end the upper bound of the range of groups to return (not
1730            inclusive)
1731            * @param obc the comparator to order the groups (optionally
1732            <code>null</code>)
1733            * @return the matching groups ordered by comparator <code>obc</code>
1734            * @throws SystemException if a system exception occurred
1735            */
1736            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1737            public java.util.List<com.liferay.portal.model.Group> search(
1738                    long companyId, long parentGroupId, java.lang.String name,
1739                    java.lang.String description,
1740                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1741                    boolean andOperator, int start, int end,
1742                    com.liferay.portal.kernel.util.OrderByComparator obc)
1743                    throws com.liferay.portal.kernel.exception.SystemException;
1744    
1745            /**
1746            * Returns an ordered range of all the groups belonging to the parent group
1747            * that match the class name IDs and keywords, optionally including the
1748            * user's inherited organization groups and user groups. System and staged
1749            * groups are not included.
1750            *
1751            * <p>
1752            * Useful when paginating results. Returns a maximum of <code>end -
1753            * start</code> instances. <code>start</code> and <code>end</code> are not
1754            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1755            * refers to the first result in the set. Setting both <code>start</code>
1756            * and <code>end</code> to {@link
1757            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1758            * result set.
1759            * </p>
1760            *
1761            * @param companyId the primary key of the company
1762            * @param classNameIds the primary keys of the class names of the entities
1763            the groups are related to (optionally <code>null</code>)
1764            * @param parentGroupId the primary key of the parent group
1765            * @param keywords the keywords (space separated), which may occur in the
1766            sites's name, or description (optionally <code>null</code>)
1767            * @param params the finder params (optionally <code>null</code>). To
1768            include a user's organizations, inherited organizations, and user
1769            groups in the search, add an entry with key
1770            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1771            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1772            For more information see {@link
1773            com.liferay.portal.service.persistence.GroupFinder}
1774            * @param start the lower bound of the range of groups to return
1775            * @param end the upper bound of the range of groups to return (not
1776            inclusive)
1777            * @return the matching groups ordered by name
1778            * @throws SystemException if a system exception occurred
1779            */
1780            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1781            public java.util.List<com.liferay.portal.model.Group> search(
1782                    long companyId, long[] classNameIds, long parentGroupId,
1783                    java.lang.String keywords,
1784                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1785                    int start, int end)
1786                    throws com.liferay.portal.kernel.exception.SystemException;
1787    
1788            /**
1789            * Returns an ordered range of all the groups belonging to the parent group
1790            * that match the class name IDs and keywords, optionally including the
1791            * user's inherited organization groups and user groups. System and staged
1792            * groups are not included.
1793            *
1794            * <p>
1795            * Useful when paginating results. Returns a maximum of <code>end -
1796            * start</code> instances. <code>start</code> and <code>end</code> are not
1797            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1798            * refers to the first result in the set. Setting both <code>start</code>
1799            * and <code>end</code> to {@link
1800            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1801            * result set.
1802            * </p>
1803            *
1804            * @param companyId the primary key of the company
1805            * @param classNameIds the primary keys of the class names of the entities
1806            the groups are related to (optionally <code>null</code>)
1807            * @param parentGroupId the primary key of the parent group
1808            * @param keywords the keywords (space separated), which may occur in the
1809            sites's name, or description (optionally <code>null</code>)
1810            * @param params the finder params (optionally <code>null</code>). To
1811            include a user's organizations, inherited organizations, and user
1812            groups in the search, add an entry with key
1813            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1814            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1815            For more information see {@link
1816            com.liferay.portal.service.persistence.GroupFinder}
1817            * @param start the lower bound of the range of groups to return
1818            * @param end the upper bound of the range of groups to return (not
1819            inclusive)
1820            * @param obc the comparator to order the groups (optionally
1821            <code>null</code>)
1822            * @return the matching groups ordered by comparator <code>obc</code>
1823            * @throws SystemException if a system exception occurred
1824            */
1825            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1826            public java.util.List<com.liferay.portal.model.Group> search(
1827                    long companyId, long[] classNameIds, long parentGroupId,
1828                    java.lang.String keywords,
1829                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1830                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1831                    throws com.liferay.portal.kernel.exception.SystemException;
1832    
1833            /**
1834            * Returns an ordered range of all the groups belonging to the parent group
1835            * that match the class name IDs, name, and description, optionally
1836            * including the user's inherited organization groups and user groups.
1837            * System and staged groups are not included.
1838            *
1839            * <p>
1840            * Useful when paginating results. Returns a maximum of <code>end -
1841            * start</code> instances. <code>start</code> and <code>end</code> are not
1842            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1843            * refers to the first result in the set. Setting both <code>start</code>
1844            * and <code>end</code> to {@link
1845            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1846            * result set.
1847            * </p>
1848            *
1849            * @param companyId the primary key of the company
1850            * @param classNameIds the primary keys of the class names of the entities
1851            the groups are related to (optionally <code>null</code>)
1852            * @param parentGroupId the primary key of the parent group
1853            * @param name the group's name (optionally <code>null</code>)
1854            * @param description the group's description (optionally
1855            <code>null</code>)
1856            * @param params the finder params (optionally <code>null</code>). To
1857            include a user's organizations, inherited organizations, and user
1858            groups in the search, add an entry with key
1859            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1860            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1861            For more information see {@link
1862            com.liferay.portal.service.persistence.GroupFinder}
1863            * @param andOperator whether every field must match its keywords, or just
1864            one field.
1865            * @param start the lower bound of the range of groups to return
1866            * @param end the upper bound of the range of groups to return (not
1867            inclusive)
1868            * @return the matching groups ordered by name
1869            * @throws SystemException if a system exception occurred
1870            */
1871            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1872            public java.util.List<com.liferay.portal.model.Group> search(
1873                    long companyId, long[] classNameIds, long parentGroupId,
1874                    java.lang.String name, java.lang.String description,
1875                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1876                    boolean andOperator, int start, int end)
1877                    throws com.liferay.portal.kernel.exception.SystemException;
1878    
1879            /**
1880            * Returns an ordered range of all the groups belonging to the parent group
1881            * that match the class name IDs, name, and description, optionally
1882            * including the user's inherited organization groups and user groups.
1883            * System and staged groups are not included.
1884            *
1885            * <p>
1886            * Useful when paginating results. Returns a maximum of <code>end -
1887            * start</code> instances. <code>start</code> and <code>end</code> are not
1888            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1889            * refers to the first result in the set. Setting both <code>start</code>
1890            * and <code>end</code> to {@link
1891            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1892            * result set.
1893            * </p>
1894            *
1895            * @param companyId the primary key of the company
1896            * @param classNameIds the primary keys of the class names of the entities
1897            the groups are related to (optionally <code>null</code>)
1898            * @param parentGroupId the primary key of the parent group
1899            * @param name the group's name (optionally <code>null</code>)
1900            * @param description the group's description (optionally
1901            <code>null</code>)
1902            * @param params the finder params (optionally <code>null</code>). To
1903            include a user's organizations, inherited organizations, and user
1904            groups in the search, add an entry with key
1905            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1906            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1907            For more information see {@link
1908            com.liferay.portal.service.persistence.GroupFinder}
1909            * @param andOperator whether every field must match its keywords, or just
1910            one field.
1911            * @param start the lower bound of the range of groups to return
1912            * @param end the upper bound of the range of groups to return (not
1913            inclusive)
1914            * @param obc the comparator to order the groups (optionally
1915            <code>null</code>)
1916            * @return the matching groups ordered by comparator <code>obc</code>
1917            * @throws SystemException if a system exception occurred
1918            */
1919            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1920            public java.util.List<com.liferay.portal.model.Group> search(
1921                    long companyId, long[] classNameIds, long parentGroupId,
1922                    java.lang.String name, java.lang.String description,
1923                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1924                    boolean andOperator, int start, int end,
1925                    com.liferay.portal.kernel.util.OrderByComparator obc)
1926                    throws com.liferay.portal.kernel.exception.SystemException;
1927    
1928            /**
1929            * Returns an ordered range of all the groups that match the class name IDs
1930            * and keywords, optionally including the user's inherited organization
1931            * groups and user groups. System and staged groups are not included.
1932            *
1933            * <p>
1934            * Useful when paginating results. Returns a maximum of <code>end -
1935            * start</code> instances. <code>start</code> and <code>end</code> are not
1936            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1937            * refers to the first result in the set. Setting both <code>start</code>
1938            * and <code>end</code> to {@link
1939            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1940            * result set.
1941            * </p>
1942            *
1943            * @param companyId the primary key of the company
1944            * @param classNameIds the primary keys of the class names of the entities
1945            the groups are related to (optionally <code>null</code>)
1946            * @param keywords the keywords (space separated), which may occur in the
1947            sites's name, or description (optionally <code>null</code>)
1948            * @param params the finder params (optionally <code>null</code>). To
1949            include a user's organizations, inherited organizations, and user
1950            groups in the search, add an entry with key
1951            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1952            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1953            For more information see {@link
1954            com.liferay.portal.service.persistence.GroupFinder}
1955            * @param start the lower bound of the range of groups to return
1956            * @param end the upper bound of the range of groups to return (not
1957            inclusive)
1958            * @return the matching groups ordered by name
1959            * @throws SystemException if a system exception occurred
1960            */
1961            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1962            public java.util.List<com.liferay.portal.model.Group> search(
1963                    long companyId, long[] classNameIds, java.lang.String keywords,
1964                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1965                    int start, int end)
1966                    throws com.liferay.portal.kernel.exception.SystemException;
1967    
1968            /**
1969            * Returns an ordered range of all the groups that match the class name IDs
1970            * and keywords, optionally including the user's inherited organization
1971            * groups and user groups. System and staged groups are not included.
1972            *
1973            * <p>
1974            * Useful when paginating results. Returns a maximum of <code>end -
1975            * start</code> instances. <code>start</code> and <code>end</code> are not
1976            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1977            * refers to the first result in the set. Setting both <code>start</code>
1978            * and <code>end</code> to {@link
1979            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1980            * result set.
1981            * </p>
1982            *
1983            * @param companyId the primary key of the company
1984            * @param classNameIds the primary keys of the class names of the entities
1985            the groups are related to (optionally <code>null</code>)
1986            * @param keywords the keywords (space separated), which may occur in the
1987            sites's name, or description (optionally <code>null</code>)
1988            * @param params the finder params (optionally <code>null</code>). To
1989            include a user's organizations, inherited organizations, and user
1990            groups in the search, add an entry with key
1991            &quot;usersGroups&quot; mapped to the user's ID and an entry with
1992            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
1993            For more information see {@link
1994            com.liferay.portal.service.persistence.GroupFinder}
1995            * @param start the lower bound of the range of groups to return
1996            * @param end the upper bound of the range of groups to return (not
1997            inclusive)
1998            * @param obc the comparator to order the groups (optionally
1999            <code>null</code>)
2000            * @return the matching groups ordered by comparator <code>obc</code>
2001            * @throws SystemException if a system exception occurred
2002            */
2003            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2004            public java.util.List<com.liferay.portal.model.Group> search(
2005                    long companyId, long[] classNameIds, java.lang.String keywords,
2006                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2007                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
2008                    throws com.liferay.portal.kernel.exception.SystemException;
2009    
2010            /**
2011            * Returns an ordered range of all the groups that match the class name IDs,
2012            * name, and description, optionally including the user's inherited
2013            * organization groups and user groups. System and staged groups are not
2014            * included.
2015            *
2016            * <p>
2017            * Useful when paginating results. Returns a maximum of <code>end -
2018            * start</code> instances. <code>start</code> and <code>end</code> are not
2019            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2020            * refers to the first result in the set. Setting both <code>start</code>
2021            * and <code>end</code> to {@link
2022            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2023            * result set.
2024            * </p>
2025            *
2026            * @param companyId the primary key of the company
2027            * @param classNameIds the primary keys of the class names of the entities
2028            the groups are related to (optionally <code>null</code>)
2029            * @param name the group's name (optionally <code>null</code>)
2030            * @param description the group's description (optionally
2031            <code>null</code>)
2032            * @param params the finder params (optionally <code>null</code>). To
2033            include a user's organizations, inherited organizations, and user
2034            groups in the search, add an entry with key
2035            &quot;usersGroups&quot; mapped to the user's ID and an entry with
2036            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
2037            For more information see {@link
2038            com.liferay.portal.service.persistence.GroupFinder}
2039            * @param andOperator whether every field must match its keywords, or just
2040            one field.
2041            * @param start the lower bound of the range of groups to return
2042            * @param end the upper bound of the range of groups to return (not
2043            inclusive)
2044            * @return the matching groups ordered by name
2045            * @throws SystemException if a system exception occurred
2046            */
2047            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2048            public java.util.List<com.liferay.portal.model.Group> search(
2049                    long companyId, long[] classNameIds, java.lang.String name,
2050                    java.lang.String description,
2051                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2052                    boolean andOperator, int start, int end)
2053                    throws com.liferay.portal.kernel.exception.SystemException;
2054    
2055            /**
2056            * Returns an ordered range of all the groups that match the class name IDs,
2057            * name, and description, optionally including the user's inherited
2058            * organization groups and user groups. System and staged groups are not
2059            * included.
2060            *
2061            * <p>
2062            * Useful when paginating results. Returns a maximum of <code>end -
2063            * start</code> instances. <code>start</code> and <code>end</code> are not
2064            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2065            * refers to the first result in the set. Setting both <code>start</code>
2066            * and <code>end</code> to {@link
2067            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2068            * result set.
2069            * </p>
2070            *
2071            * @param companyId the primary key of the company
2072            * @param classNameIds the primary keys of the class names of the entities
2073            the groups are related to (optionally <code>null</code>)
2074            * @param name the group's name (optionally <code>null</code>)
2075            * @param description the group's description (optionally
2076            <code>null</code>)
2077            * @param params the finder params (optionally <code>null</code>). To
2078            include a user's organizations, inherited organizations, and user
2079            groups in the search, add an entry with key
2080            &quot;usersGroups&quot; mapped to the user's ID and an entry with
2081            key &quot;inherit&quot; mapped to a non-<code>null</code> object.
2082            For more information see {@link
2083            com.liferay.portal.service.persistence.GroupFinder}
2084            * @param andOperator whether every field must match its keywords, or just
2085            one field.
2086            * @param start the lower bound of the range of groups to return
2087            * @param end the upper bound of the range of groups to return (not
2088            inclusive)
2089            * @param obc the comparator to order the groups (optionally
2090            <code>null</code>)
2091            * @return the matching groups ordered by comparator <code>obc</code>
2092            * @throws SystemException if a system exception occurred
2093            */
2094            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2095            public java.util.List<com.liferay.portal.model.Group> search(
2096                    long companyId, long[] classNameIds, java.lang.String name,
2097                    java.lang.String description,
2098                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2099                    boolean andOperator, int start, int end,
2100                    com.liferay.portal.kernel.util.OrderByComparator obc)
2101                    throws com.liferay.portal.kernel.exception.SystemException;
2102    
2103            /**
2104            * Returns an ordered range of all the groups that match the keywords,
2105            * optionally including the user's inherited organization groups and user
2106            * groups. System and staged groups are not included.
2107            *
2108            * <p>
2109            * Useful when paginating results. Returns a maximum of <code>end -
2110            * start</code> instances. <code>start</code> and <code>end</code> are not
2111            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2112            * refers to the first result in the set. Setting both <code>start</code>
2113            * and <code>end</code> to {@link
2114            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2115            * result set.
2116            * </p>
2117            *
2118            * @param companyId the primary key of the company
2119            * @param keywords the keywords (space separated), which may occur in the
2120            sites's name, or description (optionally <code>null</code>)
2121            * @param params the finder params (optionally <code>null</code>). To
2122            include the user's inherited organizations and user groups in the
2123            search, add entries having &quot;usersGroups&quot; and
2124            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2125            information see {@link
2126            com.liferay.portal.service.persistence.GroupFinder}
2127            * @param start the lower bound of the range of groups to return
2128            * @param end the upper bound of the range of groups to return (not
2129            inclusive)
2130            * @return the matching groups ordered by name
2131            * @throws SystemException if a system exception occurred
2132            */
2133            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2134            public java.util.List<com.liferay.portal.model.Group> search(
2135                    long companyId, java.lang.String keywords,
2136                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2137                    int start, int end)
2138                    throws com.liferay.portal.kernel.exception.SystemException;
2139    
2140            /**
2141            * Returns an ordered range of all the groups that match the keywords,
2142            * optionally including the user's inherited organization groups and user
2143            * groups. System and staged groups are not included.
2144            *
2145            * <p>
2146            * Useful when paginating results. Returns a maximum of <code>end -
2147            * start</code> instances. <code>start</code> and <code>end</code> are not
2148            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2149            * refers to the first result in the set. Setting both <code>start</code>
2150            * and <code>end</code> to {@link
2151            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2152            * result set.
2153            * </p>
2154            *
2155            * @param companyId the primary key of the company
2156            * @param keywords the keywords (space separated), which may occur in the
2157            sites's name, or description (optionally <code>null</code>)
2158            * @param params the finder params (optionally <code>null</code>). To
2159            include the user's inherited organizations and user groups in the
2160            search, add entries having &quot;usersGroups&quot; and
2161            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2162            information see {@link
2163            com.liferay.portal.service.persistence.GroupFinder}
2164            * @param start the lower bound of the range of groups to return
2165            * @param end the upper bound of the range of groups to return (not
2166            inclusive)
2167            * @param obc the comparator to order the groups (optionally
2168            <code>null</code>)
2169            * @return the matching groups ordered by comparator <code>obc</code>
2170            * @throws SystemException if a system exception occurred
2171            */
2172            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2173            public java.util.List<com.liferay.portal.model.Group> search(
2174                    long companyId, java.lang.String keywords,
2175                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2176                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
2177                    throws com.liferay.portal.kernel.exception.SystemException;
2178    
2179            /**
2180            * Returns an ordered range of all the site groups and organization groups
2181            * that match the name and description, optionally including the user's
2182            * inherited organization groups and user groups. System and staged groups
2183            * are not included.
2184            *
2185            * <p>
2186            * Useful when paginating results. Returns a maximum of <code>end -
2187            * start</code> instances. <code>start</code> and <code>end</code> are not
2188            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2189            * refers to the first result in the set. Setting both <code>start</code>
2190            * and <code>end</code> to {@link
2191            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2192            * result set.
2193            * </p>
2194            *
2195            * @param companyId the primary key of the company
2196            * @param name the group's name (optionally <code>null</code>)
2197            * @param description the group's description (optionally
2198            <code>null</code>)
2199            * @param params the finder params (optionally <code>null</code>). To
2200            include the user's inherited organizations and user groups in the
2201            search, add entries having &quot;usersGroups&quot; and
2202            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2203            information see {@link
2204            com.liferay.portal.service.persistence.GroupFinder}
2205            * @param andOperator whether every field must match its keywords, or just
2206            one field.
2207            * @param start the lower bound of the range of groups to return
2208            * @param end the upper bound of the range of groups to return (not
2209            inclusive)
2210            * @return the matching groups ordered by name
2211            * @throws SystemException if a system exception occurred
2212            */
2213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2214            public java.util.List<com.liferay.portal.model.Group> search(
2215                    long companyId, java.lang.String name, java.lang.String description,
2216                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2217                    boolean andOperator, int start, int end)
2218                    throws com.liferay.portal.kernel.exception.SystemException;
2219    
2220            /**
2221            * Returns an ordered range of all the site groups and organization groups
2222            * that match the name and description, optionally including the user's
2223            * inherited organization groups and user groups. System and staged groups
2224            * are not included.
2225            *
2226            * <p>
2227            * Useful when paginating results. Returns a maximum of <code>end -
2228            * start</code> instances. <code>start</code> and <code>end</code> are not
2229            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2230            * refers to the first result in the set. Setting both <code>start</code>
2231            * and <code>end</code> to {@link
2232            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2233            * result set.
2234            * </p>
2235            *
2236            * @param companyId the primary key of the company
2237            * @param name the group's name (optionally <code>null</code>)
2238            * @param description the group's description (optionally
2239            <code>null</code>)
2240            * @param params the finder params (optionally <code>null</code>). To
2241            include the user's inherited organizations and user groups in the
2242            search, add entries having &quot;usersGroups&quot; and
2243            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2244            information see {@link
2245            com.liferay.portal.service.persistence.GroupFinder}
2246            * @param andOperator whether every field must match its keywords, or just
2247            one field.
2248            * @param start the lower bound of the range of groups to return
2249            * @param end the upper bound of the range of groups to return (not
2250            inclusive)
2251            * @param obc the comparator to order the groups (optionally
2252            <code>null</code>)
2253            * @return the matching groups ordered by comparator <code>obc</code>
2254            * @throws SystemException if a system exception occurred
2255            */
2256            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2257            public java.util.List<com.liferay.portal.model.Group> search(
2258                    long companyId, java.lang.String name, java.lang.String description,
2259                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2260                    boolean andOperator, int start, int end,
2261                    com.liferay.portal.kernel.util.OrderByComparator obc)
2262                    throws com.liferay.portal.kernel.exception.SystemException;
2263    
2264            /**
2265            * Returns the number of groups belonging to the parent group that match the
2266            * keywords, optionally including the user's inherited organization groups
2267            * and user groups. System and staged groups are not included.
2268            *
2269            * @param companyId the primary key of the company
2270            * @param parentGroupId the primary key of the parent group
2271            * @param keywords the keywords (space separated), which may occur in the
2272            sites's name, or description (optionally <code>null</code>)
2273            * @param params the finder params (optionally <code>null</code>). To
2274            include the user's inherited organization groups and user groups
2275            in the search, add entries having &quot;usersGroups&quot; and
2276            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2277            information see {@link
2278            com.liferay.portal.service.persistence.GroupFinder}
2279            * @return the number of matching groups
2280            * @throws SystemException if a system exception occurred
2281            */
2282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2283            public int searchCount(long companyId, long parentGroupId,
2284                    java.lang.String keywords,
2285                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2286                    throws com.liferay.portal.kernel.exception.SystemException;
2287    
2288            /**
2289            * Returns the number of groups belonging to the parent group and immediate
2290            * organization groups that match the name and description, optionally
2291            * including the user's inherited organization groups and user groups.
2292            * System and staged groups are not included.
2293            *
2294            * @param companyId the primary key of the company
2295            * @param parentGroupId the primary key of the parent group
2296            * @param name the group's name (optionally <code>null</code>)
2297            * @param description the group's description (optionally
2298            <code>null</code>)
2299            * @param params the finder params (optionally <code>null</code>). To
2300            include the user's inherited organization groups and user groups
2301            in the search, add entries having &quot;usersGroups&quot; and
2302            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2303            information see {@link
2304            com.liferay.portal.service.persistence.GroupFinder}
2305            * @param andOperator whether every field must match its keywords, or just
2306            one field.
2307            * @return the number of matching groups
2308            * @throws SystemException if a system exception occurred
2309            */
2310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2311            public int searchCount(long companyId, long parentGroupId,
2312                    java.lang.String name, java.lang.String description,
2313                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2314                    boolean andOperator)
2315                    throws com.liferay.portal.kernel.exception.SystemException;
2316    
2317            /**
2318            * Returns the number of groups belonging to the parent group that match the
2319            * class name IDs, and keywords, optionally including the user's inherited
2320            * organization groups and user groups. System and staged groups are not
2321            * included.
2322            *
2323            * @param companyId the primary key of the company
2324            * @param classNameIds the primary keys of the class names of the entities
2325            the groups are related to (optionally <code>null</code>)
2326            * @param parentGroupId the primary key of the parent group
2327            * @param keywords the keywords (space separated), which may occur in the
2328            sites's name, or description (optionally <code>null</code>)
2329            * @param params the finder params (optionally <code>null</code>). To
2330            include the user's inherited organization groups and user groups
2331            in the search, add entries having &quot;usersGroups&quot; and
2332            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2333            information see {@link
2334            com.liferay.portal.service.persistence.GroupFinder}
2335            * @return the number of matching groups
2336            * @throws SystemException if a system exception occurred
2337            */
2338            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2339            public int searchCount(long companyId, long[] classNameIds,
2340                    long parentGroupId, java.lang.String keywords,
2341                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2342                    throws com.liferay.portal.kernel.exception.SystemException;
2343    
2344            /**
2345            * Returns the number of groups belonging to the parent group that match the
2346            * class name IDs, name, and description, optionally including the user's
2347            * inherited organization groups and user groups. System and staged groups
2348            * are not included.
2349            *
2350            * @param companyId the primary key of the company
2351            * @param classNameIds the primary keys of the class names of the entities
2352            the groups are related to (optionally <code>null</code>)
2353            * @param parentGroupId the primary key of the parent group
2354            * @param name the group's name (optionally <code>null</code>)
2355            * @param description the group's description (optionally
2356            <code>null</code>)
2357            * @param params the finder params (optionally <code>null</code>). To
2358            include the user's inherited organization groups and user groups
2359            in the search, add entries having &quot;usersGroups&quot; and
2360            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2361            information see {@link
2362            com.liferay.portal.service.persistence.GroupFinder}
2363            * @param andOperator whether every field must match its keywords, or just
2364            one field.
2365            * @return the number of matching groups
2366            * @throws SystemException if a system exception occurred
2367            */
2368            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2369            public int searchCount(long companyId, long[] classNameIds,
2370                    long parentGroupId, java.lang.String name,
2371                    java.lang.String description,
2372                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2373                    boolean andOperator)
2374                    throws com.liferay.portal.kernel.exception.SystemException;
2375    
2376            /**
2377            * Returns the number of groups that match the class name IDs, and keywords,
2378            * optionally including the user's inherited organization groups and user
2379            * groups. System and staged groups are not included.
2380            *
2381            * @param companyId the primary key of the company
2382            * @param classNameIds the primary keys of the class names of the entities
2383            the groups are related to (optionally <code>null</code>)
2384            * @param keywords the keywords (space separated), which may occur in the
2385            sites's name, or description (optionally <code>null</code>)
2386            * @param params the finder params (optionally <code>null</code>). To
2387            include the user's inherited organization groups and user groups
2388            in the search, add entries having &quot;usersGroups&quot; and
2389            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2390            information see {@link
2391            com.liferay.portal.service.persistence.GroupFinder}
2392            * @return the number of matching groups
2393            * @throws SystemException if a system exception occurred
2394            */
2395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2396            public int searchCount(long companyId, long[] classNameIds,
2397                    java.lang.String keywords,
2398                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2399                    throws com.liferay.portal.kernel.exception.SystemException;
2400    
2401            /**
2402            * Returns the number of groups that match the class name IDs, name, and
2403            * description, optionally including the user's inherited organization
2404            * groups and user groups. System and staged groups are not included.
2405            *
2406            * @param companyId the primary key of the company
2407            * @param classNameIds the primary keys of the class names of the entities
2408            the groups are related to (optionally <code>null</code>)
2409            * @param name the group's name (optionally <code>null</code>)
2410            * @param description the group's description (optionally
2411            <code>null</code>)
2412            * @param params the finder params (optionally <code>null</code>). To
2413            include the user's inherited organization groups and user groups
2414            in the search, add entries having &quot;usersGroups&quot; and
2415            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2416            information see {@link
2417            com.liferay.portal.service.persistence.GroupFinder}
2418            * @param andOperator whether every field must match its keywords, or just
2419            one field.
2420            * @return the number of matching groups
2421            * @throws SystemException if a system exception occurred
2422            */
2423            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2424            public int searchCount(long companyId, long[] classNameIds,
2425                    java.lang.String name, java.lang.String description,
2426                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2427                    boolean andOperator)
2428                    throws com.liferay.portal.kernel.exception.SystemException;
2429    
2430            /**
2431            * Returns the number of groups that match the keywords, optionally
2432            * including the user's inherited organization groups and user groups.
2433            * System and staged groups are not included.
2434            *
2435            * @param companyId the primary key of the company
2436            * @param keywords the keywords (space separated), which may occur in the
2437            sites's name, or description (optionally <code>null</code>)
2438            * @param params the finder params (optionally <code>null</code>). To
2439            include the user's inherited organization groups and user groups
2440            in the search, add entries having &quot;usersGroups&quot; and
2441            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2442            information see {@link
2443            com.liferay.portal.service.persistence.GroupFinder}
2444            * @return the number of matching groups
2445            * @throws SystemException if a system exception occurred
2446            */
2447            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2448            public int searchCount(long companyId, java.lang.String keywords,
2449                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2450                    throws com.liferay.portal.kernel.exception.SystemException;
2451    
2452            /**
2453            * Returns the number of groups and immediate organization groups that match
2454            * the name and description, optionally including the user's inherited
2455            * organization groups and user groups. System and staged groups are not
2456            * included.
2457            *
2458            * @param companyId the primary key of the company
2459            * @param name the group's name (optionally <code>null</code>)
2460            * @param description the group's description (optionally
2461            <code>null</code>)
2462            * @param params the finder params (optionally <code>null</code>). To
2463            include the user's inherited organization groups and user groups
2464            in the search, add entries having &quot;usersGroups&quot; and
2465            &quot;inherit&quot; as keys mapped to the the user's ID. For more
2466            information see {@link
2467            com.liferay.portal.service.persistence.GroupFinder}
2468            * @param andOperator whether every field must match its keywords, or just
2469            one field.
2470            * @return the number of matching groups
2471            * @throws SystemException if a system exception occurred
2472            */
2473            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2474            public int searchCount(long companyId, java.lang.String name,
2475                    java.lang.String description,
2476                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2477                    boolean andOperator)
2478                    throws com.liferay.portal.kernel.exception.SystemException;
2479    
2480            /**
2481            * Removes the groups from the role.
2482            *
2483            * @param roleId the primary key of the role
2484            * @param groupIds the primary keys of the groups
2485            * @throws SystemException if a system exception occurred
2486            */
2487            public void unsetRoleGroups(long roleId, long[] groupIds)
2488                    throws com.liferay.portal.kernel.exception.SystemException;
2489    
2490            /**
2491            * Removes the user from the groups.
2492            *
2493            * @param userId the primary key of the user
2494            * @param groupIds the primary keys of the groups
2495            * @throws SystemException if a system exception occurred
2496            */
2497            public void unsetUserGroups(long userId, long[] groupIds)
2498                    throws com.liferay.portal.kernel.exception.SystemException;
2499    
2500            /**
2501            * Updates the group's asset replacing categories and tag names.
2502            *
2503            * @param userId the primary key of the user
2504            * @param group the group
2505            * @param assetCategoryIds the primary keys of the asset categories
2506            (optionally <code>null</code>)
2507            * @param assetTagNames the asset tag names (optionally <code>null</code>)
2508            * @throws PortalException if a user with the primary key could not be found
2509            * @throws SystemException if a system exception occurred
2510            */
2511            public void updateAsset(long userId, com.liferay.portal.model.Group group,
2512                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
2513                    throws com.liferay.portal.kernel.exception.PortalException,
2514                            com.liferay.portal.kernel.exception.SystemException;
2515    
2516            /**
2517            * Updates the group's friendly URL.
2518            *
2519            * @param groupId the primary key of the group
2520            * @param friendlyURL the group's new friendlyURL (optionally
2521            <code>null</code>)
2522            * @return the group
2523            * @throws PortalException if a group with the primary key could not be
2524            found or if a valid friendly URL could not be created for the
2525            group
2526            * @throws SystemException if a system exception occurred
2527            */
2528            public com.liferay.portal.model.Group updateFriendlyURL(long groupId,
2529                    java.lang.String friendlyURL)
2530                    throws com.liferay.portal.kernel.exception.PortalException,
2531                            com.liferay.portal.kernel.exception.SystemException;
2532    
2533            /**
2534            * Updates the group.
2535            *
2536            * @param groupId the primary key of the group
2537            * @param parentGroupId the primary key of the parent group
2538            * @param name the group's new name
2539            * @param description the group's new description (optionally
2540            <code>null</code>)
2541            * @param type the group's new type. For more information see {@link
2542            com.liferay.portal.model.GroupConstants}
2543            * @param friendlyURL the group's new friendlyURL (optionally
2544            <code>null</code>)
2545            * @param active whether the group is active
2546            * @param serviceContext the service context to be applied (optionally
2547            <code>null</code>). Can set asset category IDs and asset tag
2548            names for the group.
2549            * @return the group
2550            * @throws PortalException if a group with the primary key could not be
2551            found or if the friendly URL was invalid or could one not be
2552            created
2553            * @throws SystemException if a system exception occurred
2554            */
2555            public com.liferay.portal.model.Group updateGroup(long groupId,
2556                    long parentGroupId, java.lang.String name,
2557                    java.lang.String description, int type, boolean manualMembership,
2558                    int membershipRestriction, java.lang.String friendlyURL,
2559                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
2560                    throws com.liferay.portal.kernel.exception.PortalException,
2561                            com.liferay.portal.kernel.exception.SystemException;
2562    
2563            /**
2564            * Updates the group's type settings.
2565            *
2566            * @param groupId the primary key of the group
2567            * @param typeSettings the group's new type settings (optionally
2568            <code>null</code>)
2569            * @return the group
2570            * @throws PortalException if a group with the primary key could not be
2571            found
2572            * @throws SystemException if a system exception occurred
2573            */
2574            public com.liferay.portal.model.Group updateGroup(long groupId,
2575                    java.lang.String typeSettings)
2576                    throws com.liferay.portal.kernel.exception.PortalException,
2577                            com.liferay.portal.kernel.exception.SystemException;
2578    
2579            /**
2580            * Associates the group with a main site if the group is an organization.
2581            *
2582            * @param groupId the primary key of the group
2583            * @param site whether the group is to be associated with a main site
2584            * @return the group
2585            * @throws PortalException if a group with the primary key could not be
2586            found
2587            * @throws SystemException if a system exception occurred
2588            */
2589            public com.liferay.portal.model.Group updateSite(long groupId, boolean site)
2590                    throws com.liferay.portal.kernel.exception.PortalException,
2591                            com.liferay.portal.kernel.exception.SystemException;
2592    }