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