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