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="OrganizationUtil.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       OrganizationPersistence
36   * @see       OrganizationPersistenceImpl
37   * @generated
38   */
39  public class OrganizationUtil {
40      public static void cacheResult(
41          com.liferay.portal.model.Organization organization) {
42          getPersistence().cacheResult(organization);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portal.model.Organization> organizations) {
47          getPersistence().cacheResult(organizations);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portal.model.Organization create(
55          long organizationId) {
56          return getPersistence().create(organizationId);
57      }
58  
59      public static com.liferay.portal.model.Organization remove(
60          long organizationId)
61          throws com.liferay.portal.NoSuchOrganizationException,
62              com.liferay.portal.SystemException {
63          return getPersistence().remove(organizationId);
64      }
65  
66      public static com.liferay.portal.model.Organization remove(
67          com.liferay.portal.model.Organization organization)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(organization);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(Organization, boolean merge)}.
74       */
75      public static com.liferay.portal.model.Organization update(
76          com.liferay.portal.model.Organization organization)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(organization);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  organization the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when organization is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portal.model.Organization update(
94          com.liferay.portal.model.Organization organization, boolean merge)
95          throws com.liferay.portal.SystemException {
96          return getPersistence().update(organization, merge);
97      }
98  
99      public static com.liferay.portal.model.Organization updateImpl(
100         com.liferay.portal.model.Organization organization, boolean merge)
101         throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(organization, merge);
103     }
104 
105     public static com.liferay.portal.model.Organization findByPrimaryKey(
106         long organizationId)
107         throws com.liferay.portal.NoSuchOrganizationException,
108             com.liferay.portal.SystemException {
109         return getPersistence().findByPrimaryKey(organizationId);
110     }
111 
112     public static com.liferay.portal.model.Organization fetchByPrimaryKey(
113         long organizationId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(organizationId);
115     }
116 
117     public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
118         long companyId) throws com.liferay.portal.SystemException {
119         return getPersistence().findByCompanyId(companyId);
120     }
121 
122     public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
123         long companyId, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByCompanyId(companyId, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
129         long companyId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByCompanyId(companyId, start, end, obc);
133     }
134 
135     public static com.liferay.portal.model.Organization findByCompanyId_First(
136         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.NoSuchOrganizationException,
138             com.liferay.portal.SystemException {
139         return getPersistence().findByCompanyId_First(companyId, obc);
140     }
141 
142     public static com.liferay.portal.model.Organization findByCompanyId_Last(
143         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.NoSuchOrganizationException,
145             com.liferay.portal.SystemException {
146         return getPersistence().findByCompanyId_Last(companyId, obc);
147     }
148 
149     public static com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
150         long organizationId, long companyId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.NoSuchOrganizationException,
153             com.liferay.portal.SystemException {
154         return getPersistence()
155                    .findByCompanyId_PrevAndNext(organizationId, companyId, obc);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
159         long companyId) throws com.liferay.portal.SystemException {
160         return getPersistence().findByLocations(companyId);
161     }
162 
163     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
164         long companyId, int start, int end)
165         throws com.liferay.portal.SystemException {
166         return getPersistence().findByLocations(companyId, start, end);
167     }
168 
169     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
170         long companyId, int start, int end,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException {
173         return getPersistence().findByLocations(companyId, start, end, obc);
174     }
175 
176     public static com.liferay.portal.model.Organization findByLocations_First(
177         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.NoSuchOrganizationException,
179             com.liferay.portal.SystemException {
180         return getPersistence().findByLocations_First(companyId, obc);
181     }
182 
183     public static com.liferay.portal.model.Organization findByLocations_Last(
184         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.NoSuchOrganizationException,
186             com.liferay.portal.SystemException {
187         return getPersistence().findByLocations_Last(companyId, obc);
188     }
189 
190     public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
191         long organizationId, long companyId,
192         com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.NoSuchOrganizationException,
194             com.liferay.portal.SystemException {
195         return getPersistence()
196                    .findByLocations_PrevAndNext(organizationId, companyId, obc);
197     }
198 
199     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
200         long companyId, long parentOrganizationId)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().findByC_P(companyId, parentOrganizationId);
203     }
204 
205     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
206         long companyId, long parentOrganizationId, int start, int end)
207         throws com.liferay.portal.SystemException {
208         return getPersistence()
209                    .findByC_P(companyId, parentOrganizationId, start, end);
210     }
211 
212     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
213         long companyId, long parentOrganizationId, int start, int end,
214         com.liferay.portal.kernel.util.OrderByComparator obc)
215         throws com.liferay.portal.SystemException {
216         return getPersistence()
217                    .findByC_P(companyId, parentOrganizationId, start, end, obc);
218     }
219 
220     public static com.liferay.portal.model.Organization findByC_P_First(
221         long companyId, long parentOrganizationId,
222         com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.NoSuchOrganizationException,
224             com.liferay.portal.SystemException {
225         return getPersistence()
226                    .findByC_P_First(companyId, parentOrganizationId, obc);
227     }
228 
229     public static com.liferay.portal.model.Organization findByC_P_Last(
230         long companyId, long parentOrganizationId,
231         com.liferay.portal.kernel.util.OrderByComparator obc)
232         throws com.liferay.portal.NoSuchOrganizationException,
233             com.liferay.portal.SystemException {
234         return getPersistence()
235                    .findByC_P_Last(companyId, parentOrganizationId, obc);
236     }
237 
238     public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
239         long organizationId, long companyId, long parentOrganizationId,
240         com.liferay.portal.kernel.util.OrderByComparator obc)
241         throws com.liferay.portal.NoSuchOrganizationException,
242             com.liferay.portal.SystemException {
243         return getPersistence()
244                    .findByC_P_PrevAndNext(organizationId, companyId,
245             parentOrganizationId, obc);
246     }
247 
248     public static com.liferay.portal.model.Organization findByC_N(
249         long companyId, java.lang.String name)
250         throws com.liferay.portal.NoSuchOrganizationException,
251             com.liferay.portal.SystemException {
252         return getPersistence().findByC_N(companyId, name);
253     }
254 
255     public static com.liferay.portal.model.Organization fetchByC_N(
256         long companyId, java.lang.String name)
257         throws com.liferay.portal.SystemException {
258         return getPersistence().fetchByC_N(companyId, name);
259     }
260 
261     public static com.liferay.portal.model.Organization fetchByC_N(
262         long companyId, java.lang.String name, boolean retrieveFromCache)
263         throws com.liferay.portal.SystemException {
264         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
265     }
266 
267     public static java.util.List<Object> findWithDynamicQuery(
268         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
269         throws com.liferay.portal.SystemException {
270         return getPersistence().findWithDynamicQuery(dynamicQuery);
271     }
272 
273     public static java.util.List<Object> findWithDynamicQuery(
274         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
275         int end) throws com.liferay.portal.SystemException {
276         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
277     }
278 
279     public static java.util.List<com.liferay.portal.model.Organization> findAll()
280         throws com.liferay.portal.SystemException {
281         return getPersistence().findAll();
282     }
283 
284     public static java.util.List<com.liferay.portal.model.Organization> findAll(
285         int start, int end) throws com.liferay.portal.SystemException {
286         return getPersistence().findAll(start, end);
287     }
288 
289     public static java.util.List<com.liferay.portal.model.Organization> findAll(
290         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
291         throws com.liferay.portal.SystemException {
292         return getPersistence().findAll(start, end, obc);
293     }
294 
295     public static void removeByCompanyId(long companyId)
296         throws com.liferay.portal.SystemException {
297         getPersistence().removeByCompanyId(companyId);
298     }
299 
300     public static void removeByLocations(long companyId)
301         throws com.liferay.portal.SystemException {
302         getPersistence().removeByLocations(companyId);
303     }
304 
305     public static void removeByC_P(long companyId, long parentOrganizationId)
306         throws com.liferay.portal.SystemException {
307         getPersistence().removeByC_P(companyId, parentOrganizationId);
308     }
309 
310     public static void removeByC_N(long companyId, java.lang.String name)
311         throws com.liferay.portal.NoSuchOrganizationException,
312             com.liferay.portal.SystemException {
313         getPersistence().removeByC_N(companyId, name);
314     }
315 
316     public static void removeAll() throws com.liferay.portal.SystemException {
317         getPersistence().removeAll();
318     }
319 
320     public static int countByCompanyId(long companyId)
321         throws com.liferay.portal.SystemException {
322         return getPersistence().countByCompanyId(companyId);
323     }
324 
325     public static int countByLocations(long companyId)
326         throws com.liferay.portal.SystemException {
327         return getPersistence().countByLocations(companyId);
328     }
329 
330     public static int countByC_P(long companyId, long parentOrganizationId)
331         throws com.liferay.portal.SystemException {
332         return getPersistence().countByC_P(companyId, parentOrganizationId);
333     }
334 
335     public static int countByC_N(long companyId, java.lang.String name)
336         throws com.liferay.portal.SystemException {
337         return getPersistence().countByC_N(companyId, name);
338     }
339 
340     public static int countAll() throws com.liferay.portal.SystemException {
341         return getPersistence().countAll();
342     }
343 
344     public static java.util.List<com.liferay.portal.model.Group> getGroups(
345         long pk) throws com.liferay.portal.SystemException {
346         return getPersistence().getGroups(pk);
347     }
348 
349     public static java.util.List<com.liferay.portal.model.Group> getGroups(
350         long pk, int start, int end) throws com.liferay.portal.SystemException {
351         return getPersistence().getGroups(pk, start, end);
352     }
353 
354     public static java.util.List<com.liferay.portal.model.Group> getGroups(
355         long pk, int start, int end,
356         com.liferay.portal.kernel.util.OrderByComparator obc)
357         throws com.liferay.portal.SystemException {
358         return getPersistence().getGroups(pk, start, end, obc);
359     }
360 
361     public static int getGroupsSize(long pk)
362         throws com.liferay.portal.SystemException {
363         return getPersistence().getGroupsSize(pk);
364     }
365 
366     public static boolean containsGroup(long pk, long groupPK)
367         throws com.liferay.portal.SystemException {
368         return getPersistence().containsGroup(pk, groupPK);
369     }
370 
371     public static boolean containsGroups(long pk)
372         throws com.liferay.portal.SystemException {
373         return getPersistence().containsGroups(pk);
374     }
375 
376     public static void addGroup(long pk, long groupPK)
377         throws com.liferay.portal.SystemException {
378         getPersistence().addGroup(pk, groupPK);
379     }
380 
381     public static void addGroup(long pk, com.liferay.portal.model.Group group)
382         throws com.liferay.portal.SystemException {
383         getPersistence().addGroup(pk, group);
384     }
385 
386     public static void addGroups(long pk, long[] groupPKs)
387         throws com.liferay.portal.SystemException {
388         getPersistence().addGroups(pk, groupPKs);
389     }
390 
391     public static void addGroups(long pk,
392         java.util.List<com.liferay.portal.model.Group> groups)
393         throws com.liferay.portal.SystemException {
394         getPersistence().addGroups(pk, groups);
395     }
396 
397     public static void clearGroups(long pk)
398         throws com.liferay.portal.SystemException {
399         getPersistence().clearGroups(pk);
400     }
401 
402     public static void removeGroup(long pk, long groupPK)
403         throws com.liferay.portal.SystemException {
404         getPersistence().removeGroup(pk, groupPK);
405     }
406 
407     public static void removeGroup(long pk, com.liferay.portal.model.Group group)
408         throws com.liferay.portal.SystemException {
409         getPersistence().removeGroup(pk, group);
410     }
411 
412     public static void removeGroups(long pk, long[] groupPKs)
413         throws com.liferay.portal.SystemException {
414         getPersistence().removeGroups(pk, groupPKs);
415     }
416 
417     public static void removeGroups(long pk,
418         java.util.List<com.liferay.portal.model.Group> groups)
419         throws com.liferay.portal.SystemException {
420         getPersistence().removeGroups(pk, groups);
421     }
422 
423     public static void setGroups(long pk, long[] groupPKs)
424         throws com.liferay.portal.SystemException {
425         getPersistence().setGroups(pk, groupPKs);
426     }
427 
428     public static void setGroups(long pk,
429         java.util.List<com.liferay.portal.model.Group> groups)
430         throws com.liferay.portal.SystemException {
431         getPersistence().setGroups(pk, groups);
432     }
433 
434     public static java.util.List<com.liferay.portal.model.User> getUsers(
435         long pk) throws com.liferay.portal.SystemException {
436         return getPersistence().getUsers(pk);
437     }
438 
439     public static java.util.List<com.liferay.portal.model.User> getUsers(
440         long pk, int start, int end) throws com.liferay.portal.SystemException {
441         return getPersistence().getUsers(pk, start, end);
442     }
443 
444     public static java.util.List<com.liferay.portal.model.User> getUsers(
445         long pk, int start, int end,
446         com.liferay.portal.kernel.util.OrderByComparator obc)
447         throws com.liferay.portal.SystemException {
448         return getPersistence().getUsers(pk, start, end, obc);
449     }
450 
451     public static int getUsersSize(long pk)
452         throws com.liferay.portal.SystemException {
453         return getPersistence().getUsersSize(pk);
454     }
455 
456     public static boolean containsUser(long pk, long userPK)
457         throws com.liferay.portal.SystemException {
458         return getPersistence().containsUser(pk, userPK);
459     }
460 
461     public static boolean containsUsers(long pk)
462         throws com.liferay.portal.SystemException {
463         return getPersistence().containsUsers(pk);
464     }
465 
466     public static void addUser(long pk, long userPK)
467         throws com.liferay.portal.SystemException {
468         getPersistence().addUser(pk, userPK);
469     }
470 
471     public static void addUser(long pk, com.liferay.portal.model.User user)
472         throws com.liferay.portal.SystemException {
473         getPersistence().addUser(pk, user);
474     }
475 
476     public static void addUsers(long pk, long[] userPKs)
477         throws com.liferay.portal.SystemException {
478         getPersistence().addUsers(pk, userPKs);
479     }
480 
481     public static void addUsers(long pk,
482         java.util.List<com.liferay.portal.model.User> users)
483         throws com.liferay.portal.SystemException {
484         getPersistence().addUsers(pk, users);
485     }
486 
487     public static void clearUsers(long pk)
488         throws com.liferay.portal.SystemException {
489         getPersistence().clearUsers(pk);
490     }
491 
492     public static void removeUser(long pk, long userPK)
493         throws com.liferay.portal.SystemException {
494         getPersistence().removeUser(pk, userPK);
495     }
496 
497     public static void removeUser(long pk, com.liferay.portal.model.User user)
498         throws com.liferay.portal.SystemException {
499         getPersistence().removeUser(pk, user);
500     }
501 
502     public static void removeUsers(long pk, long[] userPKs)
503         throws com.liferay.portal.SystemException {
504         getPersistence().removeUsers(pk, userPKs);
505     }
506 
507     public static void removeUsers(long pk,
508         java.util.List<com.liferay.portal.model.User> users)
509         throws com.liferay.portal.SystemException {
510         getPersistence().removeUsers(pk, users);
511     }
512 
513     public static void setUsers(long pk, long[] userPKs)
514         throws com.liferay.portal.SystemException {
515         getPersistence().setUsers(pk, userPKs);
516     }
517 
518     public static void setUsers(long pk,
519         java.util.List<com.liferay.portal.model.User> users)
520         throws com.liferay.portal.SystemException {
521         getPersistence().setUsers(pk, users);
522     }
523 
524     public static void rebuildTree(long companyId, boolean force)
525         throws com.liferay.portal.SystemException {
526         getPersistence().rebuildTree(companyId, force);
527     }
528 
529     public static OrganizationPersistence getPersistence() {
530         return _persistence;
531     }
532 
533     public void setPersistence(OrganizationPersistence persistence) {
534         _persistence = persistence;
535     }
536 
537     private static OrganizationPersistence _persistence;
538 }