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