001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.model.Organization;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * @author    Brian Wing Shun Chan
028     * @see       OrganizationPersistence
029     * @see       OrganizationPersistenceImpl
030     * @generated
031     */
032    public class OrganizationUtil {
033            /**
034             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
035             */
036            public static void clearCache() {
037                    getPersistence().clearCache();
038            }
039    
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
042             */
043            public static void clearCache(Organization organization) {
044                    getPersistence().clearCache(organization);
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
049             */
050            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051                    throws SystemException {
052                    return getPersistence().countWithDynamicQuery(dynamicQuery);
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
057             */
058            public static List<Organization> findWithDynamicQuery(
059                    DynamicQuery dynamicQuery) throws SystemException {
060                    return getPersistence().findWithDynamicQuery(dynamicQuery);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
065             */
066            public static List<Organization> findWithDynamicQuery(
067                    DynamicQuery dynamicQuery, int start, int end)
068                    throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<Organization> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery, int start, int end,
077                    OrderByComparator orderByComparator) throws SystemException {
078                    return getPersistence()
079                                       .findWithDynamicQuery(dynamicQuery, start, end,
080                            orderByComparator);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static Organization remove(Organization organization)
087                    throws SystemException {
088                    return getPersistence().remove(organization);
089            }
090    
091            /**
092             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
093             */
094            public static Organization update(Organization organization, boolean merge)
095                    throws SystemException {
096                    return getPersistence().update(organization, merge);
097            }
098    
099            /**
100             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
101             */
102            public static Organization update(Organization organization, boolean merge,
103                    ServiceContext serviceContext) throws SystemException {
104                    return getPersistence().update(organization, merge, serviceContext);
105            }
106    
107            public static void cacheResult(
108                    com.liferay.portal.model.Organization organization) {
109                    getPersistence().cacheResult(organization);
110            }
111    
112            public static void cacheResult(
113                    java.util.List<com.liferay.portal.model.Organization> organizations) {
114                    getPersistence().cacheResult(organizations);
115            }
116    
117            public static com.liferay.portal.model.Organization create(
118                    long organizationId) {
119                    return getPersistence().create(organizationId);
120            }
121    
122            public static com.liferay.portal.model.Organization remove(
123                    long organizationId)
124                    throws com.liferay.portal.NoSuchOrganizationException,
125                            com.liferay.portal.kernel.exception.SystemException {
126                    return getPersistence().remove(organizationId);
127            }
128    
129            public static com.liferay.portal.model.Organization updateImpl(
130                    com.liferay.portal.model.Organization organization, boolean merge)
131                    throws com.liferay.portal.kernel.exception.SystemException {
132                    return getPersistence().updateImpl(organization, merge);
133            }
134    
135            public static com.liferay.portal.model.Organization findByPrimaryKey(
136                    long organizationId)
137                    throws com.liferay.portal.NoSuchOrganizationException,
138                            com.liferay.portal.kernel.exception.SystemException {
139                    return getPersistence().findByPrimaryKey(organizationId);
140            }
141    
142            public static com.liferay.portal.model.Organization fetchByPrimaryKey(
143                    long organizationId)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getPersistence().fetchByPrimaryKey(organizationId);
146            }
147    
148            public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
149                    long companyId)
150                    throws com.liferay.portal.kernel.exception.SystemException {
151                    return getPersistence().findByCompanyId(companyId);
152            }
153    
154            public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
155                    long companyId, int start, int end)
156                    throws com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence().findByCompanyId(companyId, start, end);
158            }
159    
160            public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
161                    long companyId, int start, int end,
162                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence()
165                                       .findByCompanyId(companyId, start, end, orderByComparator);
166            }
167    
168            public static com.liferay.portal.model.Organization findByCompanyId_First(
169                    long companyId,
170                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
171                    throws com.liferay.portal.NoSuchOrganizationException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getPersistence()
174                                       .findByCompanyId_First(companyId, orderByComparator);
175            }
176    
177            public static com.liferay.portal.model.Organization findByCompanyId_Last(
178                    long companyId,
179                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180                    throws com.liferay.portal.NoSuchOrganizationException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return getPersistence()
183                                       .findByCompanyId_Last(companyId, orderByComparator);
184            }
185    
186            public static com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
187                    long organizationId, long companyId,
188                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189                    throws com.liferay.portal.NoSuchOrganizationException,
190                            com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence()
192                                       .findByCompanyId_PrevAndNext(organizationId, companyId,
193                            orderByComparator);
194            }
195    
196            public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
197                    long companyId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().findByLocations(companyId);
200            }
201    
202            public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
203                    long companyId, int start, int end)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getPersistence().findByLocations(companyId, start, end);
206            }
207    
208            public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
209                    long companyId, int start, int end,
210                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence()
213                                       .findByLocations(companyId, start, end, orderByComparator);
214            }
215    
216            public static com.liferay.portal.model.Organization findByLocations_First(
217                    long companyId,
218                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219                    throws com.liferay.portal.NoSuchOrganizationException,
220                            com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence()
222                                       .findByLocations_First(companyId, orderByComparator);
223            }
224    
225            public static com.liferay.portal.model.Organization findByLocations_Last(
226                    long companyId,
227                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228                    throws com.liferay.portal.NoSuchOrganizationException,
229                            com.liferay.portal.kernel.exception.SystemException {
230                    return getPersistence()
231                                       .findByLocations_Last(companyId, orderByComparator);
232            }
233    
234            public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
235                    long organizationId, long companyId,
236                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
237                    throws com.liferay.portal.NoSuchOrganizationException,
238                            com.liferay.portal.kernel.exception.SystemException {
239                    return getPersistence()
240                                       .findByLocations_PrevAndNext(organizationId, companyId,
241                            orderByComparator);
242            }
243    
244            public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
245                    long companyId, long parentOrganizationId)
246                    throws com.liferay.portal.kernel.exception.SystemException {
247                    return getPersistence().findByC_P(companyId, parentOrganizationId);
248            }
249    
250            public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
251                    long companyId, long parentOrganizationId, int start, int end)
252                    throws com.liferay.portal.kernel.exception.SystemException {
253                    return getPersistence()
254                                       .findByC_P(companyId, parentOrganizationId, start, end);
255            }
256    
257            public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
258                    long companyId, long parentOrganizationId, int start, int end,
259                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
260                    throws com.liferay.portal.kernel.exception.SystemException {
261                    return getPersistence()
262                                       .findByC_P(companyId, parentOrganizationId, start, end,
263                            orderByComparator);
264            }
265    
266            public static com.liferay.portal.model.Organization findByC_P_First(
267                    long companyId, long parentOrganizationId,
268                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
269                    throws com.liferay.portal.NoSuchOrganizationException,
270                            com.liferay.portal.kernel.exception.SystemException {
271                    return getPersistence()
272                                       .findByC_P_First(companyId, parentOrganizationId,
273                            orderByComparator);
274            }
275    
276            public static com.liferay.portal.model.Organization findByC_P_Last(
277                    long companyId, long parentOrganizationId,
278                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
279                    throws com.liferay.portal.NoSuchOrganizationException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    return getPersistence()
282                                       .findByC_P_Last(companyId, parentOrganizationId,
283                            orderByComparator);
284            }
285    
286            public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
287                    long organizationId, long companyId, long parentOrganizationId,
288                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
289                    throws com.liferay.portal.NoSuchOrganizationException,
290                            com.liferay.portal.kernel.exception.SystemException {
291                    return getPersistence()
292                                       .findByC_P_PrevAndNext(organizationId, companyId,
293                            parentOrganizationId, orderByComparator);
294            }
295    
296            public static com.liferay.portal.model.Organization findByC_N(
297                    long companyId, java.lang.String name)
298                    throws com.liferay.portal.NoSuchOrganizationException,
299                            com.liferay.portal.kernel.exception.SystemException {
300                    return getPersistence().findByC_N(companyId, name);
301            }
302    
303            public static com.liferay.portal.model.Organization fetchByC_N(
304                    long companyId, java.lang.String name)
305                    throws com.liferay.portal.kernel.exception.SystemException {
306                    return getPersistence().fetchByC_N(companyId, name);
307            }
308    
309            public static com.liferay.portal.model.Organization fetchByC_N(
310                    long companyId, java.lang.String name, boolean retrieveFromCache)
311                    throws com.liferay.portal.kernel.exception.SystemException {
312                    return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
313            }
314    
315            public static java.util.List<com.liferay.portal.model.Organization> findAll()
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    return getPersistence().findAll();
318            }
319    
320            public static java.util.List<com.liferay.portal.model.Organization> findAll(
321                    int start, int end)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence().findAll(start, end);
324            }
325    
326            public static java.util.List<com.liferay.portal.model.Organization> findAll(
327                    int start, int end,
328                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
329                    throws com.liferay.portal.kernel.exception.SystemException {
330                    return getPersistence().findAll(start, end, orderByComparator);
331            }
332    
333            public static void removeByCompanyId(long companyId)
334                    throws com.liferay.portal.kernel.exception.SystemException {
335                    getPersistence().removeByCompanyId(companyId);
336            }
337    
338            public static void removeByLocations(long companyId)
339                    throws com.liferay.portal.kernel.exception.SystemException {
340                    getPersistence().removeByLocations(companyId);
341            }
342    
343            public static void removeByC_P(long companyId, long parentOrganizationId)
344                    throws com.liferay.portal.kernel.exception.SystemException {
345                    getPersistence().removeByC_P(companyId, parentOrganizationId);
346            }
347    
348            public static void removeByC_N(long companyId, java.lang.String name)
349                    throws com.liferay.portal.NoSuchOrganizationException,
350                            com.liferay.portal.kernel.exception.SystemException {
351                    getPersistence().removeByC_N(companyId, name);
352            }
353    
354            public static void removeAll()
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    getPersistence().removeAll();
357            }
358    
359            public static int countByCompanyId(long companyId)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence().countByCompanyId(companyId);
362            }
363    
364            public static int countByLocations(long companyId)
365                    throws com.liferay.portal.kernel.exception.SystemException {
366                    return getPersistence().countByLocations(companyId);
367            }
368    
369            public static int countByC_P(long companyId, long parentOrganizationId)
370                    throws com.liferay.portal.kernel.exception.SystemException {
371                    return getPersistence().countByC_P(companyId, parentOrganizationId);
372            }
373    
374            public static int countByC_N(long companyId, java.lang.String name)
375                    throws com.liferay.portal.kernel.exception.SystemException {
376                    return getPersistence().countByC_N(companyId, name);
377            }
378    
379            public static int countAll()
380                    throws com.liferay.portal.kernel.exception.SystemException {
381                    return getPersistence().countAll();
382            }
383    
384            public static java.util.List<com.liferay.portal.model.Group> getGroups(
385                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
386                    return getPersistence().getGroups(pk);
387            }
388    
389            public static java.util.List<com.liferay.portal.model.Group> getGroups(
390                    long pk, int start, int end)
391                    throws com.liferay.portal.kernel.exception.SystemException {
392                    return getPersistence().getGroups(pk, start, end);
393            }
394    
395            public static java.util.List<com.liferay.portal.model.Group> getGroups(
396                    long pk, int start, int end,
397                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return getPersistence().getGroups(pk, start, end, orderByComparator);
400            }
401    
402            public static int getGroupsSize(long pk)
403                    throws com.liferay.portal.kernel.exception.SystemException {
404                    return getPersistence().getGroupsSize(pk);
405            }
406    
407            public static boolean containsGroup(long pk, long groupPK)
408                    throws com.liferay.portal.kernel.exception.SystemException {
409                    return getPersistence().containsGroup(pk, groupPK);
410            }
411    
412            public static boolean containsGroups(long pk)
413                    throws com.liferay.portal.kernel.exception.SystemException {
414                    return getPersistence().containsGroups(pk);
415            }
416    
417            public static void addGroup(long pk, long groupPK)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    getPersistence().addGroup(pk, groupPK);
420            }
421    
422            public static void addGroup(long pk, com.liferay.portal.model.Group group)
423                    throws com.liferay.portal.kernel.exception.SystemException {
424                    getPersistence().addGroup(pk, group);
425            }
426    
427            public static void addGroups(long pk, long[] groupPKs)
428                    throws com.liferay.portal.kernel.exception.SystemException {
429                    getPersistence().addGroups(pk, groupPKs);
430            }
431    
432            public static void addGroups(long pk,
433                    java.util.List<com.liferay.portal.model.Group> groups)
434                    throws com.liferay.portal.kernel.exception.SystemException {
435                    getPersistence().addGroups(pk, groups);
436            }
437    
438            public static void clearGroups(long pk)
439                    throws com.liferay.portal.kernel.exception.SystemException {
440                    getPersistence().clearGroups(pk);
441            }
442    
443            public static void removeGroup(long pk, long groupPK)
444                    throws com.liferay.portal.kernel.exception.SystemException {
445                    getPersistence().removeGroup(pk, groupPK);
446            }
447    
448            public static void removeGroup(long pk, com.liferay.portal.model.Group group)
449                    throws com.liferay.portal.kernel.exception.SystemException {
450                    getPersistence().removeGroup(pk, group);
451            }
452    
453            public static void removeGroups(long pk, long[] groupPKs)
454                    throws com.liferay.portal.kernel.exception.SystemException {
455                    getPersistence().removeGroups(pk, groupPKs);
456            }
457    
458            public static void removeGroups(long pk,
459                    java.util.List<com.liferay.portal.model.Group> groups)
460                    throws com.liferay.portal.kernel.exception.SystemException {
461                    getPersistence().removeGroups(pk, groups);
462            }
463    
464            public static void setGroups(long pk, long[] groupPKs)
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    getPersistence().setGroups(pk, groupPKs);
467            }
468    
469            public static void setGroups(long pk,
470                    java.util.List<com.liferay.portal.model.Group> groups)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    getPersistence().setGroups(pk, groups);
473            }
474    
475            public static java.util.List<com.liferay.portal.model.User> getUsers(
476                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
477                    return getPersistence().getUsers(pk);
478            }
479    
480            public static java.util.List<com.liferay.portal.model.User> getUsers(
481                    long pk, int start, int end)
482                    throws com.liferay.portal.kernel.exception.SystemException {
483                    return getPersistence().getUsers(pk, start, end);
484            }
485    
486            public static java.util.List<com.liferay.portal.model.User> getUsers(
487                    long pk, int start, int end,
488                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
489                    throws com.liferay.portal.kernel.exception.SystemException {
490                    return getPersistence().getUsers(pk, start, end, orderByComparator);
491            }
492    
493            public static int getUsersSize(long pk)
494                    throws com.liferay.portal.kernel.exception.SystemException {
495                    return getPersistence().getUsersSize(pk);
496            }
497    
498            public static boolean containsUser(long pk, long userPK)
499                    throws com.liferay.portal.kernel.exception.SystemException {
500                    return getPersistence().containsUser(pk, userPK);
501            }
502    
503            public static boolean containsUsers(long pk)
504                    throws com.liferay.portal.kernel.exception.SystemException {
505                    return getPersistence().containsUsers(pk);
506            }
507    
508            public static void addUser(long pk, long userPK)
509                    throws com.liferay.portal.kernel.exception.SystemException {
510                    getPersistence().addUser(pk, userPK);
511            }
512    
513            public static void addUser(long pk, com.liferay.portal.model.User user)
514                    throws com.liferay.portal.kernel.exception.SystemException {
515                    getPersistence().addUser(pk, user);
516            }
517    
518            public static void addUsers(long pk, long[] userPKs)
519                    throws com.liferay.portal.kernel.exception.SystemException {
520                    getPersistence().addUsers(pk, userPKs);
521            }
522    
523            public static void addUsers(long pk,
524                    java.util.List<com.liferay.portal.model.User> users)
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    getPersistence().addUsers(pk, users);
527            }
528    
529            public static void clearUsers(long pk)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    getPersistence().clearUsers(pk);
532            }
533    
534            public static void removeUser(long pk, long userPK)
535                    throws com.liferay.portal.kernel.exception.SystemException {
536                    getPersistence().removeUser(pk, userPK);
537            }
538    
539            public static void removeUser(long pk, com.liferay.portal.model.User user)
540                    throws com.liferay.portal.kernel.exception.SystemException {
541                    getPersistence().removeUser(pk, user);
542            }
543    
544            public static void removeUsers(long pk, long[] userPKs)
545                    throws com.liferay.portal.kernel.exception.SystemException {
546                    getPersistence().removeUsers(pk, userPKs);
547            }
548    
549            public static void removeUsers(long pk,
550                    java.util.List<com.liferay.portal.model.User> users)
551                    throws com.liferay.portal.kernel.exception.SystemException {
552                    getPersistence().removeUsers(pk, users);
553            }
554    
555            public static void setUsers(long pk, long[] userPKs)
556                    throws com.liferay.portal.kernel.exception.SystemException {
557                    getPersistence().setUsers(pk, userPKs);
558            }
559    
560            public static void setUsers(long pk,
561                    java.util.List<com.liferay.portal.model.User> users)
562                    throws com.liferay.portal.kernel.exception.SystemException {
563                    getPersistence().setUsers(pk, users);
564            }
565    
566            public static void rebuildTree(long companyId, boolean force)
567                    throws com.liferay.portal.kernel.exception.SystemException {
568                    getPersistence().rebuildTree(companyId, force);
569            }
570    
571            public static OrganizationPersistence getPersistence() {
572                    if (_persistence == null) {
573                            _persistence = (OrganizationPersistence)PortalBeanLocatorUtil.locate(OrganizationPersistence.class.getName());
574                    }
575    
576                    return _persistence;
577            }
578    
579            public void setPersistence(OrganizationPersistence persistence) {
580                    _persistence = persistence;
581            }
582    
583            private static OrganizationPersistence _persistence;
584    }