1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
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#clearCache(Organization)
47       */
48      public static void clearCache(Organization organization) {
49          getPersistence().clearCache(organization);
50      }
51  
52      /**
53       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
54       */
55      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
56          throws SystemException {
57          return getPersistence().countWithDynamicQuery(dynamicQuery);
58      }
59  
60      /**
61       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
62       */
63      public static List<Organization> findWithDynamicQuery(
64          DynamicQuery dynamicQuery) throws SystemException {
65          return getPersistence().findWithDynamicQuery(dynamicQuery);
66      }
67  
68      /**
69       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
70       */
71      public static List<Organization> findWithDynamicQuery(
72          DynamicQuery dynamicQuery, int start, int end)
73          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.kernel.exception.SystemException {
112         return getPersistence().remove(organizationId);
113     }
114 
115     public static com.liferay.portal.model.Organization updateImpl(
116         com.liferay.portal.model.Organization organization, boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getPersistence().updateImpl(organization, merge);
119     }
120 
121     public static com.liferay.portal.model.Organization findByPrimaryKey(
122         long organizationId)
123         throws com.liferay.portal.NoSuchOrganizationException,
124             com.liferay.portal.kernel.exception.SystemException {
125         return getPersistence().findByPrimaryKey(organizationId);
126     }
127 
128     public static com.liferay.portal.model.Organization fetchByPrimaryKey(
129         long organizationId)
130         throws com.liferay.portal.kernel.exception.SystemException {
131         return getPersistence().fetchByPrimaryKey(organizationId);
132     }
133 
134     public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
135         long companyId)
136         throws com.liferay.portal.kernel.exception.SystemException {
137         return getPersistence().findByCompanyId(companyId);
138     }
139 
140     public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
141         long companyId, int start, int end)
142         throws com.liferay.portal.kernel.exception.SystemException {
143         return getPersistence().findByCompanyId(companyId, start, end);
144     }
145 
146     public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
147         long companyId, int start, int end,
148         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149         throws com.liferay.portal.kernel.exception.SystemException {
150         return getPersistence()
151                    .findByCompanyId(companyId, start, end, orderByComparator);
152     }
153 
154     public static com.liferay.portal.model.Organization findByCompanyId_First(
155         long companyId,
156         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157         throws com.liferay.portal.NoSuchOrganizationException,
158             com.liferay.portal.kernel.exception.SystemException {
159         return getPersistence()
160                    .findByCompanyId_First(companyId, orderByComparator);
161     }
162 
163     public static com.liferay.portal.model.Organization findByCompanyId_Last(
164         long companyId,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.NoSuchOrganizationException,
167             com.liferay.portal.kernel.exception.SystemException {
168         return getPersistence()
169                    .findByCompanyId_Last(companyId, orderByComparator);
170     }
171 
172     public static com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
173         long organizationId, long companyId,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.NoSuchOrganizationException,
176             com.liferay.portal.kernel.exception.SystemException {
177         return getPersistence()
178                    .findByCompanyId_PrevAndNext(organizationId, companyId,
179             orderByComparator);
180     }
181 
182     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
183         long companyId)
184         throws com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence().findByLocations(companyId);
186     }
187 
188     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
189         long companyId, int start, int end)
190         throws com.liferay.portal.kernel.exception.SystemException {
191         return getPersistence().findByLocations(companyId, start, end);
192     }
193 
194     public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
195         long companyId, int start, int end,
196         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197         throws com.liferay.portal.kernel.exception.SystemException {
198         return getPersistence()
199                    .findByLocations(companyId, start, end, orderByComparator);
200     }
201 
202     public static com.liferay.portal.model.Organization findByLocations_First(
203         long companyId,
204         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
205         throws com.liferay.portal.NoSuchOrganizationException,
206             com.liferay.portal.kernel.exception.SystemException {
207         return getPersistence()
208                    .findByLocations_First(companyId, orderByComparator);
209     }
210 
211     public static com.liferay.portal.model.Organization findByLocations_Last(
212         long companyId,
213         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214         throws com.liferay.portal.NoSuchOrganizationException,
215             com.liferay.portal.kernel.exception.SystemException {
216         return getPersistence()
217                    .findByLocations_Last(companyId, orderByComparator);
218     }
219 
220     public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
221         long organizationId, long companyId,
222         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
223         throws com.liferay.portal.NoSuchOrganizationException,
224             com.liferay.portal.kernel.exception.SystemException {
225         return getPersistence()
226                    .findByLocations_PrevAndNext(organizationId, companyId,
227             orderByComparator);
228     }
229 
230     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
231         long companyId, long parentOrganizationId)
232         throws com.liferay.portal.kernel.exception.SystemException {
233         return getPersistence().findByC_P(companyId, parentOrganizationId);
234     }
235 
236     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
237         long companyId, long parentOrganizationId, int start, int end)
238         throws com.liferay.portal.kernel.exception.SystemException {
239         return getPersistence()
240                    .findByC_P(companyId, parentOrganizationId, start, end);
241     }
242 
243     public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
244         long companyId, long parentOrganizationId, int start, int end,
245         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
246         throws com.liferay.portal.kernel.exception.SystemException {
247         return getPersistence()
248                    .findByC_P(companyId, parentOrganizationId, start, end,
249             orderByComparator);
250     }
251 
252     public static com.liferay.portal.model.Organization findByC_P_First(
253         long companyId, long parentOrganizationId,
254         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
255         throws com.liferay.portal.NoSuchOrganizationException,
256             com.liferay.portal.kernel.exception.SystemException {
257         return getPersistence()
258                    .findByC_P_First(companyId, parentOrganizationId,
259             orderByComparator);
260     }
261 
262     public static com.liferay.portal.model.Organization findByC_P_Last(
263         long companyId, long parentOrganizationId,
264         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265         throws com.liferay.portal.NoSuchOrganizationException,
266             com.liferay.portal.kernel.exception.SystemException {
267         return getPersistence()
268                    .findByC_P_Last(companyId, parentOrganizationId,
269             orderByComparator);
270     }
271 
272     public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
273         long organizationId, long companyId, long parentOrganizationId,
274         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
275         throws com.liferay.portal.NoSuchOrganizationException,
276             com.liferay.portal.kernel.exception.SystemException {
277         return getPersistence()
278                    .findByC_P_PrevAndNext(organizationId, companyId,
279             parentOrganizationId, orderByComparator);
280     }
281 
282     public static com.liferay.portal.model.Organization findByC_N(
283         long companyId, java.lang.String name)
284         throws com.liferay.portal.NoSuchOrganizationException,
285             com.liferay.portal.kernel.exception.SystemException {
286         return getPersistence().findByC_N(companyId, name);
287     }
288 
289     public static com.liferay.portal.model.Organization fetchByC_N(
290         long companyId, java.lang.String name)
291         throws com.liferay.portal.kernel.exception.SystemException {
292         return getPersistence().fetchByC_N(companyId, name);
293     }
294 
295     public static com.liferay.portal.model.Organization fetchByC_N(
296         long companyId, java.lang.String name, boolean retrieveFromCache)
297         throws com.liferay.portal.kernel.exception.SystemException {
298         return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
299     }
300 
301     public static java.util.List<com.liferay.portal.model.Organization> findAll()
302         throws com.liferay.portal.kernel.exception.SystemException {
303         return getPersistence().findAll();
304     }
305 
306     public static java.util.List<com.liferay.portal.model.Organization> findAll(
307         int start, int end)
308         throws com.liferay.portal.kernel.exception.SystemException {
309         return getPersistence().findAll(start, end);
310     }
311 
312     public static java.util.List<com.liferay.portal.model.Organization> findAll(
313         int start, int end,
314         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
315         throws com.liferay.portal.kernel.exception.SystemException {
316         return getPersistence().findAll(start, end, orderByComparator);
317     }
318 
319     public static void removeByCompanyId(long companyId)
320         throws com.liferay.portal.kernel.exception.SystemException {
321         getPersistence().removeByCompanyId(companyId);
322     }
323 
324     public static void removeByLocations(long companyId)
325         throws com.liferay.portal.kernel.exception.SystemException {
326         getPersistence().removeByLocations(companyId);
327     }
328 
329     public static void removeByC_P(long companyId, long parentOrganizationId)
330         throws com.liferay.portal.kernel.exception.SystemException {
331         getPersistence().removeByC_P(companyId, parentOrganizationId);
332     }
333 
334     public static void removeByC_N(long companyId, java.lang.String name)
335         throws com.liferay.portal.NoSuchOrganizationException,
336             com.liferay.portal.kernel.exception.SystemException {
337         getPersistence().removeByC_N(companyId, name);
338     }
339 
340     public static void removeAll()
341         throws com.liferay.portal.kernel.exception.SystemException {
342         getPersistence().removeAll();
343     }
344 
345     public static int countByCompanyId(long companyId)
346         throws com.liferay.portal.kernel.exception.SystemException {
347         return getPersistence().countByCompanyId(companyId);
348     }
349 
350     public static int countByLocations(long companyId)
351         throws com.liferay.portal.kernel.exception.SystemException {
352         return getPersistence().countByLocations(companyId);
353     }
354 
355     public static int countByC_P(long companyId, long parentOrganizationId)
356         throws com.liferay.portal.kernel.exception.SystemException {
357         return getPersistence().countByC_P(companyId, parentOrganizationId);
358     }
359 
360     public static int countByC_N(long companyId, java.lang.String name)
361         throws com.liferay.portal.kernel.exception.SystemException {
362         return getPersistence().countByC_N(companyId, name);
363     }
364 
365     public static int countAll()
366         throws com.liferay.portal.kernel.exception.SystemException {
367         return getPersistence().countAll();
368     }
369 
370     public static java.util.List<com.liferay.portal.model.Group> getGroups(
371         long pk) throws com.liferay.portal.kernel.exception.SystemException {
372         return getPersistence().getGroups(pk);
373     }
374 
375     public static java.util.List<com.liferay.portal.model.Group> getGroups(
376         long pk, int start, int end)
377         throws com.liferay.portal.kernel.exception.SystemException {
378         return getPersistence().getGroups(pk, start, end);
379     }
380 
381     public static java.util.List<com.liferay.portal.model.Group> getGroups(
382         long pk, int start, int end,
383         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
384         throws com.liferay.portal.kernel.exception.SystemException {
385         return getPersistence().getGroups(pk, start, end, orderByComparator);
386     }
387 
388     public static int getGroupsSize(long pk)
389         throws com.liferay.portal.kernel.exception.SystemException {
390         return getPersistence().getGroupsSize(pk);
391     }
392 
393     public static boolean containsGroup(long pk, long groupPK)
394         throws com.liferay.portal.kernel.exception.SystemException {
395         return getPersistence().containsGroup(pk, groupPK);
396     }
397 
398     public static boolean containsGroups(long pk)
399         throws com.liferay.portal.kernel.exception.SystemException {
400         return getPersistence().containsGroups(pk);
401     }
402 
403     public static void addGroup(long pk, long groupPK)
404         throws com.liferay.portal.kernel.exception.SystemException {
405         getPersistence().addGroup(pk, groupPK);
406     }
407 
408     public static void addGroup(long pk, com.liferay.portal.model.Group group)
409         throws com.liferay.portal.kernel.exception.SystemException {
410         getPersistence().addGroup(pk, group);
411     }
412 
413     public static void addGroups(long pk, long[] groupPKs)
414         throws com.liferay.portal.kernel.exception.SystemException {
415         getPersistence().addGroups(pk, groupPKs);
416     }
417 
418     public static void addGroups(long pk,
419         java.util.List<com.liferay.portal.model.Group> groups)
420         throws com.liferay.portal.kernel.exception.SystemException {
421         getPersistence().addGroups(pk, groups);
422     }
423 
424     public static void clearGroups(long pk)
425         throws com.liferay.portal.kernel.exception.SystemException {
426         getPersistence().clearGroups(pk);
427     }
428 
429     public static void removeGroup(long pk, long groupPK)
430         throws com.liferay.portal.kernel.exception.SystemException {
431         getPersistence().removeGroup(pk, groupPK);
432     }
433 
434     public static void removeGroup(long pk, com.liferay.portal.model.Group group)
435         throws com.liferay.portal.kernel.exception.SystemException {
436         getPersistence().removeGroup(pk, group);
437     }
438 
439     public static void removeGroups(long pk, long[] groupPKs)
440         throws com.liferay.portal.kernel.exception.SystemException {
441         getPersistence().removeGroups(pk, groupPKs);
442     }
443 
444     public static void removeGroups(long pk,
445         java.util.List<com.liferay.portal.model.Group> groups)
446         throws com.liferay.portal.kernel.exception.SystemException {
447         getPersistence().removeGroups(pk, groups);
448     }
449 
450     public static void setGroups(long pk, long[] groupPKs)
451         throws com.liferay.portal.kernel.exception.SystemException {
452         getPersistence().setGroups(pk, groupPKs);
453     }
454 
455     public static void setGroups(long pk,
456         java.util.List<com.liferay.portal.model.Group> groups)
457         throws com.liferay.portal.kernel.exception.SystemException {
458         getPersistence().setGroups(pk, groups);
459     }
460 
461     public static java.util.List<com.liferay.portal.model.User> getUsers(
462         long pk) throws com.liferay.portal.kernel.exception.SystemException {
463         return getPersistence().getUsers(pk);
464     }
465 
466     public static java.util.List<com.liferay.portal.model.User> getUsers(
467         long pk, int start, int end)
468         throws com.liferay.portal.kernel.exception.SystemException {
469         return getPersistence().getUsers(pk, start, end);
470     }
471 
472     public static java.util.List<com.liferay.portal.model.User> getUsers(
473         long pk, int start, int end,
474         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
475         throws com.liferay.portal.kernel.exception.SystemException {
476         return getPersistence().getUsers(pk, start, end, orderByComparator);
477     }
478 
479     public static int getUsersSize(long pk)
480         throws com.liferay.portal.kernel.exception.SystemException {
481         return getPersistence().getUsersSize(pk);
482     }
483 
484     public static boolean containsUser(long pk, long userPK)
485         throws com.liferay.portal.kernel.exception.SystemException {
486         return getPersistence().containsUser(pk, userPK);
487     }
488 
489     public static boolean containsUsers(long pk)
490         throws com.liferay.portal.kernel.exception.SystemException {
491         return getPersistence().containsUsers(pk);
492     }
493 
494     public static void addUser(long pk, long userPK)
495         throws com.liferay.portal.kernel.exception.SystemException {
496         getPersistence().addUser(pk, userPK);
497     }
498 
499     public static void addUser(long pk, com.liferay.portal.model.User user)
500         throws com.liferay.portal.kernel.exception.SystemException {
501         getPersistence().addUser(pk, user);
502     }
503 
504     public static void addUsers(long pk, long[] userPKs)
505         throws com.liferay.portal.kernel.exception.SystemException {
506         getPersistence().addUsers(pk, userPKs);
507     }
508 
509     public static void addUsers(long pk,
510         java.util.List<com.liferay.portal.model.User> users)
511         throws com.liferay.portal.kernel.exception.SystemException {
512         getPersistence().addUsers(pk, users);
513     }
514 
515     public static void clearUsers(long pk)
516         throws com.liferay.portal.kernel.exception.SystemException {
517         getPersistence().clearUsers(pk);
518     }
519 
520     public static void removeUser(long pk, long userPK)
521         throws com.liferay.portal.kernel.exception.SystemException {
522         getPersistence().removeUser(pk, userPK);
523     }
524 
525     public static void removeUser(long pk, com.liferay.portal.model.User user)
526         throws com.liferay.portal.kernel.exception.SystemException {
527         getPersistence().removeUser(pk, user);
528     }
529 
530     public static void removeUsers(long pk, long[] userPKs)
531         throws com.liferay.portal.kernel.exception.SystemException {
532         getPersistence().removeUsers(pk, userPKs);
533     }
534 
535     public static void removeUsers(long pk,
536         java.util.List<com.liferay.portal.model.User> users)
537         throws com.liferay.portal.kernel.exception.SystemException {
538         getPersistence().removeUsers(pk, users);
539     }
540 
541     public static void setUsers(long pk, long[] userPKs)
542         throws com.liferay.portal.kernel.exception.SystemException {
543         getPersistence().setUsers(pk, userPKs);
544     }
545 
546     public static void setUsers(long pk,
547         java.util.List<com.liferay.portal.model.User> users)
548         throws com.liferay.portal.kernel.exception.SystemException {
549         getPersistence().setUsers(pk, users);
550     }
551 
552     public static void rebuildTree(long companyId, boolean force)
553         throws com.liferay.portal.kernel.exception.SystemException {
554         getPersistence().rebuildTree(companyId, force);
555     }
556 
557     public static OrganizationPersistence getPersistence() {
558         if (_persistence == null) {
559             _persistence = (OrganizationPersistence)PortalBeanLocatorUtil.locate(OrganizationPersistence.class.getName());
560         }
561 
562         return _persistence;
563     }
564 
565     public void setPersistence(OrganizationPersistence persistence) {
566         _persistence = persistence;
567     }
568 
569     private static OrganizationPersistence _persistence;
570 }