1   /**
2    * Copyright (c) 2000-2007 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 {
32      public com.liferay.portal.model.Group create(long groupId);
33  
34      public com.liferay.portal.model.Group remove(long groupId)
35          throws com.liferay.portal.SystemException, 
36              com.liferay.portal.NoSuchGroupException;
37  
38      public com.liferay.portal.model.Group remove(
39          com.liferay.portal.model.Group group)
40          throws com.liferay.portal.SystemException;
41  
42      public com.liferay.portal.model.Group update(
43          com.liferay.portal.model.Group group)
44          throws com.liferay.portal.SystemException;
45  
46      public com.liferay.portal.model.Group update(
47          com.liferay.portal.model.Group group, boolean merge)
48          throws com.liferay.portal.SystemException;
49  
50      public com.liferay.portal.model.Group findByPrimaryKey(long groupId)
51          throws com.liferay.portal.SystemException, 
52              com.liferay.portal.NoSuchGroupException;
53  
54      public com.liferay.portal.model.Group fetchByPrimaryKey(long groupId)
55          throws com.liferay.portal.SystemException;
56  
57      public com.liferay.portal.model.Group findByLiveGroupId(long liveGroupId)
58          throws com.liferay.portal.SystemException, 
59              com.liferay.portal.NoSuchGroupException;
60  
61      public com.liferay.portal.model.Group fetchByLiveGroupId(long liveGroupId)
62          throws com.liferay.portal.SystemException;
63  
64      public com.liferay.portal.model.Group findByC_N(long companyId,
65          java.lang.String name)
66          throws com.liferay.portal.SystemException, 
67              com.liferay.portal.NoSuchGroupException;
68  
69      public com.liferay.portal.model.Group fetchByC_N(long companyId,
70          java.lang.String name) throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portal.model.Group findByC_F(long companyId,
73          java.lang.String friendlyURL)
74          throws com.liferay.portal.SystemException, 
75              com.liferay.portal.NoSuchGroupException;
76  
77      public com.liferay.portal.model.Group fetchByC_F(long companyId,
78          java.lang.String friendlyURL) throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portal.model.Group findByC_C_C(long companyId,
81          long classNameId, long classPK)
82          throws com.liferay.portal.SystemException, 
83              com.liferay.portal.NoSuchGroupException;
84  
85      public com.liferay.portal.model.Group fetchByC_C_C(long companyId,
86          long classNameId, long classPK)
87          throws com.liferay.portal.SystemException;
88  
89      public java.util.List findWithDynamicQuery(
90          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
91          throws com.liferay.portal.SystemException;
92  
93      public java.util.List findWithDynamicQuery(
94          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
95          int begin, int end) throws com.liferay.portal.SystemException;
96  
97      public java.util.List findAll() throws com.liferay.portal.SystemException;
98  
99      public java.util.List findAll(int begin, int end)
100         throws com.liferay.portal.SystemException;
101 
102     public java.util.List findAll(int begin, int end,
103         com.liferay.portal.kernel.util.OrderByComparator obc)
104         throws com.liferay.portal.SystemException;
105 
106     public void removeByLiveGroupId(long liveGroupId)
107         throws com.liferay.portal.SystemException, 
108             com.liferay.portal.NoSuchGroupException;
109 
110     public void removeByC_N(long companyId, java.lang.String name)
111         throws com.liferay.portal.SystemException, 
112             com.liferay.portal.NoSuchGroupException;
113 
114     public void removeByC_F(long companyId, java.lang.String friendlyURL)
115         throws com.liferay.portal.SystemException, 
116             com.liferay.portal.NoSuchGroupException;
117 
118     public void removeByC_C_C(long companyId, long classNameId, long classPK)
119         throws com.liferay.portal.SystemException, 
120             com.liferay.portal.NoSuchGroupException;
121 
122     public void removeAll() throws com.liferay.portal.SystemException;
123 
124     public int countByLiveGroupId(long liveGroupId)
125         throws com.liferay.portal.SystemException;
126 
127     public int countByC_N(long companyId, java.lang.String name)
128         throws com.liferay.portal.SystemException;
129 
130     public int countByC_F(long companyId, java.lang.String friendlyURL)
131         throws com.liferay.portal.SystemException;
132 
133     public int countByC_C_C(long companyId, long classNameId, long classPK)
134         throws com.liferay.portal.SystemException;
135 
136     public int countAll() throws com.liferay.portal.SystemException;
137 
138     public java.util.List getOrganizations(long pk)
139         throws com.liferay.portal.SystemException, 
140             com.liferay.portal.NoSuchGroupException;
141 
142     public java.util.List getOrganizations(long pk, int begin, int end)
143         throws com.liferay.portal.SystemException, 
144             com.liferay.portal.NoSuchGroupException;
145 
146     public java.util.List getOrganizations(long pk, int begin, int end,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException, 
149             com.liferay.portal.NoSuchGroupException;
150 
151     public int getOrganizationsSize(long pk)
152         throws com.liferay.portal.SystemException;
153 
154     public boolean containsOrganization(long pk, long organizationPK)
155         throws com.liferay.portal.SystemException;
156 
157     public boolean containsOrganizations(long pk)
158         throws com.liferay.portal.SystemException;
159 
160     public void addOrganization(long pk, long organizationPK)
161         throws com.liferay.portal.SystemException, 
162             com.liferay.portal.NoSuchGroupException, 
163             com.liferay.portal.NoSuchOrganizationException;
164 
165     public void addOrganization(long pk,
166         com.liferay.portal.model.Organization organization)
167         throws com.liferay.portal.SystemException, 
168             com.liferay.portal.NoSuchGroupException, 
169             com.liferay.portal.NoSuchOrganizationException;
170 
171     public void addOrganizations(long pk, long[] organizationPKs)
172         throws com.liferay.portal.SystemException, 
173             com.liferay.portal.NoSuchGroupException, 
174             com.liferay.portal.NoSuchOrganizationException;
175 
176     public void addOrganizations(long pk, java.util.List organizations)
177         throws com.liferay.portal.SystemException, 
178             com.liferay.portal.NoSuchGroupException, 
179             com.liferay.portal.NoSuchOrganizationException;
180 
181     public void clearOrganizations(long pk)
182         throws com.liferay.portal.SystemException, 
183             com.liferay.portal.NoSuchGroupException;
184 
185     public void removeOrganization(long pk, long organizationPK)
186         throws com.liferay.portal.SystemException, 
187             com.liferay.portal.NoSuchGroupException, 
188             com.liferay.portal.NoSuchOrganizationException;
189 
190     public void removeOrganization(long pk,
191         com.liferay.portal.model.Organization organization)
192         throws com.liferay.portal.SystemException, 
193             com.liferay.portal.NoSuchGroupException, 
194             com.liferay.portal.NoSuchOrganizationException;
195 
196     public void removeOrganizations(long pk, long[] organizationPKs)
197         throws com.liferay.portal.SystemException, 
198             com.liferay.portal.NoSuchGroupException, 
199             com.liferay.portal.NoSuchOrganizationException;
200 
201     public void removeOrganizations(long pk, java.util.List organizations)
202         throws com.liferay.portal.SystemException, 
203             com.liferay.portal.NoSuchGroupException, 
204             com.liferay.portal.NoSuchOrganizationException;
205 
206     public void setOrganizations(long pk, long[] organizationPKs)
207         throws com.liferay.portal.SystemException, 
208             com.liferay.portal.NoSuchGroupException, 
209             com.liferay.portal.NoSuchOrganizationException;
210 
211     public void setOrganizations(long pk, java.util.List organizations)
212         throws com.liferay.portal.SystemException, 
213             com.liferay.portal.NoSuchGroupException, 
214             com.liferay.portal.NoSuchOrganizationException;
215 
216     public java.util.List getPermissions(long pk)
217         throws com.liferay.portal.SystemException, 
218             com.liferay.portal.NoSuchGroupException;
219 
220     public java.util.List getPermissions(long pk, int begin, int end)
221         throws com.liferay.portal.SystemException, 
222             com.liferay.portal.NoSuchGroupException;
223 
224     public java.util.List getPermissions(long pk, int begin, int end,
225         com.liferay.portal.kernel.util.OrderByComparator obc)
226         throws com.liferay.portal.SystemException, 
227             com.liferay.portal.NoSuchGroupException;
228 
229     public int getPermissionsSize(long pk)
230         throws com.liferay.portal.SystemException;
231 
232     public boolean containsPermission(long pk, long permissionPK)
233         throws com.liferay.portal.SystemException;
234 
235     public boolean containsPermissions(long pk)
236         throws com.liferay.portal.SystemException;
237 
238     public void addPermission(long pk, long permissionPK)
239         throws com.liferay.portal.SystemException, 
240             com.liferay.portal.NoSuchPermissionException, 
241             com.liferay.portal.NoSuchGroupException;
242 
243     public void addPermission(long pk,
244         com.liferay.portal.model.Permission permission)
245         throws com.liferay.portal.SystemException, 
246             com.liferay.portal.NoSuchPermissionException, 
247             com.liferay.portal.NoSuchGroupException;
248 
249     public void addPermissions(long pk, long[] permissionPKs)
250         throws com.liferay.portal.SystemException, 
251             com.liferay.portal.NoSuchPermissionException, 
252             com.liferay.portal.NoSuchGroupException;
253 
254     public void addPermissions(long pk, java.util.List permissions)
255         throws com.liferay.portal.SystemException, 
256             com.liferay.portal.NoSuchPermissionException, 
257             com.liferay.portal.NoSuchGroupException;
258 
259     public void clearPermissions(long pk)
260         throws com.liferay.portal.SystemException, 
261             com.liferay.portal.NoSuchGroupException;
262 
263     public void removePermission(long pk, long permissionPK)
264         throws com.liferay.portal.SystemException, 
265             com.liferay.portal.NoSuchPermissionException, 
266             com.liferay.portal.NoSuchGroupException;
267 
268     public void removePermission(long pk,
269         com.liferay.portal.model.Permission permission)
270         throws com.liferay.portal.SystemException, 
271             com.liferay.portal.NoSuchPermissionException, 
272             com.liferay.portal.NoSuchGroupException;
273 
274     public void removePermissions(long pk, long[] permissionPKs)
275         throws com.liferay.portal.SystemException, 
276             com.liferay.portal.NoSuchPermissionException, 
277             com.liferay.portal.NoSuchGroupException;
278 
279     public void removePermissions(long pk, java.util.List permissions)
280         throws com.liferay.portal.SystemException, 
281             com.liferay.portal.NoSuchPermissionException, 
282             com.liferay.portal.NoSuchGroupException;
283 
284     public void setPermissions(long pk, long[] permissionPKs)
285         throws com.liferay.portal.SystemException, 
286             com.liferay.portal.NoSuchPermissionException, 
287             com.liferay.portal.NoSuchGroupException;
288 
289     public void setPermissions(long pk, java.util.List permissions)
290         throws com.liferay.portal.SystemException, 
291             com.liferay.portal.NoSuchPermissionException, 
292             com.liferay.portal.NoSuchGroupException;
293 
294     public java.util.List getRoles(long pk)
295         throws com.liferay.portal.SystemException, 
296             com.liferay.portal.NoSuchGroupException;
297 
298     public java.util.List getRoles(long pk, int begin, int end)
299         throws com.liferay.portal.SystemException, 
300             com.liferay.portal.NoSuchGroupException;
301 
302     public java.util.List getRoles(long pk, int begin, int end,
303         com.liferay.portal.kernel.util.OrderByComparator obc)
304         throws com.liferay.portal.SystemException, 
305             com.liferay.portal.NoSuchGroupException;
306 
307     public int getRolesSize(long pk) throws com.liferay.portal.SystemException;
308 
309     public boolean containsRole(long pk, long rolePK)
310         throws com.liferay.portal.SystemException;
311 
312     public boolean containsRoles(long pk)
313         throws com.liferay.portal.SystemException;
314 
315     public void addRole(long pk, long rolePK)
316         throws com.liferay.portal.SystemException, 
317             com.liferay.portal.NoSuchRoleException, 
318             com.liferay.portal.NoSuchGroupException;
319 
320     public void addRole(long pk, com.liferay.portal.model.Role role)
321         throws com.liferay.portal.SystemException, 
322             com.liferay.portal.NoSuchRoleException, 
323             com.liferay.portal.NoSuchGroupException;
324 
325     public void addRoles(long pk, long[] rolePKs)
326         throws com.liferay.portal.SystemException, 
327             com.liferay.portal.NoSuchRoleException, 
328             com.liferay.portal.NoSuchGroupException;
329 
330     public void addRoles(long pk, java.util.List roles)
331         throws com.liferay.portal.SystemException, 
332             com.liferay.portal.NoSuchRoleException, 
333             com.liferay.portal.NoSuchGroupException;
334 
335     public void clearRoles(long pk)
336         throws com.liferay.portal.SystemException, 
337             com.liferay.portal.NoSuchGroupException;
338 
339     public void removeRole(long pk, long rolePK)
340         throws com.liferay.portal.SystemException, 
341             com.liferay.portal.NoSuchRoleException, 
342             com.liferay.portal.NoSuchGroupException;
343 
344     public void removeRole(long pk, com.liferay.portal.model.Role role)
345         throws com.liferay.portal.SystemException, 
346             com.liferay.portal.NoSuchRoleException, 
347             com.liferay.portal.NoSuchGroupException;
348 
349     public void removeRoles(long pk, long[] rolePKs)
350         throws com.liferay.portal.SystemException, 
351             com.liferay.portal.NoSuchRoleException, 
352             com.liferay.portal.NoSuchGroupException;
353 
354     public void removeRoles(long pk, java.util.List roles)
355         throws com.liferay.portal.SystemException, 
356             com.liferay.portal.NoSuchRoleException, 
357             com.liferay.portal.NoSuchGroupException;
358 
359     public void setRoles(long pk, long[] rolePKs)
360         throws com.liferay.portal.SystemException, 
361             com.liferay.portal.NoSuchRoleException, 
362             com.liferay.portal.NoSuchGroupException;
363 
364     public void setRoles(long pk, java.util.List roles)
365         throws com.liferay.portal.SystemException, 
366             com.liferay.portal.NoSuchRoleException, 
367             com.liferay.portal.NoSuchGroupException;
368 
369     public java.util.List getUserGroups(long pk)
370         throws com.liferay.portal.SystemException, 
371             com.liferay.portal.NoSuchGroupException;
372 
373     public java.util.List getUserGroups(long pk, int begin, int end)
374         throws com.liferay.portal.SystemException, 
375             com.liferay.portal.NoSuchGroupException;
376 
377     public java.util.List getUserGroups(long pk, int begin, int end,
378         com.liferay.portal.kernel.util.OrderByComparator obc)
379         throws com.liferay.portal.SystemException, 
380             com.liferay.portal.NoSuchGroupException;
381 
382     public int getUserGroupsSize(long pk)
383         throws com.liferay.portal.SystemException;
384 
385     public boolean containsUserGroup(long pk, long userGroupPK)
386         throws com.liferay.portal.SystemException;
387 
388     public boolean containsUserGroups(long pk)
389         throws com.liferay.portal.SystemException;
390 
391     public void addUserGroup(long pk, long userGroupPK)
392         throws com.liferay.portal.SystemException, 
393             com.liferay.portal.NoSuchGroupException, 
394             com.liferay.portal.NoSuchUserGroupException;
395 
396     public void addUserGroup(long pk,
397         com.liferay.portal.model.UserGroup userGroup)
398         throws com.liferay.portal.SystemException, 
399             com.liferay.portal.NoSuchGroupException, 
400             com.liferay.portal.NoSuchUserGroupException;
401 
402     public void addUserGroups(long pk, long[] userGroupPKs)
403         throws com.liferay.portal.SystemException, 
404             com.liferay.portal.NoSuchGroupException, 
405             com.liferay.portal.NoSuchUserGroupException;
406 
407     public void addUserGroups(long pk, java.util.List userGroups)
408         throws com.liferay.portal.SystemException, 
409             com.liferay.portal.NoSuchGroupException, 
410             com.liferay.portal.NoSuchUserGroupException;
411 
412     public void clearUserGroups(long pk)
413         throws com.liferay.portal.SystemException, 
414             com.liferay.portal.NoSuchGroupException;
415 
416     public void removeUserGroup(long pk, long userGroupPK)
417         throws com.liferay.portal.SystemException, 
418             com.liferay.portal.NoSuchGroupException, 
419             com.liferay.portal.NoSuchUserGroupException;
420 
421     public void removeUserGroup(long pk,
422         com.liferay.portal.model.UserGroup userGroup)
423         throws com.liferay.portal.SystemException, 
424             com.liferay.portal.NoSuchGroupException, 
425             com.liferay.portal.NoSuchUserGroupException;
426 
427     public void removeUserGroups(long pk, long[] userGroupPKs)
428         throws com.liferay.portal.SystemException, 
429             com.liferay.portal.NoSuchGroupException, 
430             com.liferay.portal.NoSuchUserGroupException;
431 
432     public void removeUserGroups(long pk, java.util.List userGroups)
433         throws com.liferay.portal.SystemException, 
434             com.liferay.portal.NoSuchGroupException, 
435             com.liferay.portal.NoSuchUserGroupException;
436 
437     public void setUserGroups(long pk, long[] userGroupPKs)
438         throws com.liferay.portal.SystemException, 
439             com.liferay.portal.NoSuchGroupException, 
440             com.liferay.portal.NoSuchUserGroupException;
441 
442     public void setUserGroups(long pk, java.util.List userGroups)
443         throws com.liferay.portal.SystemException, 
444             com.liferay.portal.NoSuchGroupException, 
445             com.liferay.portal.NoSuchUserGroupException;
446 
447     public java.util.List getUsers(long pk)
448         throws com.liferay.portal.SystemException, 
449             com.liferay.portal.NoSuchGroupException;
450 
451     public java.util.List getUsers(long pk, int begin, int end)
452         throws com.liferay.portal.SystemException, 
453             com.liferay.portal.NoSuchGroupException;
454 
455     public java.util.List getUsers(long pk, int begin, int end,
456         com.liferay.portal.kernel.util.OrderByComparator obc)
457         throws com.liferay.portal.SystemException, 
458             com.liferay.portal.NoSuchGroupException;
459 
460     public int getUsersSize(long pk) throws com.liferay.portal.SystemException;
461 
462     public boolean containsUser(long pk, long userPK)
463         throws com.liferay.portal.SystemException;
464 
465     public boolean containsUsers(long pk)
466         throws com.liferay.portal.SystemException;
467 
468     public void addUser(long pk, long userPK)
469         throws com.liferay.portal.SystemException, 
470             com.liferay.portal.NoSuchGroupException, 
471             com.liferay.portal.NoSuchUserException;
472 
473     public void addUser(long pk, com.liferay.portal.model.User user)
474         throws com.liferay.portal.SystemException, 
475             com.liferay.portal.NoSuchGroupException, 
476             com.liferay.portal.NoSuchUserException;
477 
478     public void addUsers(long pk, long[] userPKs)
479         throws com.liferay.portal.SystemException, 
480             com.liferay.portal.NoSuchGroupException, 
481             com.liferay.portal.NoSuchUserException;
482 
483     public void addUsers(long pk, java.util.List users)
484         throws com.liferay.portal.SystemException, 
485             com.liferay.portal.NoSuchGroupException, 
486             com.liferay.portal.NoSuchUserException;
487 
488     public void clearUsers(long pk)
489         throws com.liferay.portal.SystemException, 
490             com.liferay.portal.NoSuchGroupException;
491 
492     public void removeUser(long pk, long userPK)
493         throws com.liferay.portal.SystemException, 
494             com.liferay.portal.NoSuchGroupException, 
495             com.liferay.portal.NoSuchUserException;
496 
497     public void removeUser(long pk, com.liferay.portal.model.User user)
498         throws com.liferay.portal.SystemException, 
499             com.liferay.portal.NoSuchGroupException, 
500             com.liferay.portal.NoSuchUserException;
501 
502     public void removeUsers(long pk, long[] userPKs)
503         throws com.liferay.portal.SystemException, 
504             com.liferay.portal.NoSuchGroupException, 
505             com.liferay.portal.NoSuchUserException;
506 
507     public void removeUsers(long pk, java.util.List users)
508         throws com.liferay.portal.SystemException, 
509             com.liferay.portal.NoSuchGroupException, 
510             com.liferay.portal.NoSuchUserException;
511 
512     public void setUsers(long pk, long[] userPKs)
513         throws com.liferay.portal.SystemException, 
514             com.liferay.portal.NoSuchGroupException, 
515             com.liferay.portal.NoSuchUserException;
516 
517     public void setUsers(long pk, java.util.List users)
518         throws com.liferay.portal.SystemException, 
519             com.liferay.portal.NoSuchGroupException, 
520             com.liferay.portal.NoSuchUserException;
521 }