1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.SystemException;
18  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20  import com.liferay.portal.kernel.util.ReferenceRegistry;
21  import com.liferay.portal.model.Organization;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="OrganizationUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       OrganizationPersistence
35   * @see       OrganizationPersistenceImpl
36   * @generated
37   */
38  public class OrganizationUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(Organization)
48       */
49      public static void clearCache(Organization organization) {
50          getPersistence().clearCache(organization);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static Organization remove(Organization organization)
81          throws SystemException {
82          return getPersistence().remove(organization);
83      }
84  
85      /**
86       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
87       */
88      public static Organization update(Organization organization, boolean merge)
89          throws SystemException {
90          return getPersistence().update(organization, merge);
91      }
92  
93      public static void cacheResult(
94          com.liferay.portal.model.Organization organization) {
95          getPersistence().cacheResult(organization);
96      }
97  
98      public static void cacheResult(
99          java.util.List<com.liferay.portal.model.Organization> organizations) {
100         getPersistence().cacheResult(organizations);
101     }
102 
103     public static com.liferay.portal.model.Organization create(
104         long organizationId) {
105         return getPersistence().create(organizationId);
106     }
107 
108     public static com.liferay.portal.model.Organization remove(
109         long organizationId)
110         throws com.liferay.portal.NoSuchOrganizationException,
111             com.liferay.portal.SystemException {
112         return getPersistence().remove(organizationId);
113     }
114 
115     /**
116      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
117      */
118     public static com.liferay.portal.model.Organization update(
119         com.liferay.portal.model.Organization organization)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().update(organization);
122     }
123 
124     public static com.liferay.portal.model.Organization updateImpl(
125         com.liferay.portal.model.Organization organization, boolean merge)
126         throws com.liferay.portal.SystemException {
127         return getPersistence().updateImpl(organization, merge);
128     }
129 
130     public static com.liferay.portal.model.Organization findByPrimaryKey(
131         long organizationId)
132         throws com.liferay.portal.NoSuchOrganizationException,
133             com.liferay.portal.SystemException {
134         return getPersistence().findByPrimaryKey(organizationId);
135     }
136 
137     public static com.liferay.portal.model.Organization fetchByPrimaryKey(
138         long organizationId) throws com.liferay.portal.SystemException {
139         return getPersistence().fetchByPrimaryKey(organizationId);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
143         long companyId) throws com.liferay.portal.SystemException {
144         return getPersistence().findByCompanyId(companyId);
145     }
146 
147     public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
148         long companyId, int start, int end)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByCompanyId(companyId, start, end);
151     }
152 
153     public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
154         long companyId, int start, int end,
155         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156         throws com.liferay.portal.SystemException {
157         return getPersistence()
158                    .findByCompanyId(companyId, start, end, orderByComparator);
159     }
160 
161     public static com.liferay.portal.model.Organization findByCompanyId_First(
162         long companyId,
163         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164         throws com.liferay.portal.NoSuchOrganizationException,
165             com.liferay.portal.SystemException {
166         return getPersistence()
167                    .findByCompanyId_First(companyId, orderByComparator);
168     }
169 
170     public static com.liferay.portal.model.Organization findByCompanyId_Last(
171         long companyId,
172         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173         throws com.liferay.portal.NoSuchOrganizationException,
174             com.liferay.portal.SystemException {
175         return getPersistence()
176                    .findByCompanyId_Last(companyId, orderByComparator);
177     }
178 
179     public static com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
180         long organizationId, long companyId,
181         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182         throws com.liferay.portal.NoSuchOrganizationException,
183             com.liferay.portal.SystemException {
184         return getPersistence()
185                    .findByCompanyId_PrevAndNext(organizationId, companyId,
186             orderByComparator);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
190         long companyId) throws com.liferay.portal.SystemException {
191         return getPersistence().findByLocations(companyId);
192     }
193 
194     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
195         long companyId, int start, int end)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().findByLocations(companyId, start, end);
198     }
199 
200     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
201         long companyId, int start, int end,
202         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203         throws com.liferay.portal.SystemException {
204         return getPersistence()
205                    .findByLocations(companyId, start, end, orderByComparator);
206     }
207 
208     public static com.liferay.portal.model.Organization findByLocations_First(
209         long companyId,
210         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211         throws com.liferay.portal.NoSuchOrganizationException,
212             com.liferay.portal.SystemException {
213         return getPersistence()
214                    .findByLocations_First(companyId, orderByComparator);
215     }
216 
217     public static com.liferay.portal.model.Organization findByLocations_Last(
218         long companyId,
219         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220         throws com.liferay.portal.NoSuchOrganizationException,
221             com.liferay.portal.SystemException {
222         return getPersistence()
223                    .findByLocations_Last(companyId, orderByComparator);
224     }
225 
226     public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
227         long organizationId, long companyId,
228         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
229         throws com.liferay.portal.NoSuchOrganizationException,
230             com.liferay.portal.SystemException {
231         return getPersistence()
232                    .findByLocations_PrevAndNext(organizationId, companyId,
233             orderByComparator);
234     }
235 
236     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
237         long companyId, long parentOrganizationId)
238         throws com.liferay.portal.SystemException {
239         return getPersistence().findByC_P(companyId, parentOrganizationId);
240     }
241 
242     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
243         long companyId, long parentOrganizationId, int start, int end)
244         throws com.liferay.portal.SystemException {
245         return getPersistence()
246                    .findByC_P(companyId, parentOrganizationId, start, end);
247     }
248 
249     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
250         long companyId, long parentOrganizationId, int start, int end,
251         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252         throws com.liferay.portal.SystemException {
253         return getPersistence()
254                    .findByC_P(companyId, parentOrganizationId, start, end,
255             orderByComparator);
256     }
257 
258     public static com.liferay.portal.model.Organization findByC_P_First(
259         long companyId, long parentOrganizationId,
260         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261         throws com.liferay.portal.NoSuchOrganizationException,
262             com.liferay.portal.SystemException {
263         return getPersistence()
264                    .findByC_P_First(companyId, parentOrganizationId,
265             orderByComparator);
266     }
267 
268     public static com.liferay.portal.model.Organization findByC_P_Last(
269         long companyId, long parentOrganizationId,
270         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
271         throws com.liferay.portal.NoSuchOrganizationException,
272             com.liferay.portal.SystemException {
273         return getPersistence()
274                    .findByC_P_Last(companyId, parentOrganizationId,
275             orderByComparator);
276     }
277 
278     public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
279         long organizationId, long companyId, long parentOrganizationId,
280         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
281         throws com.liferay.portal.NoSuchOrganizationException,
282             com.liferay.portal.SystemException {
283         return getPersistence()
284                    .findByC_P_PrevAndNext(organizationId, companyId,
285             parentOrganizationId, orderByComparator);
286     }
287 
288     public static com.liferay.portal.model.Organization findByC_N(
289         long companyId, java.lang.String name)
290         throws com.liferay.portal.NoSuchOrganizationException,
291             com.liferay.portal.SystemException {
292         return getPersistence().findByC_N(companyId, name);
293     }
294 
295     public static com.liferay.portal.model.Organization fetchByC_N(
296         long companyId, java.lang.String name)
297         throws com.liferay.portal.SystemException {
298         return getPersistence().fetchByC_N(companyId, name);
299     }
300 
301     public static com.liferay.portal.model.Organization fetchByC_N(
302         long companyId, java.lang.String name, boolean retrieveFromCache)
303         throws com.liferay.portal.SystemException {
304         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
305     }
306 
307     public static java.util.List<com.liferay.portal.model.Organization> findAll()
308         throws com.liferay.portal.SystemException {
309         return getPersistence().findAll();
310     }
311 
312     public static java.util.List<com.liferay.portal.model.Organization> findAll(
313         int start, int end) throws com.liferay.portal.SystemException {
314         return getPersistence().findAll(start, end);
315     }
316 
317     public static java.util.List<com.liferay.portal.model.Organization> findAll(
318         int start, int end,
319         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
320         throws com.liferay.portal.SystemException {
321         return getPersistence().findAll(start, end, orderByComparator);
322     }
323 
324     public static void removeByCompanyId(long companyId)
325         throws com.liferay.portal.SystemException {
326         getPersistence().removeByCompanyId(companyId);
327     }
328 
329     public static void removeByLocations(long companyId)
330         throws com.liferay.portal.SystemException {
331         getPersistence().removeByLocations(companyId);
332     }
333 
334     public static void removeByC_P(long companyId, long parentOrganizationId)
335         throws com.liferay.portal.SystemException {
336         getPersistence().removeByC_P(companyId, parentOrganizationId);
337     }
338 
339     public static void removeByC_N(long companyId, java.lang.String name)
340         throws com.liferay.portal.NoSuchOrganizationException,
341             com.liferay.portal.SystemException {
342         getPersistence().removeByC_N(companyId, name);
343     }
344 
345     public static void removeAll() throws com.liferay.portal.SystemException {
346         getPersistence().removeAll();
347     }
348 
349     public static int countByCompanyId(long companyId)
350         throws com.liferay.portal.SystemException {
351         return getPersistence().countByCompanyId(companyId);
352     }
353 
354     public static int countByLocations(long companyId)
355         throws com.liferay.portal.SystemException {
356         return getPersistence().countByLocations(companyId);
357     }
358 
359     public static int countByC_P(long companyId, long parentOrganizationId)
360         throws com.liferay.portal.SystemException {
361         return getPersistence().countByC_P(companyId, parentOrganizationId);
362     }
363 
364     public static int countByC_N(long companyId, java.lang.String name)
365         throws com.liferay.portal.SystemException {
366         return getPersistence().countByC_N(companyId, name);
367     }
368 
369     public static int countAll() throws com.liferay.portal.SystemException {
370         return getPersistence().countAll();
371     }
372 
373     public static java.util.List<com.liferay.portal.model.Group> getGroups(
374         long pk) throws com.liferay.portal.SystemException {
375         return getPersistence().getGroups(pk);
376     }
377 
378     public static java.util.List<com.liferay.portal.model.Group> getGroups(
379         long pk, int start, int end) throws com.liferay.portal.SystemException {
380         return getPersistence().getGroups(pk, start, end);
381     }
382 
383     public static java.util.List<com.liferay.portal.model.Group> getGroups(
384         long pk, int start, int end,
385         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
386         throws com.liferay.portal.SystemException {
387         return getPersistence().getGroups(pk, start, end, orderByComparator);
388     }
389 
390     public static int getGroupsSize(long pk)
391         throws com.liferay.portal.SystemException {
392         return getPersistence().getGroupsSize(pk);
393     }
394 
395     public static boolean containsGroup(long pk, long groupPK)
396         throws com.liferay.portal.SystemException {
397         return getPersistence().containsGroup(pk, groupPK);
398     }
399 
400     public static boolean containsGroups(long pk)
401         throws com.liferay.portal.SystemException {
402         return getPersistence().containsGroups(pk);
403     }
404 
405     public static void addGroup(long pk, long groupPK)
406         throws com.liferay.portal.SystemException {
407         getPersistence().addGroup(pk, groupPK);
408     }
409 
410     public static void addGroup(long pk, com.liferay.portal.model.Group group)
411         throws com.liferay.portal.SystemException {
412         getPersistence().addGroup(pk, group);
413     }
414 
415     public static void addGroups(long pk, long[] groupPKs)
416         throws com.liferay.portal.SystemException {
417         getPersistence().addGroups(pk, groupPKs);
418     }
419 
420     public static void addGroups(long pk,
421         java.util.List<com.liferay.portal.model.Group> groups)
422         throws com.liferay.portal.SystemException {
423         getPersistence().addGroups(pk, groups);
424     }
425 
426     public static void clearGroups(long pk)
427         throws com.liferay.portal.SystemException {
428         getPersistence().clearGroups(pk);
429     }
430 
431     public static void removeGroup(long pk, long groupPK)
432         throws com.liferay.portal.SystemException {
433         getPersistence().removeGroup(pk, groupPK);
434     }
435 
436     public static void removeGroup(long pk, com.liferay.portal.model.Group group)
437         throws com.liferay.portal.SystemException {
438         getPersistence().removeGroup(pk, group);
439     }
440 
441     public static void removeGroups(long pk, long[] groupPKs)
442         throws com.liferay.portal.SystemException {
443         getPersistence().removeGroups(pk, groupPKs);
444     }
445 
446     public static void removeGroups(long pk,
447         java.util.List<com.liferay.portal.model.Group> groups)
448         throws com.liferay.portal.SystemException {
449         getPersistence().removeGroups(pk, groups);
450     }
451 
452     public static void setGroups(long pk, long[] groupPKs)
453         throws com.liferay.portal.SystemException {
454         getPersistence().setGroups(pk, groupPKs);
455     }
456 
457     public static void setGroups(long pk,
458         java.util.List<com.liferay.portal.model.Group> groups)
459         throws com.liferay.portal.SystemException {
460         getPersistence().setGroups(pk, groups);
461     }
462 
463     public static java.util.List<com.liferay.portal.model.User> getUsers(
464         long pk) throws com.liferay.portal.SystemException {
465         return getPersistence().getUsers(pk);
466     }
467 
468     public static java.util.List<com.liferay.portal.model.User> getUsers(
469         long pk, int start, int end) throws com.liferay.portal.SystemException {
470         return getPersistence().getUsers(pk, start, end);
471     }
472 
473     public static java.util.List<com.liferay.portal.model.User> getUsers(
474         long pk, int start, int end,
475         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
476         throws com.liferay.portal.SystemException {
477         return getPersistence().getUsers(pk, start, end, orderByComparator);
478     }
479 
480     public static int getUsersSize(long pk)
481         throws com.liferay.portal.SystemException {
482         return getPersistence().getUsersSize(pk);
483     }
484 
485     public static boolean containsUser(long pk, long userPK)
486         throws com.liferay.portal.SystemException {
487         return getPersistence().containsUser(pk, userPK);
488     }
489 
490     public static boolean containsUsers(long pk)
491         throws com.liferay.portal.SystemException {
492         return getPersistence().containsUsers(pk);
493     }
494 
495     public static void addUser(long pk, long userPK)
496         throws com.liferay.portal.SystemException {
497         getPersistence().addUser(pk, userPK);
498     }
499 
500     public static void addUser(long pk, com.liferay.portal.model.User user)
501         throws com.liferay.portal.SystemException {
502         getPersistence().addUser(pk, user);
503     }
504 
505     public static void addUsers(long pk, long[] userPKs)
506         throws com.liferay.portal.SystemException {
507         getPersistence().addUsers(pk, userPKs);
508     }
509 
510     public static void addUsers(long pk,
511         java.util.List<com.liferay.portal.model.User> users)
512         throws com.liferay.portal.SystemException {
513         getPersistence().addUsers(pk, users);
514     }
515 
516     public static void clearUsers(long pk)
517         throws com.liferay.portal.SystemException {
518         getPersistence().clearUsers(pk);
519     }
520 
521     public static void removeUser(long pk, long userPK)
522         throws com.liferay.portal.SystemException {
523         getPersistence().removeUser(pk, userPK);
524     }
525 
526     public static void removeUser(long pk, com.liferay.portal.model.User user)
527         throws com.liferay.portal.SystemException {
528         getPersistence().removeUser(pk, user);
529     }
530 
531     public static void removeUsers(long pk, long[] userPKs)
532         throws com.liferay.portal.SystemException {
533         getPersistence().removeUsers(pk, userPKs);
534     }
535 
536     public static void removeUsers(long pk,
537         java.util.List<com.liferay.portal.model.User> users)
538         throws com.liferay.portal.SystemException {
539         getPersistence().removeUsers(pk, users);
540     }
541 
542     public static void setUsers(long pk, long[] userPKs)
543         throws com.liferay.portal.SystemException {
544         getPersistence().setUsers(pk, userPKs);
545     }
546 
547     public static void setUsers(long pk,
548         java.util.List<com.liferay.portal.model.User> users)
549         throws com.liferay.portal.SystemException {
550         getPersistence().setUsers(pk, users);
551     }
552 
553     public static void rebuildTree(long companyId, boolean force)
554         throws com.liferay.portal.SystemException {
555         getPersistence().rebuildTree(companyId, force);
556     }
557 
558     public static OrganizationPersistence getPersistence() {
559         if (_persistence == null) {
560             _persistence = (OrganizationPersistence)PortalBeanLocatorUtil.locate(OrganizationPersistence.class.getName());
561 
562             ReferenceRegistry.registerReference(OrganizationUtil.class,
563                 "_persistence");
564         }
565 
566         return _persistence;
567     }
568 
569     public void setPersistence(OrganizationPersistence persistence) {
570         _persistence = persistence;
571 
572         ReferenceRegistry.registerReference(OrganizationUtil.class,
573             "_persistence");
574     }
575 
576     private static OrganizationPersistence _persistence;
577 }