1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  /**
27   * <a href="OrganizationPersistence.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       OrganizationPersistenceImpl
36   * @see       OrganizationUtil
37   * @generated
38   */
39  public interface OrganizationPersistence extends BasePersistence {
40      public void cacheResult(com.liferay.portal.model.Organization organization);
41  
42      public void cacheResult(
43          java.util.List<com.liferay.portal.model.Organization> organizations);
44  
45      public void clearCache();
46  
47      public com.liferay.portal.model.Organization create(long organizationId);
48  
49      public com.liferay.portal.model.Organization remove(long organizationId)
50          throws com.liferay.portal.NoSuchOrganizationException,
51              com.liferay.portal.SystemException;
52  
53      public com.liferay.portal.model.Organization remove(
54          com.liferay.portal.model.Organization organization)
55          throws com.liferay.portal.SystemException;
56  
57      /**
58       * @deprecated Use {@link #update(Organization, boolean merge)}.
59       */
60      public com.liferay.portal.model.Organization update(
61          com.liferay.portal.model.Organization organization)
62          throws com.liferay.portal.SystemException;
63  
64      /**
65       * Add, update, or merge, the entity. This method also calls the model
66       * listeners to trigger the proper events associated with adding, deleting,
67       * or updating an entity.
68       *
69       * @param  organization the entity to add, update, or merge
70       * @param  merge boolean value for whether to merge the entity. The default
71       *         value is false. Setting merge to true is more expensive and
72       *         should only be true when organization is transient. See
73       *         LEP-5473 for a detailed discussion of this method.
74       * @return the entity that was added, updated, or merged
75       */
76      public com.liferay.portal.model.Organization update(
77          com.liferay.portal.model.Organization organization, boolean merge)
78          throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portal.model.Organization updateImpl(
81          com.liferay.portal.model.Organization organization, boolean merge)
82          throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portal.model.Organization findByPrimaryKey(
85          long organizationId)
86          throws com.liferay.portal.NoSuchOrganizationException,
87              com.liferay.portal.SystemException;
88  
89      public com.liferay.portal.model.Organization fetchByPrimaryKey(
90          long organizationId) throws com.liferay.portal.SystemException;
91  
92      public java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
93          long companyId) throws com.liferay.portal.SystemException;
94  
95      public java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
96          long companyId, int start, int end)
97          throws com.liferay.portal.SystemException;
98  
99      public java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
100         long companyId, int start, int end,
101         com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException;
103 
104     public com.liferay.portal.model.Organization findByCompanyId_First(
105         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.NoSuchOrganizationException,
107             com.liferay.portal.SystemException;
108 
109     public com.liferay.portal.model.Organization findByCompanyId_Last(
110         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.NoSuchOrganizationException,
112             com.liferay.portal.SystemException;
113 
114     public com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
115         long organizationId, long companyId,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.NoSuchOrganizationException,
118             com.liferay.portal.SystemException;
119 
120     public java.util.List<com.liferay.portal.model.Organization> findByLocations(
121         long companyId) throws com.liferay.portal.SystemException;
122 
123     public java.util.List<com.liferay.portal.model.Organization> findByLocations(
124         long companyId, int start, int end)
125         throws com.liferay.portal.SystemException;
126 
127     public java.util.List<com.liferay.portal.model.Organization> findByLocations(
128         long companyId, int start, int end,
129         com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException;
131 
132     public com.liferay.portal.model.Organization findByLocations_First(
133         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.NoSuchOrganizationException,
135             com.liferay.portal.SystemException;
136 
137     public com.liferay.portal.model.Organization findByLocations_Last(
138         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.NoSuchOrganizationException,
140             com.liferay.portal.SystemException;
141 
142     public com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
143         long organizationId, long companyId,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.NoSuchOrganizationException,
146             com.liferay.portal.SystemException;
147 
148     public java.util.List<com.liferay.portal.model.Organization> findByC_P(
149         long companyId, long parentOrganizationId)
150         throws com.liferay.portal.SystemException;
151 
152     public java.util.List<com.liferay.portal.model.Organization> findByC_P(
153         long companyId, long parentOrganizationId, int start, int end)
154         throws com.liferay.portal.SystemException;
155 
156     public java.util.List<com.liferay.portal.model.Organization> findByC_P(
157         long companyId, long parentOrganizationId, int start, int end,
158         com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException;
160 
161     public com.liferay.portal.model.Organization findByC_P_First(
162         long companyId, long parentOrganizationId,
163         com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.NoSuchOrganizationException,
165             com.liferay.portal.SystemException;
166 
167     public com.liferay.portal.model.Organization findByC_P_Last(
168         long companyId, long parentOrganizationId,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.NoSuchOrganizationException,
171             com.liferay.portal.SystemException;
172 
173     public com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
174         long organizationId, long companyId, long parentOrganizationId,
175         com.liferay.portal.kernel.util.OrderByComparator obc)
176         throws com.liferay.portal.NoSuchOrganizationException,
177             com.liferay.portal.SystemException;
178 
179     public com.liferay.portal.model.Organization findByC_N(long companyId,
180         java.lang.String name)
181         throws com.liferay.portal.NoSuchOrganizationException,
182             com.liferay.portal.SystemException;
183 
184     public com.liferay.portal.model.Organization fetchByC_N(long companyId,
185         java.lang.String name) throws com.liferay.portal.SystemException;
186 
187     public com.liferay.portal.model.Organization fetchByC_N(long companyId,
188         java.lang.String name, boolean retrieveFromCache)
189         throws com.liferay.portal.SystemException;
190 
191     public java.util.List<Object> findWithDynamicQuery(
192         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
193         throws com.liferay.portal.SystemException;
194 
195     public java.util.List<Object> findWithDynamicQuery(
196         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
197         int end) throws com.liferay.portal.SystemException;
198 
199     public java.util.List<com.liferay.portal.model.Organization> findAll()
200         throws com.liferay.portal.SystemException;
201 
202     public java.util.List<com.liferay.portal.model.Organization> findAll(
203         int start, int end) throws com.liferay.portal.SystemException;
204 
205     public java.util.List<com.liferay.portal.model.Organization> findAll(
206         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException;
208 
209     public void removeByCompanyId(long companyId)
210         throws com.liferay.portal.SystemException;
211 
212     public void removeByLocations(long companyId)
213         throws com.liferay.portal.SystemException;
214 
215     public void removeByC_P(long companyId, long parentOrganizationId)
216         throws com.liferay.portal.SystemException;
217 
218     public void removeByC_N(long companyId, java.lang.String name)
219         throws com.liferay.portal.NoSuchOrganizationException,
220             com.liferay.portal.SystemException;
221 
222     public void removeAll() throws com.liferay.portal.SystemException;
223 
224     public int countByCompanyId(long companyId)
225         throws com.liferay.portal.SystemException;
226 
227     public int countByLocations(long companyId)
228         throws com.liferay.portal.SystemException;
229 
230     public int countByC_P(long companyId, long parentOrganizationId)
231         throws com.liferay.portal.SystemException;
232 
233     public int countByC_N(long companyId, java.lang.String name)
234         throws com.liferay.portal.SystemException;
235 
236     public int countAll() throws com.liferay.portal.SystemException;
237 
238     public java.util.List<com.liferay.portal.model.Group> getGroups(long pk)
239         throws com.liferay.portal.SystemException;
240 
241     public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
242         int start, int end) throws com.liferay.portal.SystemException;
243 
244     public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
245         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException;
247 
248     public int getGroupsSize(long pk) throws com.liferay.portal.SystemException;
249 
250     public boolean containsGroup(long pk, long groupPK)
251         throws com.liferay.portal.SystemException;
252 
253     public boolean containsGroups(long pk)
254         throws com.liferay.portal.SystemException;
255 
256     public void addGroup(long pk, long groupPK)
257         throws com.liferay.portal.SystemException;
258 
259     public void addGroup(long pk, com.liferay.portal.model.Group group)
260         throws com.liferay.portal.SystemException;
261 
262     public void addGroups(long pk, long[] groupPKs)
263         throws com.liferay.portal.SystemException;
264 
265     public void addGroups(long pk,
266         java.util.List<com.liferay.portal.model.Group> groups)
267         throws com.liferay.portal.SystemException;
268 
269     public void clearGroups(long pk) throws com.liferay.portal.SystemException;
270 
271     public void removeGroup(long pk, long groupPK)
272         throws com.liferay.portal.SystemException;
273 
274     public void removeGroup(long pk, com.liferay.portal.model.Group group)
275         throws com.liferay.portal.SystemException;
276 
277     public void removeGroups(long pk, long[] groupPKs)
278         throws com.liferay.portal.SystemException;
279 
280     public void removeGroups(long pk,
281         java.util.List<com.liferay.portal.model.Group> groups)
282         throws com.liferay.portal.SystemException;
283 
284     public void setGroups(long pk, long[] groupPKs)
285         throws com.liferay.portal.SystemException;
286 
287     public void setGroups(long pk,
288         java.util.List<com.liferay.portal.model.Group> groups)
289         throws com.liferay.portal.SystemException;
290 
291     public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
292         throws com.liferay.portal.SystemException;
293 
294     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
295         int start, int end) throws com.liferay.portal.SystemException;
296 
297     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
298         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
299         throws com.liferay.portal.SystemException;
300 
301     public int getUsersSize(long pk) throws com.liferay.portal.SystemException;
302 
303     public boolean containsUser(long pk, long userPK)
304         throws com.liferay.portal.SystemException;
305 
306     public boolean containsUsers(long pk)
307         throws com.liferay.portal.SystemException;
308 
309     public void addUser(long pk, long userPK)
310         throws com.liferay.portal.SystemException;
311 
312     public void addUser(long pk, com.liferay.portal.model.User user)
313         throws com.liferay.portal.SystemException;
314 
315     public void addUsers(long pk, long[] userPKs)
316         throws com.liferay.portal.SystemException;
317 
318     public void addUsers(long pk,
319         java.util.List<com.liferay.portal.model.User> users)
320         throws com.liferay.portal.SystemException;
321 
322     public void clearUsers(long pk) throws com.liferay.portal.SystemException;
323 
324     public void removeUser(long pk, long userPK)
325         throws com.liferay.portal.SystemException;
326 
327     public void removeUser(long pk, com.liferay.portal.model.User user)
328         throws com.liferay.portal.SystemException;
329 
330     public void removeUsers(long pk, long[] userPKs)
331         throws com.liferay.portal.SystemException;
332 
333     public void removeUsers(long pk,
334         java.util.List<com.liferay.portal.model.User> users)
335         throws com.liferay.portal.SystemException;
336 
337     public void setUsers(long pk, long[] userPKs)
338         throws com.liferay.portal.SystemException;
339 
340     public void setUsers(long pk,
341         java.util.List<com.liferay.portal.model.User> users)
342         throws com.liferay.portal.SystemException;
343 
344     public void rebuildTree(long companyId, boolean force)
345         throws com.liferay.portal.SystemException;
346 }