1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  /**
26   * <a href="GroupPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface GroupPersistence extends BasePersistence {
32      public void cacheResult(com.liferay.portal.model.Group group);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portal.model.Group> groups);
36  
37      public void clearCache();
38  
39      public com.liferay.portal.model.Group create(long groupId);
40  
41      public com.liferay.portal.model.Group remove(long groupId)
42          throws com.liferay.portal.NoSuchGroupException,
43              com.liferay.portal.SystemException;
44  
45      public com.liferay.portal.model.Group remove(
46          com.liferay.portal.model.Group group)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(Group group, boolean merge)</code>.
51       */
52      public com.liferay.portal.model.Group update(
53          com.liferay.portal.model.Group group)
54          throws com.liferay.portal.SystemException;
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        group the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when group is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public com.liferay.portal.model.Group update(
70          com.liferay.portal.model.Group group, boolean merge)
71          throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portal.model.Group updateImpl(
74          com.liferay.portal.model.Group group, boolean merge)
75          throws com.liferay.portal.SystemException;
76  
77      public com.liferay.portal.model.Group findByPrimaryKey(long groupId)
78          throws com.liferay.portal.NoSuchGroupException,
79              com.liferay.portal.SystemException;
80  
81      public com.liferay.portal.model.Group fetchByPrimaryKey(long groupId)
82          throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portal.model.Group findByLiveGroupId(long liveGroupId)
85          throws com.liferay.portal.NoSuchGroupException,
86              com.liferay.portal.SystemException;
87  
88      public com.liferay.portal.model.Group fetchByLiveGroupId(long liveGroupId)
89          throws com.liferay.portal.SystemException;
90  
91      public com.liferay.portal.model.Group fetchByLiveGroupId(long liveGroupId,
92          boolean retrieveFromCache) throws com.liferay.portal.SystemException;
93  
94      public com.liferay.portal.model.Group findByC_N(long companyId,
95          java.lang.String name)
96          throws com.liferay.portal.NoSuchGroupException,
97              com.liferay.portal.SystemException;
98  
99      public com.liferay.portal.model.Group fetchByC_N(long companyId,
100         java.lang.String name) throws com.liferay.portal.SystemException;
101 
102     public com.liferay.portal.model.Group fetchByC_N(long companyId,
103         java.lang.String name, boolean retrieveFromCache)
104         throws com.liferay.portal.SystemException;
105 
106     public com.liferay.portal.model.Group findByC_F(long companyId,
107         java.lang.String friendlyURL)
108         throws com.liferay.portal.NoSuchGroupException,
109             com.liferay.portal.SystemException;
110 
111     public com.liferay.portal.model.Group fetchByC_F(long companyId,
112         java.lang.String friendlyURL) throws com.liferay.portal.SystemException;
113 
114     public com.liferay.portal.model.Group fetchByC_F(long companyId,
115         java.lang.String friendlyURL, boolean retrieveFromCache)
116         throws com.liferay.portal.SystemException;
117 
118     public java.util.List<com.liferay.portal.model.Group> findByT_A(int type,
119         boolean active) throws com.liferay.portal.SystemException;
120 
121     public java.util.List<com.liferay.portal.model.Group> findByT_A(int type,
122         boolean active, int start, int end)
123         throws com.liferay.portal.SystemException;
124 
125     public java.util.List<com.liferay.portal.model.Group> findByT_A(int type,
126         boolean active, int start, int end,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException;
129 
130     public com.liferay.portal.model.Group findByT_A_First(int type,
131         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.NoSuchGroupException,
133             com.liferay.portal.SystemException;
134 
135     public com.liferay.portal.model.Group findByT_A_Last(int type,
136         boolean active, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.NoSuchGroupException,
138             com.liferay.portal.SystemException;
139 
140     public com.liferay.portal.model.Group[] findByT_A_PrevAndNext(
141         long groupId, int type, boolean active,
142         com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.NoSuchGroupException,
144             com.liferay.portal.SystemException;
145 
146     public com.liferay.portal.model.Group findByC_C_C(long companyId,
147         long classNameId, long classPK)
148         throws com.liferay.portal.NoSuchGroupException,
149             com.liferay.portal.SystemException;
150 
151     public com.liferay.portal.model.Group fetchByC_C_C(long companyId,
152         long classNameId, long classPK)
153         throws com.liferay.portal.SystemException;
154 
155     public com.liferay.portal.model.Group fetchByC_C_C(long companyId,
156         long classNameId, long classPK, boolean retrieveFromCache)
157         throws com.liferay.portal.SystemException;
158 
159     public com.liferay.portal.model.Group findByC_L_N(long companyId,
160         long liveGroupId, java.lang.String name)
161         throws com.liferay.portal.NoSuchGroupException,
162             com.liferay.portal.SystemException;
163 
164     public com.liferay.portal.model.Group fetchByC_L_N(long companyId,
165         long liveGroupId, java.lang.String name)
166         throws com.liferay.portal.SystemException;
167 
168     public com.liferay.portal.model.Group fetchByC_L_N(long companyId,
169         long liveGroupId, java.lang.String name, boolean retrieveFromCache)
170         throws com.liferay.portal.SystemException;
171 
172     public com.liferay.portal.model.Group findByC_C_L_N(long companyId,
173         long classNameId, long liveGroupId, java.lang.String name)
174         throws com.liferay.portal.NoSuchGroupException,
175             com.liferay.portal.SystemException;
176 
177     public com.liferay.portal.model.Group fetchByC_C_L_N(long companyId,
178         long classNameId, long liveGroupId, java.lang.String name)
179         throws com.liferay.portal.SystemException;
180 
181     public com.liferay.portal.model.Group fetchByC_C_L_N(long companyId,
182         long classNameId, long liveGroupId, java.lang.String name,
183         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
184 
185     public java.util.List<Object> findWithDynamicQuery(
186         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
187         throws com.liferay.portal.SystemException;
188 
189     public java.util.List<Object> findWithDynamicQuery(
190         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
191         int end) throws com.liferay.portal.SystemException;
192 
193     public java.util.List<com.liferay.portal.model.Group> findAll()
194         throws com.liferay.portal.SystemException;
195 
196     public java.util.List<com.liferay.portal.model.Group> findAll(int start,
197         int end) throws com.liferay.portal.SystemException;
198 
199     public java.util.List<com.liferay.portal.model.Group> findAll(int start,
200         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException;
202 
203     public void removeByLiveGroupId(long liveGroupId)
204         throws com.liferay.portal.NoSuchGroupException,
205             com.liferay.portal.SystemException;
206 
207     public void removeByC_N(long companyId, java.lang.String name)
208         throws com.liferay.portal.NoSuchGroupException,
209             com.liferay.portal.SystemException;
210 
211     public void removeByC_F(long companyId, java.lang.String friendlyURL)
212         throws com.liferay.portal.NoSuchGroupException,
213             com.liferay.portal.SystemException;
214 
215     public void removeByT_A(int type, boolean active)
216         throws com.liferay.portal.SystemException;
217 
218     public void removeByC_C_C(long companyId, long classNameId, long classPK)
219         throws com.liferay.portal.NoSuchGroupException,
220             com.liferay.portal.SystemException;
221 
222     public void removeByC_L_N(long companyId, long liveGroupId,
223         java.lang.String name)
224         throws com.liferay.portal.NoSuchGroupException,
225             com.liferay.portal.SystemException;
226 
227     public void removeByC_C_L_N(long companyId, long classNameId,
228         long liveGroupId, java.lang.String name)
229         throws com.liferay.portal.NoSuchGroupException,
230             com.liferay.portal.SystemException;
231 
232     public void removeAll() throws com.liferay.portal.SystemException;
233 
234     public int countByLiveGroupId(long liveGroupId)
235         throws com.liferay.portal.SystemException;
236 
237     public int countByC_N(long companyId, java.lang.String name)
238         throws com.liferay.portal.SystemException;
239 
240     public int countByC_F(long companyId, java.lang.String friendlyURL)
241         throws com.liferay.portal.SystemException;
242 
243     public int countByT_A(int type, boolean active)
244         throws com.liferay.portal.SystemException;
245 
246     public int countByC_C_C(long companyId, long classNameId, long classPK)
247         throws com.liferay.portal.SystemException;
248 
249     public int countByC_L_N(long companyId, long liveGroupId,
250         java.lang.String name) throws com.liferay.portal.SystemException;
251 
252     public int countByC_C_L_N(long companyId, long classNameId,
253         long liveGroupId, java.lang.String name)
254         throws com.liferay.portal.SystemException;
255 
256     public int countAll() throws com.liferay.portal.SystemException;
257 
258     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
259         long pk) throws com.liferay.portal.SystemException;
260 
261     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
262         long pk, int start, int end) throws com.liferay.portal.SystemException;
263 
264     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
265         long pk, int start, int end,
266         com.liferay.portal.kernel.util.OrderByComparator obc)
267         throws com.liferay.portal.SystemException;
268 
269     public int getOrganizationsSize(long pk)
270         throws com.liferay.portal.SystemException;
271 
272     public boolean containsOrganization(long pk, long organizationPK)
273         throws com.liferay.portal.SystemException;
274 
275     public boolean containsOrganizations(long pk)
276         throws com.liferay.portal.SystemException;
277 
278     public void addOrganization(long pk, long organizationPK)
279         throws com.liferay.portal.SystemException;
280 
281     public void addOrganization(long pk,
282         com.liferay.portal.model.Organization organization)
283         throws com.liferay.portal.SystemException;
284 
285     public void addOrganizations(long pk, long[] organizationPKs)
286         throws com.liferay.portal.SystemException;
287 
288     public void addOrganizations(long pk,
289         java.util.List<com.liferay.portal.model.Organization> organizations)
290         throws com.liferay.portal.SystemException;
291 
292     public void clearOrganizations(long pk)
293         throws com.liferay.portal.SystemException;
294 
295     public void removeOrganization(long pk, long organizationPK)
296         throws com.liferay.portal.SystemException;
297 
298     public void removeOrganization(long pk,
299         com.liferay.portal.model.Organization organization)
300         throws com.liferay.portal.SystemException;
301 
302     public void removeOrganizations(long pk, long[] organizationPKs)
303         throws com.liferay.portal.SystemException;
304 
305     public void removeOrganizations(long pk,
306         java.util.List<com.liferay.portal.model.Organization> organizations)
307         throws com.liferay.portal.SystemException;
308 
309     public void setOrganizations(long pk, long[] organizationPKs)
310         throws com.liferay.portal.SystemException;
311 
312     public void setOrganizations(long pk,
313         java.util.List<com.liferay.portal.model.Organization> organizations)
314         throws com.liferay.portal.SystemException;
315 
316     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
317         long pk) throws com.liferay.portal.SystemException;
318 
319     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
320         long pk, int start, int end) throws com.liferay.portal.SystemException;
321 
322     public java.util.List<com.liferay.portal.model.Permission> getPermissions(
323         long pk, int start, int end,
324         com.liferay.portal.kernel.util.OrderByComparator obc)
325         throws com.liferay.portal.SystemException;
326 
327     public int getPermissionsSize(long pk)
328         throws com.liferay.portal.SystemException;
329 
330     public boolean containsPermission(long pk, long permissionPK)
331         throws com.liferay.portal.SystemException;
332 
333     public boolean containsPermissions(long pk)
334         throws com.liferay.portal.SystemException;
335 
336     public void addPermission(long pk, long permissionPK)
337         throws com.liferay.portal.SystemException;
338 
339     public void addPermission(long pk,
340         com.liferay.portal.model.Permission permission)
341         throws com.liferay.portal.SystemException;
342 
343     public void addPermissions(long pk, long[] permissionPKs)
344         throws com.liferay.portal.SystemException;
345 
346     public void addPermissions(long pk,
347         java.util.List<com.liferay.portal.model.Permission> permissions)
348         throws com.liferay.portal.SystemException;
349 
350     public void clearPermissions(long pk)
351         throws com.liferay.portal.SystemException;
352 
353     public void removePermission(long pk, long permissionPK)
354         throws com.liferay.portal.SystemException;
355 
356     public void removePermission(long pk,
357         com.liferay.portal.model.Permission permission)
358         throws com.liferay.portal.SystemException;
359 
360     public void removePermissions(long pk, long[] permissionPKs)
361         throws com.liferay.portal.SystemException;
362 
363     public void removePermissions(long pk,
364         java.util.List<com.liferay.portal.model.Permission> permissions)
365         throws com.liferay.portal.SystemException;
366 
367     public void setPermissions(long pk, long[] permissionPKs)
368         throws com.liferay.portal.SystemException;
369 
370     public void setPermissions(long pk,
371         java.util.List<com.liferay.portal.model.Permission> permissions)
372         throws com.liferay.portal.SystemException;
373 
374     public java.util.List<com.liferay.portal.model.Role> getRoles(long pk)
375         throws com.liferay.portal.SystemException;
376 
377     public java.util.List<com.liferay.portal.model.Role> getRoles(long pk,
378         int start, int end) throws com.liferay.portal.SystemException;
379 
380     public java.util.List<com.liferay.portal.model.Role> getRoles(long pk,
381         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
382         throws com.liferay.portal.SystemException;
383 
384     public int getRolesSize(long pk) throws com.liferay.portal.SystemException;
385 
386     public boolean containsRole(long pk, long rolePK)
387         throws com.liferay.portal.SystemException;
388 
389     public boolean containsRoles(long pk)
390         throws com.liferay.portal.SystemException;
391 
392     public void addRole(long pk, long rolePK)
393         throws com.liferay.portal.SystemException;
394 
395     public void addRole(long pk, com.liferay.portal.model.Role role)
396         throws com.liferay.portal.SystemException;
397 
398     public void addRoles(long pk, long[] rolePKs)
399         throws com.liferay.portal.SystemException;
400 
401     public void addRoles(long pk,
402         java.util.List<com.liferay.portal.model.Role> roles)
403         throws com.liferay.portal.SystemException;
404 
405     public void clearRoles(long pk) throws com.liferay.portal.SystemException;
406 
407     public void removeRole(long pk, long rolePK)
408         throws com.liferay.portal.SystemException;
409 
410     public void removeRole(long pk, com.liferay.portal.model.Role role)
411         throws com.liferay.portal.SystemException;
412 
413     public void removeRoles(long pk, long[] rolePKs)
414         throws com.liferay.portal.SystemException;
415 
416     public void removeRoles(long pk,
417         java.util.List<com.liferay.portal.model.Role> roles)
418         throws com.liferay.portal.SystemException;
419 
420     public void setRoles(long pk, long[] rolePKs)
421         throws com.liferay.portal.SystemException;
422 
423     public void setRoles(long pk,
424         java.util.List<com.liferay.portal.model.Role> roles)
425         throws com.liferay.portal.SystemException;
426 
427     public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
428         long pk) throws com.liferay.portal.SystemException;
429 
430     public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
431         long pk, int start, int end) throws com.liferay.portal.SystemException;
432 
433     public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
434         long pk, int start, int end,
435         com.liferay.portal.kernel.util.OrderByComparator obc)
436         throws com.liferay.portal.SystemException;
437 
438     public int getUserGroupsSize(long pk)
439         throws com.liferay.portal.SystemException;
440 
441     public boolean containsUserGroup(long pk, long userGroupPK)
442         throws com.liferay.portal.SystemException;
443 
444     public boolean containsUserGroups(long pk)
445         throws com.liferay.portal.SystemException;
446 
447     public void addUserGroup(long pk, long userGroupPK)
448         throws com.liferay.portal.SystemException;
449 
450     public void addUserGroup(long pk,
451         com.liferay.portal.model.UserGroup userGroup)
452         throws com.liferay.portal.SystemException;
453 
454     public void addUserGroups(long pk, long[] userGroupPKs)
455         throws com.liferay.portal.SystemException;
456 
457     public void addUserGroups(long pk,
458         java.util.List<com.liferay.portal.model.UserGroup> userGroups)
459         throws com.liferay.portal.SystemException;
460 
461     public void clearUserGroups(long pk)
462         throws com.liferay.portal.SystemException;
463 
464     public void removeUserGroup(long pk, long userGroupPK)
465         throws com.liferay.portal.SystemException;
466 
467     public void removeUserGroup(long pk,
468         com.liferay.portal.model.UserGroup userGroup)
469         throws com.liferay.portal.SystemException;
470 
471     public void removeUserGroups(long pk, long[] userGroupPKs)
472         throws com.liferay.portal.SystemException;
473 
474     public void removeUserGroups(long pk,
475         java.util.List<com.liferay.portal.model.UserGroup> userGroups)
476         throws com.liferay.portal.SystemException;
477 
478     public void setUserGroups(long pk, long[] userGroupPKs)
479         throws com.liferay.portal.SystemException;
480 
481     public void setUserGroups(long pk,
482         java.util.List<com.liferay.portal.model.UserGroup> userGroups)
483         throws com.liferay.portal.SystemException;
484 
485     public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
486         throws com.liferay.portal.SystemException;
487 
488     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
489         int start, int end) throws com.liferay.portal.SystemException;
490 
491     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
492         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
493         throws com.liferay.portal.SystemException;
494 
495     public int getUsersSize(long pk) throws com.liferay.portal.SystemException;
496 
497     public boolean containsUser(long pk, long userPK)
498         throws com.liferay.portal.SystemException;
499 
500     public boolean containsUsers(long pk)
501         throws com.liferay.portal.SystemException;
502 
503     public void addUser(long pk, long userPK)
504         throws com.liferay.portal.SystemException;
505 
506     public void addUser(long pk, com.liferay.portal.model.User user)
507         throws com.liferay.portal.SystemException;
508 
509     public void addUsers(long pk, long[] userPKs)
510         throws com.liferay.portal.SystemException;
511 
512     public void addUsers(long pk,
513         java.util.List<com.liferay.portal.model.User> users)
514         throws com.liferay.portal.SystemException;
515 
516     public void clearUsers(long pk) throws com.liferay.portal.SystemException;
517 
518     public void removeUser(long pk, long userPK)
519         throws com.liferay.portal.SystemException;
520 
521     public void removeUser(long pk, com.liferay.portal.model.User user)
522         throws com.liferay.portal.SystemException;
523 
524     public void removeUsers(long pk, long[] userPKs)
525         throws com.liferay.portal.SystemException;
526 
527     public void removeUsers(long pk,
528         java.util.List<com.liferay.portal.model.User> users)
529         throws com.liferay.portal.SystemException;
530 
531     public void setUsers(long pk, long[] userPKs)
532         throws com.liferay.portal.SystemException;
533 
534     public void setUsers(long pk,
535         java.util.List<com.liferay.portal.model.User> users)
536         throws com.liferay.portal.SystemException;
537 }