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="OrganizationPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface OrganizationPersistence {
32      public com.liferay.portal.model.Organization create(long organizationId);
33  
34      public com.liferay.portal.model.Organization remove(long organizationId)
35          throws com.liferay.portal.SystemException, 
36              com.liferay.portal.NoSuchOrganizationException;
37  
38      public com.liferay.portal.model.Organization remove(
39          com.liferay.portal.model.Organization organization)
40          throws com.liferay.portal.SystemException;
41  
42      public com.liferay.portal.model.Organization update(
43          com.liferay.portal.model.Organization organization)
44          throws com.liferay.portal.SystemException;
45  
46      public com.liferay.portal.model.Organization update(
47          com.liferay.portal.model.Organization organization, boolean merge)
48          throws com.liferay.portal.SystemException;
49  
50      public com.liferay.portal.model.Organization updateImpl(
51          com.liferay.portal.model.Organization organization, boolean merge)
52          throws com.liferay.portal.SystemException;
53  
54      public com.liferay.portal.model.Organization findByPrimaryKey(
55          long organizationId)
56          throws com.liferay.portal.SystemException, 
57              com.liferay.portal.NoSuchOrganizationException;
58  
59      public com.liferay.portal.model.Organization fetchByPrimaryKey(
60          long organizationId) throws com.liferay.portal.SystemException;
61  
62      public java.util.List findByCompanyId(long companyId)
63          throws com.liferay.portal.SystemException;
64  
65      public java.util.List findByCompanyId(long companyId, int begin, int end)
66          throws com.liferay.portal.SystemException;
67  
68      public java.util.List findByCompanyId(long companyId, int begin, int end,
69          com.liferay.portal.kernel.util.OrderByComparator obc)
70          throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portal.model.Organization findByCompanyId_First(
73          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
74          throws com.liferay.portal.SystemException, 
75              com.liferay.portal.NoSuchOrganizationException;
76  
77      public com.liferay.portal.model.Organization findByCompanyId_Last(
78          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
79          throws com.liferay.portal.SystemException, 
80              com.liferay.portal.NoSuchOrganizationException;
81  
82      public com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
83          long organizationId, long companyId,
84          com.liferay.portal.kernel.util.OrderByComparator obc)
85          throws com.liferay.portal.SystemException, 
86              com.liferay.portal.NoSuchOrganizationException;
87  
88      public java.util.List findByLocations(long companyId)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List findByLocations(long companyId, int begin, int end)
92          throws com.liferay.portal.SystemException;
93  
94      public java.util.List findByLocations(long companyId, int begin, int end,
95          com.liferay.portal.kernel.util.OrderByComparator obc)
96          throws com.liferay.portal.SystemException;
97  
98      public com.liferay.portal.model.Organization findByLocations_First(
99          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException, 
101             com.liferay.portal.NoSuchOrganizationException;
102 
103     public com.liferay.portal.model.Organization findByLocations_Last(
104         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portal.NoSuchOrganizationException;
107 
108     public com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
109         long organizationId, long companyId,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException, 
112             com.liferay.portal.NoSuchOrganizationException;
113 
114     public java.util.List findByC_P(long companyId, long parentOrganizationId)
115         throws com.liferay.portal.SystemException;
116 
117     public java.util.List findByC_P(long companyId, long parentOrganizationId,
118         int begin, int end) throws com.liferay.portal.SystemException;
119 
120     public java.util.List findByC_P(long companyId, long parentOrganizationId,
121         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.SystemException;
123 
124     public com.liferay.portal.model.Organization findByC_P_First(
125         long companyId, long parentOrganizationId,
126         com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException, 
128             com.liferay.portal.NoSuchOrganizationException;
129 
130     public com.liferay.portal.model.Organization findByC_P_Last(
131         long companyId, long parentOrganizationId,
132         com.liferay.portal.kernel.util.OrderByComparator obc)
133         throws com.liferay.portal.SystemException, 
134             com.liferay.portal.NoSuchOrganizationException;
135 
136     public com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
137         long organizationId, long companyId, long parentOrganizationId,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.SystemException, 
140             com.liferay.portal.NoSuchOrganizationException;
141 
142     public com.liferay.portal.model.Organization findByC_N(long companyId,
143         java.lang.String name)
144         throws com.liferay.portal.SystemException, 
145             com.liferay.portal.NoSuchOrganizationException;
146 
147     public com.liferay.portal.model.Organization fetchByC_N(long companyId,
148         java.lang.String name) throws com.liferay.portal.SystemException;
149 
150     public java.util.List findWithDynamicQuery(
151         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
152         throws com.liferay.portal.SystemException;
153 
154     public java.util.List findWithDynamicQuery(
155         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
156         int begin, int end) throws com.liferay.portal.SystemException;
157 
158     public java.util.List findAll() throws com.liferay.portal.SystemException;
159 
160     public java.util.List findAll(int begin, int end)
161         throws com.liferay.portal.SystemException;
162 
163     public java.util.List findAll(int begin, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException;
166 
167     public void removeByCompanyId(long companyId)
168         throws com.liferay.portal.SystemException;
169 
170     public void removeByLocations(long companyId)
171         throws com.liferay.portal.SystemException;
172 
173     public void removeByC_P(long companyId, long parentOrganizationId)
174         throws com.liferay.portal.SystemException;
175 
176     public void removeByC_N(long companyId, java.lang.String name)
177         throws com.liferay.portal.SystemException, 
178             com.liferay.portal.NoSuchOrganizationException;
179 
180     public void removeAll() throws com.liferay.portal.SystemException;
181 
182     public int countByCompanyId(long companyId)
183         throws com.liferay.portal.SystemException;
184 
185     public int countByLocations(long companyId)
186         throws com.liferay.portal.SystemException;
187 
188     public int countByC_P(long companyId, long parentOrganizationId)
189         throws com.liferay.portal.SystemException;
190 
191     public int countByC_N(long companyId, java.lang.String name)
192         throws com.liferay.portal.SystemException;
193 
194     public int countAll() throws com.liferay.portal.SystemException;
195 
196     public java.util.List getGroups(long pk)
197         throws com.liferay.portal.SystemException, 
198             com.liferay.portal.NoSuchOrganizationException;
199 
200     public java.util.List getGroups(long pk, int begin, int end)
201         throws com.liferay.portal.SystemException, 
202             com.liferay.portal.NoSuchOrganizationException;
203 
204     public java.util.List getGroups(long pk, int begin, int end,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.SystemException, 
207             com.liferay.portal.NoSuchOrganizationException;
208 
209     public int getGroupsSize(long pk) throws com.liferay.portal.SystemException;
210 
211     public boolean containsGroup(long pk, long groupPK)
212         throws com.liferay.portal.SystemException;
213 
214     public boolean containsGroups(long pk)
215         throws com.liferay.portal.SystemException;
216 
217     public void addGroup(long pk, long groupPK)
218         throws com.liferay.portal.SystemException, 
219             com.liferay.portal.NoSuchGroupException, 
220             com.liferay.portal.NoSuchOrganizationException;
221 
222     public void addGroup(long pk, com.liferay.portal.model.Group group)
223         throws com.liferay.portal.SystemException, 
224             com.liferay.portal.NoSuchGroupException, 
225             com.liferay.portal.NoSuchOrganizationException;
226 
227     public void addGroups(long pk, long[] groupPKs)
228         throws com.liferay.portal.SystemException, 
229             com.liferay.portal.NoSuchGroupException, 
230             com.liferay.portal.NoSuchOrganizationException;
231 
232     public void addGroups(long pk, java.util.List groups)
233         throws com.liferay.portal.SystemException, 
234             com.liferay.portal.NoSuchGroupException, 
235             com.liferay.portal.NoSuchOrganizationException;
236 
237     public void clearGroups(long pk)
238         throws com.liferay.portal.SystemException, 
239             com.liferay.portal.NoSuchOrganizationException;
240 
241     public void removeGroup(long pk, long groupPK)
242         throws com.liferay.portal.SystemException, 
243             com.liferay.portal.NoSuchGroupException, 
244             com.liferay.portal.NoSuchOrganizationException;
245 
246     public void removeGroup(long pk, com.liferay.portal.model.Group group)
247         throws com.liferay.portal.SystemException, 
248             com.liferay.portal.NoSuchGroupException, 
249             com.liferay.portal.NoSuchOrganizationException;
250 
251     public void removeGroups(long pk, long[] groupPKs)
252         throws com.liferay.portal.SystemException, 
253             com.liferay.portal.NoSuchGroupException, 
254             com.liferay.portal.NoSuchOrganizationException;
255 
256     public void removeGroups(long pk, java.util.List groups)
257         throws com.liferay.portal.SystemException, 
258             com.liferay.portal.NoSuchGroupException, 
259             com.liferay.portal.NoSuchOrganizationException;
260 
261     public void setGroups(long pk, long[] groupPKs)
262         throws com.liferay.portal.SystemException, 
263             com.liferay.portal.NoSuchGroupException, 
264             com.liferay.portal.NoSuchOrganizationException;
265 
266     public void setGroups(long pk, java.util.List groups)
267         throws com.liferay.portal.SystemException, 
268             com.liferay.portal.NoSuchGroupException, 
269             com.liferay.portal.NoSuchOrganizationException;
270 
271     public java.util.List getUsers(long pk)
272         throws com.liferay.portal.SystemException, 
273             com.liferay.portal.NoSuchOrganizationException;
274 
275     public java.util.List getUsers(long pk, int begin, int end)
276         throws com.liferay.portal.SystemException, 
277             com.liferay.portal.NoSuchOrganizationException;
278 
279     public java.util.List getUsers(long pk, int begin, int end,
280         com.liferay.portal.kernel.util.OrderByComparator obc)
281         throws com.liferay.portal.SystemException, 
282             com.liferay.portal.NoSuchOrganizationException;
283 
284     public int getUsersSize(long pk) throws com.liferay.portal.SystemException;
285 
286     public boolean containsUser(long pk, long userPK)
287         throws com.liferay.portal.SystemException;
288 
289     public boolean containsUsers(long pk)
290         throws com.liferay.portal.SystemException;
291 
292     public void addUser(long pk, long userPK)
293         throws com.liferay.portal.SystemException, 
294             com.liferay.portal.NoSuchOrganizationException, 
295             com.liferay.portal.NoSuchUserException;
296 
297     public void addUser(long pk, com.liferay.portal.model.User user)
298         throws com.liferay.portal.SystemException, 
299             com.liferay.portal.NoSuchOrganizationException, 
300             com.liferay.portal.NoSuchUserException;
301 
302     public void addUsers(long pk, long[] userPKs)
303         throws com.liferay.portal.SystemException, 
304             com.liferay.portal.NoSuchOrganizationException, 
305             com.liferay.portal.NoSuchUserException;
306 
307     public void addUsers(long pk, java.util.List users)
308         throws com.liferay.portal.SystemException, 
309             com.liferay.portal.NoSuchOrganizationException, 
310             com.liferay.portal.NoSuchUserException;
311 
312     public void clearUsers(long pk)
313         throws com.liferay.portal.SystemException, 
314             com.liferay.portal.NoSuchOrganizationException;
315 
316     public void removeUser(long pk, long userPK)
317         throws com.liferay.portal.SystemException, 
318             com.liferay.portal.NoSuchOrganizationException, 
319             com.liferay.portal.NoSuchUserException;
320 
321     public void removeUser(long pk, com.liferay.portal.model.User user)
322         throws com.liferay.portal.SystemException, 
323             com.liferay.portal.NoSuchOrganizationException, 
324             com.liferay.portal.NoSuchUserException;
325 
326     public void removeUsers(long pk, long[] userPKs)
327         throws com.liferay.portal.SystemException, 
328             com.liferay.portal.NoSuchOrganizationException, 
329             com.liferay.portal.NoSuchUserException;
330 
331     public void removeUsers(long pk, java.util.List users)
332         throws com.liferay.portal.SystemException, 
333             com.liferay.portal.NoSuchOrganizationException, 
334             com.liferay.portal.NoSuchUserException;
335 
336     public void setUsers(long pk, long[] userPKs)
337         throws com.liferay.portal.SystemException, 
338             com.liferay.portal.NoSuchOrganizationException, 
339             com.liferay.portal.NoSuchUserException;
340 
341     public void setUsers(long pk, java.util.List users)
342         throws com.liferay.portal.SystemException, 
343             com.liferay.portal.NoSuchOrganizationException, 
344             com.liferay.portal.NoSuchUserException;
345 }