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