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