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="UserGroupPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface UserGroupPersistence {
32      public com.liferay.portal.model.UserGroup create(long userGroupId);
33  
34      public com.liferay.portal.model.UserGroup remove(long userGroupId)
35          throws com.liferay.portal.SystemException, 
36              com.liferay.portal.NoSuchUserGroupException;
37  
38      public com.liferay.portal.model.UserGroup remove(
39          com.liferay.portal.model.UserGroup userGroup)
40          throws com.liferay.portal.SystemException;
41  
42      public com.liferay.portal.model.UserGroup update(
43          com.liferay.portal.model.UserGroup userGroup)
44          throws com.liferay.portal.SystemException;
45  
46      public com.liferay.portal.model.UserGroup update(
47          com.liferay.portal.model.UserGroup userGroup, boolean merge)
48          throws com.liferay.portal.SystemException;
49  
50      public com.liferay.portal.model.UserGroup updateImpl(
51          com.liferay.portal.model.UserGroup userGroup, boolean merge)
52          throws com.liferay.portal.SystemException;
53  
54      public com.liferay.portal.model.UserGroup findByPrimaryKey(long userGroupId)
55          throws com.liferay.portal.SystemException, 
56              com.liferay.portal.NoSuchUserGroupException;
57  
58      public com.liferay.portal.model.UserGroup fetchByPrimaryKey(
59          long userGroupId) throws com.liferay.portal.SystemException;
60  
61      public java.util.List findByCompanyId(long companyId)
62          throws com.liferay.portal.SystemException;
63  
64      public java.util.List findByCompanyId(long companyId, int begin, int end)
65          throws com.liferay.portal.SystemException;
66  
67      public java.util.List findByCompanyId(long companyId, int begin, int end,
68          com.liferay.portal.kernel.util.OrderByComparator obc)
69          throws com.liferay.portal.SystemException;
70  
71      public com.liferay.portal.model.UserGroup findByCompanyId_First(
72          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
73          throws com.liferay.portal.SystemException, 
74              com.liferay.portal.NoSuchUserGroupException;
75  
76      public com.liferay.portal.model.UserGroup findByCompanyId_Last(
77          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
78          throws com.liferay.portal.SystemException, 
79              com.liferay.portal.NoSuchUserGroupException;
80  
81      public com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
82          long userGroupId, long companyId,
83          com.liferay.portal.kernel.util.OrderByComparator obc)
84          throws com.liferay.portal.SystemException, 
85              com.liferay.portal.NoSuchUserGroupException;
86  
87      public java.util.List findByC_P(long companyId, long parentUserGroupId)
88          throws com.liferay.portal.SystemException;
89  
90      public java.util.List findByC_P(long companyId, long parentUserGroupId,
91          int begin, int end) throws com.liferay.portal.SystemException;
92  
93      public java.util.List findByC_P(long companyId, long parentUserGroupId,
94          int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portal.model.UserGroup findByC_P_First(long companyId,
98          long parentUserGroupId,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException, 
101             com.liferay.portal.NoSuchUserGroupException;
102 
103     public com.liferay.portal.model.UserGroup findByC_P_Last(long companyId,
104         long parentUserGroupId,
105         com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException, 
107             com.liferay.portal.NoSuchUserGroupException;
108 
109     public com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
110         long userGroupId, long companyId, long parentUserGroupId,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException, 
113             com.liferay.portal.NoSuchUserGroupException;
114 
115     public com.liferay.portal.model.UserGroup findByC_N(long companyId,
116         java.lang.String name)
117         throws com.liferay.portal.SystemException, 
118             com.liferay.portal.NoSuchUserGroupException;
119 
120     public com.liferay.portal.model.UserGroup fetchByC_N(long companyId,
121         java.lang.String name) throws com.liferay.portal.SystemException;
122 
123     public java.util.List findWithDynamicQuery(
124         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
125         throws com.liferay.portal.SystemException;
126 
127     public java.util.List findWithDynamicQuery(
128         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
129         int begin, int end) throws com.liferay.portal.SystemException;
130 
131     public java.util.List findAll() throws com.liferay.portal.SystemException;
132 
133     public java.util.List findAll(int begin, int end)
134         throws com.liferay.portal.SystemException;
135 
136     public java.util.List findAll(int begin, int end,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException;
139 
140     public void removeByCompanyId(long companyId)
141         throws com.liferay.portal.SystemException;
142 
143     public void removeByC_P(long companyId, long parentUserGroupId)
144         throws com.liferay.portal.SystemException;
145 
146     public void removeByC_N(long companyId, java.lang.String name)
147         throws com.liferay.portal.SystemException, 
148             com.liferay.portal.NoSuchUserGroupException;
149 
150     public void removeAll() throws com.liferay.portal.SystemException;
151 
152     public int countByCompanyId(long companyId)
153         throws com.liferay.portal.SystemException;
154 
155     public int countByC_P(long companyId, long parentUserGroupId)
156         throws com.liferay.portal.SystemException;
157 
158     public int countByC_N(long companyId, java.lang.String name)
159         throws com.liferay.portal.SystemException;
160 
161     public int countAll() throws com.liferay.portal.SystemException;
162 
163     public java.util.List getUsers(long pk)
164         throws com.liferay.portal.SystemException, 
165             com.liferay.portal.NoSuchUserGroupException;
166 
167     public java.util.List getUsers(long pk, int begin, int end)
168         throws com.liferay.portal.SystemException, 
169             com.liferay.portal.NoSuchUserGroupException;
170 
171     public java.util.List getUsers(long pk, int begin, int end,
172         com.liferay.portal.kernel.util.OrderByComparator obc)
173         throws com.liferay.portal.SystemException, 
174             com.liferay.portal.NoSuchUserGroupException;
175 
176     public int getUsersSize(long pk) throws com.liferay.portal.SystemException;
177 
178     public boolean containsUser(long pk, long userPK)
179         throws com.liferay.portal.SystemException;
180 
181     public boolean containsUsers(long pk)
182         throws com.liferay.portal.SystemException;
183 
184     public void addUser(long pk, long userPK)
185         throws com.liferay.portal.SystemException, 
186             com.liferay.portal.NoSuchUserGroupException, 
187             com.liferay.portal.NoSuchUserException;
188 
189     public void addUser(long pk, com.liferay.portal.model.User user)
190         throws com.liferay.portal.SystemException, 
191             com.liferay.portal.NoSuchUserGroupException, 
192             com.liferay.portal.NoSuchUserException;
193 
194     public void addUsers(long pk, long[] userPKs)
195         throws com.liferay.portal.SystemException, 
196             com.liferay.portal.NoSuchUserGroupException, 
197             com.liferay.portal.NoSuchUserException;
198 
199     public void addUsers(long pk, java.util.List users)
200         throws com.liferay.portal.SystemException, 
201             com.liferay.portal.NoSuchUserGroupException, 
202             com.liferay.portal.NoSuchUserException;
203 
204     public void clearUsers(long pk)
205         throws com.liferay.portal.SystemException, 
206             com.liferay.portal.NoSuchUserGroupException;
207 
208     public void removeUser(long pk, long userPK)
209         throws com.liferay.portal.SystemException, 
210             com.liferay.portal.NoSuchUserGroupException, 
211             com.liferay.portal.NoSuchUserException;
212 
213     public void removeUser(long pk, com.liferay.portal.model.User user)
214         throws com.liferay.portal.SystemException, 
215             com.liferay.portal.NoSuchUserGroupException, 
216             com.liferay.portal.NoSuchUserException;
217 
218     public void removeUsers(long pk, long[] userPKs)
219         throws com.liferay.portal.SystemException, 
220             com.liferay.portal.NoSuchUserGroupException, 
221             com.liferay.portal.NoSuchUserException;
222 
223     public void removeUsers(long pk, java.util.List users)
224         throws com.liferay.portal.SystemException, 
225             com.liferay.portal.NoSuchUserGroupException, 
226             com.liferay.portal.NoSuchUserException;
227 
228     public void setUsers(long pk, long[] userPKs)
229         throws com.liferay.portal.SystemException, 
230             com.liferay.portal.NoSuchUserGroupException, 
231             com.liferay.portal.NoSuchUserException;
232 
233     public void setUsers(long pk, java.util.List users)
234         throws com.liferay.portal.SystemException, 
235             com.liferay.portal.NoSuchUserGroupException, 
236             com.liferay.portal.NoSuchUserException;
237 }