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