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