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 orderByComparator)
140         throws com.liferay.portal.SystemException {
141         return getPersistence()
142                    .findByCompanyId(companyId, start, end, orderByComparator);
143     }
144 
145     public static com.liferay.portal.model.Organization findByCompanyId_First(
146         long companyId,
147         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
148         throws com.liferay.portal.NoSuchOrganizationException,
149             com.liferay.portal.SystemException {
150         return getPersistence()
151                    .findByCompanyId_First(companyId, orderByComparator);
152     }
153 
154     public static com.liferay.portal.model.Organization findByCompanyId_Last(
155         long companyId,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.NoSuchOrganizationException,
158             com.liferay.portal.SystemException {
159         return getPersistence()
160                    .findByCompanyId_Last(companyId, orderByComparator);
161     }
162 
163     public static com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
164         long organizationId, long companyId,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.NoSuchOrganizationException,
167             com.liferay.portal.SystemException {
168         return getPersistence()
169                    .findByCompanyId_PrevAndNext(organizationId, companyId,
170             orderByComparator);
171     }
172 
173     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
174         long companyId) throws com.liferay.portal.SystemException {
175         return getPersistence().findByLocations(companyId);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
179         long companyId, int start, int end)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findByLocations(companyId, start, end);
182     }
183 
184     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
185         long companyId, int start, int end,
186         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
187         throws com.liferay.portal.SystemException {
188         return getPersistence()
189                    .findByLocations(companyId, start, end, orderByComparator);
190     }
191 
192     public static com.liferay.portal.model.Organization findByLocations_First(
193         long companyId,
194         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
195         throws com.liferay.portal.NoSuchOrganizationException,
196             com.liferay.portal.SystemException {
197         return getPersistence()
198                    .findByLocations_First(companyId, orderByComparator);
199     }
200 
201     public static com.liferay.portal.model.Organization findByLocations_Last(
202         long companyId,
203         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204         throws com.liferay.portal.NoSuchOrganizationException,
205             com.liferay.portal.SystemException {
206         return getPersistence()
207                    .findByLocations_Last(companyId, orderByComparator);
208     }
209 
210     public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
211         long organizationId, long companyId,
212         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
213         throws com.liferay.portal.NoSuchOrganizationException,
214             com.liferay.portal.SystemException {
215         return getPersistence()
216                    .findByLocations_PrevAndNext(organizationId, companyId,
217             orderByComparator);
218     }
219 
220     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
221         long companyId, long parentOrganizationId)
222         throws com.liferay.portal.SystemException {
223         return getPersistence().findByC_P(companyId, parentOrganizationId);
224     }
225 
226     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
227         long companyId, long parentOrganizationId, int start, int end)
228         throws com.liferay.portal.SystemException {
229         return getPersistence()
230                    .findByC_P(companyId, parentOrganizationId, start, end);
231     }
232 
233     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
234         long companyId, long parentOrganizationId, int start, int end,
235         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
236         throws com.liferay.portal.SystemException {
237         return getPersistence()
238                    .findByC_P(companyId, parentOrganizationId, start, end,
239             orderByComparator);
240     }
241 
242     public static com.liferay.portal.model.Organization findByC_P_First(
243         long companyId, long parentOrganizationId,
244         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
245         throws com.liferay.portal.NoSuchOrganizationException,
246             com.liferay.portal.SystemException {
247         return getPersistence()
248                    .findByC_P_First(companyId, parentOrganizationId,
249             orderByComparator);
250     }
251 
252     public static com.liferay.portal.model.Organization findByC_P_Last(
253         long companyId, long parentOrganizationId,
254         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
255         throws com.liferay.portal.NoSuchOrganizationException,
256             com.liferay.portal.SystemException {
257         return getPersistence()
258                    .findByC_P_Last(companyId, parentOrganizationId,
259             orderByComparator);
260     }
261 
262     public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
263         long organizationId, long companyId, long parentOrganizationId,
264         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265         throws com.liferay.portal.NoSuchOrganizationException,
266             com.liferay.portal.SystemException {
267         return getPersistence()
268                    .findByC_P_PrevAndNext(organizationId, companyId,
269             parentOrganizationId, orderByComparator);
270     }
271 
272     public static com.liferay.portal.model.Organization findByC_N(
273         long companyId, java.lang.String name)
274         throws com.liferay.portal.NoSuchOrganizationException,
275             com.liferay.portal.SystemException {
276         return getPersistence().findByC_N(companyId, name);
277     }
278 
279     public static com.liferay.portal.model.Organization fetchByC_N(
280         long companyId, java.lang.String name)
281         throws com.liferay.portal.SystemException {
282         return getPersistence().fetchByC_N(companyId, name);
283     }
284 
285     public static com.liferay.portal.model.Organization fetchByC_N(
286         long companyId, java.lang.String name, boolean retrieveFromCache)
287         throws com.liferay.portal.SystemException {
288         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
289     }
290 
291     public static java.util.List<com.liferay.portal.model.Organization> findAll()
292         throws com.liferay.portal.SystemException {
293         return getPersistence().findAll();
294     }
295 
296     public static java.util.List<com.liferay.portal.model.Organization> findAll(
297         int start, int end) throws com.liferay.portal.SystemException {
298         return getPersistence().findAll(start, end);
299     }
300 
301     public static java.util.List<com.liferay.portal.model.Organization> findAll(
302         int start, int end,
303         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
304         throws com.liferay.portal.SystemException {
305         return getPersistence().findAll(start, end, orderByComparator);
306     }
307 
308     public static void removeByCompanyId(long companyId)
309         throws com.liferay.portal.SystemException {
310         getPersistence().removeByCompanyId(companyId);
311     }
312 
313     public static void removeByLocations(long companyId)
314         throws com.liferay.portal.SystemException {
315         getPersistence().removeByLocations(companyId);
316     }
317 
318     public static void removeByC_P(long companyId, long parentOrganizationId)
319         throws com.liferay.portal.SystemException {
320         getPersistence().removeByC_P(companyId, parentOrganizationId);
321     }
322 
323     public static void removeByC_N(long companyId, java.lang.String name)
324         throws com.liferay.portal.NoSuchOrganizationException,
325             com.liferay.portal.SystemException {
326         getPersistence().removeByC_N(companyId, name);
327     }
328 
329     public static void removeAll() throws com.liferay.portal.SystemException {
330         getPersistence().removeAll();
331     }
332 
333     public static int countByCompanyId(long companyId)
334         throws com.liferay.portal.SystemException {
335         return getPersistence().countByCompanyId(companyId);
336     }
337 
338     public static int countByLocations(long companyId)
339         throws com.liferay.portal.SystemException {
340         return getPersistence().countByLocations(companyId);
341     }
342 
343     public static int countByC_P(long companyId, long parentOrganizationId)
344         throws com.liferay.portal.SystemException {
345         return getPersistence().countByC_P(companyId, parentOrganizationId);
346     }
347 
348     public static int countByC_N(long companyId, java.lang.String name)
349         throws com.liferay.portal.SystemException {
350         return getPersistence().countByC_N(companyId, name);
351     }
352 
353     public static int countAll() throws com.liferay.portal.SystemException {
354         return getPersistence().countAll();
355     }
356 
357     public static java.util.List<com.liferay.portal.model.Group> getGroups(
358         long pk) throws com.liferay.portal.SystemException {
359         return getPersistence().getGroups(pk);
360     }
361 
362     public static java.util.List<com.liferay.portal.model.Group> getGroups(
363         long pk, int start, int end) throws com.liferay.portal.SystemException {
364         return getPersistence().getGroups(pk, start, end);
365     }
366 
367     public static java.util.List<com.liferay.portal.model.Group> getGroups(
368         long pk, int start, int end,
369         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
370         throws com.liferay.portal.SystemException {
371         return getPersistence().getGroups(pk, start, end, orderByComparator);
372     }
373 
374     public static int getGroupsSize(long pk)
375         throws com.liferay.portal.SystemException {
376         return getPersistence().getGroupsSize(pk);
377     }
378 
379     public static boolean containsGroup(long pk, long groupPK)
380         throws com.liferay.portal.SystemException {
381         return getPersistence().containsGroup(pk, groupPK);
382     }
383 
384     public static boolean containsGroups(long pk)
385         throws com.liferay.portal.SystemException {
386         return getPersistence().containsGroups(pk);
387     }
388 
389     public static void addGroup(long pk, long groupPK)
390         throws com.liferay.portal.SystemException {
391         getPersistence().addGroup(pk, groupPK);
392     }
393 
394     public static void addGroup(long pk, com.liferay.portal.model.Group group)
395         throws com.liferay.portal.SystemException {
396         getPersistence().addGroup(pk, group);
397     }
398 
399     public static void addGroups(long pk, long[] groupPKs)
400         throws com.liferay.portal.SystemException {
401         getPersistence().addGroups(pk, groupPKs);
402     }
403 
404     public static void addGroups(long pk,
405         java.util.List<com.liferay.portal.model.Group> groups)
406         throws com.liferay.portal.SystemException {
407         getPersistence().addGroups(pk, groups);
408     }
409 
410     public static void clearGroups(long pk)
411         throws com.liferay.portal.SystemException {
412         getPersistence().clearGroups(pk);
413     }
414 
415     public static void removeGroup(long pk, long groupPK)
416         throws com.liferay.portal.SystemException {
417         getPersistence().removeGroup(pk, groupPK);
418     }
419 
420     public static void removeGroup(long pk, com.liferay.portal.model.Group group)
421         throws com.liferay.portal.SystemException {
422         getPersistence().removeGroup(pk, group);
423     }
424 
425     public static void removeGroups(long pk, long[] groupPKs)
426         throws com.liferay.portal.SystemException {
427         getPersistence().removeGroups(pk, groupPKs);
428     }
429 
430     public static void removeGroups(long pk,
431         java.util.List<com.liferay.portal.model.Group> groups)
432         throws com.liferay.portal.SystemException {
433         getPersistence().removeGroups(pk, groups);
434     }
435 
436     public static void setGroups(long pk, long[] groupPKs)
437         throws com.liferay.portal.SystemException {
438         getPersistence().setGroups(pk, groupPKs);
439     }
440 
441     public static void setGroups(long pk,
442         java.util.List<com.liferay.portal.model.Group> groups)
443         throws com.liferay.portal.SystemException {
444         getPersistence().setGroups(pk, groups);
445     }
446 
447     public static java.util.List<com.liferay.portal.model.User> getUsers(
448         long pk) throws com.liferay.portal.SystemException {
449         return getPersistence().getUsers(pk);
450     }
451 
452     public static java.util.List<com.liferay.portal.model.User> getUsers(
453         long pk, int start, int end) throws com.liferay.portal.SystemException {
454         return getPersistence().getUsers(pk, start, end);
455     }
456 
457     public static java.util.List<com.liferay.portal.model.User> getUsers(
458         long pk, int start, int end,
459         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
460         throws com.liferay.portal.SystemException {
461         return getPersistence().getUsers(pk, start, end, orderByComparator);
462     }
463 
464     public static int getUsersSize(long pk)
465         throws com.liferay.portal.SystemException {
466         return getPersistence().getUsersSize(pk);
467     }
468 
469     public static boolean containsUser(long pk, long userPK)
470         throws com.liferay.portal.SystemException {
471         return getPersistence().containsUser(pk, userPK);
472     }
473 
474     public static boolean containsUsers(long pk)
475         throws com.liferay.portal.SystemException {
476         return getPersistence().containsUsers(pk);
477     }
478 
479     public static void addUser(long pk, long userPK)
480         throws com.liferay.portal.SystemException {
481         getPersistence().addUser(pk, userPK);
482     }
483 
484     public static void addUser(long pk, com.liferay.portal.model.User user)
485         throws com.liferay.portal.SystemException {
486         getPersistence().addUser(pk, user);
487     }
488 
489     public static void addUsers(long pk, long[] userPKs)
490         throws com.liferay.portal.SystemException {
491         getPersistence().addUsers(pk, userPKs);
492     }
493 
494     public static void addUsers(long pk,
495         java.util.List<com.liferay.portal.model.User> users)
496         throws com.liferay.portal.SystemException {
497         getPersistence().addUsers(pk, users);
498     }
499 
500     public static void clearUsers(long pk)
501         throws com.liferay.portal.SystemException {
502         getPersistence().clearUsers(pk);
503     }
504 
505     public static void removeUser(long pk, long userPK)
506         throws com.liferay.portal.SystemException {
507         getPersistence().removeUser(pk, userPK);
508     }
509 
510     public static void removeUser(long pk, com.liferay.portal.model.User user)
511         throws com.liferay.portal.SystemException {
512         getPersistence().removeUser(pk, user);
513     }
514 
515     public static void removeUsers(long pk, long[] userPKs)
516         throws com.liferay.portal.SystemException {
517         getPersistence().removeUsers(pk, userPKs);
518     }
519 
520     public static void removeUsers(long pk,
521         java.util.List<com.liferay.portal.model.User> users)
522         throws com.liferay.portal.SystemException {
523         getPersistence().removeUsers(pk, users);
524     }
525 
526     public static void setUsers(long pk, long[] userPKs)
527         throws com.liferay.portal.SystemException {
528         getPersistence().setUsers(pk, userPKs);
529     }
530 
531     public static void setUsers(long pk,
532         java.util.List<com.liferay.portal.model.User> users)
533         throws com.liferay.portal.SystemException {
534         getPersistence().setUsers(pk, users);
535     }
536 
537     public static void rebuildTree(long companyId, boolean force)
538         throws com.liferay.portal.SystemException {
539         getPersistence().rebuildTree(companyId, force);
540     }
541 
542     public static OrganizationPersistence getPersistence() {
543         if (_persistence == null) {
544             _persistence = (OrganizationPersistence)PortalBeanLocatorUtil.locate(OrganizationPersistence.class.getName());
545         }
546 
547         return _persistence;
548     }
549 
550     public void setPersistence(OrganizationPersistence persistence) {
551         _persistence = persistence;
552     }
553 
554     private static OrganizationPersistence _persistence;
555 }