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