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