001    /**
002     * Copyright (c) 2000-2012 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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.Organization;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the organization service. This utility wraps {@link OrganizationPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see OrganizationPersistence
036     * @see OrganizationPersistenceImpl
037     * @generated
038     */
039    public class OrganizationUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(Organization organization) {
057                    getPersistence().clearCache(organization);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<Organization> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<Organization> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<Organization> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
098             */
099            public static Organization update(Organization organization, boolean merge)
100                    throws SystemException {
101                    return getPersistence().update(organization, merge);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
106             */
107            public static Organization update(Organization organization, boolean merge,
108                    ServiceContext serviceContext) throws SystemException {
109                    return getPersistence().update(organization, merge, serviceContext);
110            }
111    
112            /**
113            * Caches the organization in the entity cache if it is enabled.
114            *
115            * @param organization the organization
116            */
117            public static void cacheResult(
118                    com.liferay.portal.model.Organization organization) {
119                    getPersistence().cacheResult(organization);
120            }
121    
122            /**
123            * Caches the organizations in the entity cache if it is enabled.
124            *
125            * @param organizations the organizations
126            */
127            public static void cacheResult(
128                    java.util.List<com.liferay.portal.model.Organization> organizations) {
129                    getPersistence().cacheResult(organizations);
130            }
131    
132            /**
133            * Creates a new organization with the primary key. Does not add the organization to the database.
134            *
135            * @param organizationId the primary key for the new organization
136            * @return the new organization
137            */
138            public static com.liferay.portal.model.Organization create(
139                    long organizationId) {
140                    return getPersistence().create(organizationId);
141            }
142    
143            /**
144            * Removes the organization with the primary key from the database. Also notifies the appropriate model listeners.
145            *
146            * @param organizationId the primary key of the organization
147            * @return the organization that was removed
148            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
149            * @throws SystemException if a system exception occurred
150            */
151            public static com.liferay.portal.model.Organization remove(
152                    long organizationId)
153                    throws com.liferay.portal.NoSuchOrganizationException,
154                            com.liferay.portal.kernel.exception.SystemException {
155                    return getPersistence().remove(organizationId);
156            }
157    
158            public static com.liferay.portal.model.Organization updateImpl(
159                    com.liferay.portal.model.Organization organization, boolean merge)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence().updateImpl(organization, merge);
162            }
163    
164            /**
165            * Returns the organization with the primary key or throws a {@link com.liferay.portal.NoSuchOrganizationException} if it could not be found.
166            *
167            * @param organizationId the primary key of the organization
168            * @return the organization
169            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public static com.liferay.portal.model.Organization findByPrimaryKey(
173                    long organizationId)
174                    throws com.liferay.portal.NoSuchOrganizationException,
175                            com.liferay.portal.kernel.exception.SystemException {
176                    return getPersistence().findByPrimaryKey(organizationId);
177            }
178    
179            /**
180            * Returns the organization with the primary key or returns <code>null</code> if it could not be found.
181            *
182            * @param organizationId the primary key of the organization
183            * @return the organization, or <code>null</code> if a organization with the primary key could not be found
184            * @throws SystemException if a system exception occurred
185            */
186            public static com.liferay.portal.model.Organization fetchByPrimaryKey(
187                    long organizationId)
188                    throws com.liferay.portal.kernel.exception.SystemException {
189                    return getPersistence().fetchByPrimaryKey(organizationId);
190            }
191    
192            /**
193            * Returns all the organizations where companyId = &#63;.
194            *
195            * @param companyId the company ID
196            * @return the matching organizations
197            * @throws SystemException if a system exception occurred
198            */
199            public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
200                    long companyId)
201                    throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence().findByCompanyId(companyId);
203            }
204    
205            /**
206            * Returns a range of all the organizations where companyId = &#63;.
207            *
208            * <p>
209            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
210            * </p>
211            *
212            * @param companyId the company ID
213            * @param start the lower bound of the range of organizations
214            * @param end the upper bound of the range of organizations (not inclusive)
215            * @return the range of matching organizations
216            * @throws SystemException if a system exception occurred
217            */
218            public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
219                    long companyId, int start, int end)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().findByCompanyId(companyId, start, end);
222            }
223    
224            /**
225            * Returns an ordered range of all the organizations where companyId = &#63;.
226            *
227            * <p>
228            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
229            * </p>
230            *
231            * @param companyId the company ID
232            * @param start the lower bound of the range of organizations
233            * @param end the upper bound of the range of organizations (not inclusive)
234            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
235            * @return the ordered range of matching organizations
236            * @throws SystemException if a system exception occurred
237            */
238            public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
239                    long companyId, int start, int end,
240                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return getPersistence()
243                                       .findByCompanyId(companyId, start, end, orderByComparator);
244            }
245    
246            /**
247            * Returns the first organization in the ordered set where companyId = &#63;.
248            *
249            * <p>
250            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
251            * </p>
252            *
253            * @param companyId the company ID
254            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
255            * @return the first matching organization
256            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
257            * @throws SystemException if a system exception occurred
258            */
259            public static com.liferay.portal.model.Organization findByCompanyId_First(
260                    long companyId,
261                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262                    throws com.liferay.portal.NoSuchOrganizationException,
263                            com.liferay.portal.kernel.exception.SystemException {
264                    return getPersistence()
265                                       .findByCompanyId_First(companyId, orderByComparator);
266            }
267    
268            /**
269            * Returns the last organization in the ordered set where companyId = &#63;.
270            *
271            * <p>
272            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
273            * </p>
274            *
275            * @param companyId the company ID
276            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
277            * @return the last matching organization
278            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
279            * @throws SystemException if a system exception occurred
280            */
281            public static com.liferay.portal.model.Organization findByCompanyId_Last(
282                    long companyId,
283                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
284                    throws com.liferay.portal.NoSuchOrganizationException,
285                            com.liferay.portal.kernel.exception.SystemException {
286                    return getPersistence()
287                                       .findByCompanyId_Last(companyId, orderByComparator);
288            }
289    
290            /**
291            * Returns the organizations before and after the current organization in the ordered set where companyId = &#63;.
292            *
293            * <p>
294            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
295            * </p>
296            *
297            * @param organizationId the primary key of the current organization
298            * @param companyId the company ID
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the previous, current, and next organization
301            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
305                    long organizationId, long companyId,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.NoSuchOrganizationException,
308                            com.liferay.portal.kernel.exception.SystemException {
309                    return getPersistence()
310                                       .findByCompanyId_PrevAndNext(organizationId, companyId,
311                            orderByComparator);
312            }
313    
314            /**
315            * Returns all the organizations that the user has permission to view where companyId = &#63;.
316            *
317            * @param companyId the company ID
318            * @return the matching organizations that the user has permission to view
319            * @throws SystemException if a system exception occurred
320            */
321            public static java.util.List<com.liferay.portal.model.Organization> filterFindByCompanyId(
322                    long companyId)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    return getPersistence().filterFindByCompanyId(companyId);
325            }
326    
327            /**
328            * Returns a range of all the organizations that the user has permission to view where companyId = &#63;.
329            *
330            * <p>
331            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
332            * </p>
333            *
334            * @param companyId the company ID
335            * @param start the lower bound of the range of organizations
336            * @param end the upper bound of the range of organizations (not inclusive)
337            * @return the range of matching organizations that the user has permission to view
338            * @throws SystemException if a system exception occurred
339            */
340            public static java.util.List<com.liferay.portal.model.Organization> filterFindByCompanyId(
341                    long companyId, int start, int end)
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    return getPersistence().filterFindByCompanyId(companyId, start, end);
344            }
345    
346            /**
347            * Returns an ordered range of all the organizations that the user has permissions to view where companyId = &#63;.
348            *
349            * <p>
350            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
351            * </p>
352            *
353            * @param companyId the company ID
354            * @param start the lower bound of the range of organizations
355            * @param end the upper bound of the range of organizations (not inclusive)
356            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
357            * @return the ordered range of matching organizations that the user has permission to view
358            * @throws SystemException if a system exception occurred
359            */
360            public static java.util.List<com.liferay.portal.model.Organization> filterFindByCompanyId(
361                    long companyId, int start, int end,
362                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363                    throws com.liferay.portal.kernel.exception.SystemException {
364                    return getPersistence()
365                                       .filterFindByCompanyId(companyId, start, end,
366                            orderByComparator);
367            }
368    
369            /**
370            * Returns the organizations before and after the current organization in the ordered set of organizations that the user has permission to view where companyId = &#63;.
371            *
372            * @param organizationId the primary key of the current organization
373            * @param companyId the company ID
374            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
375            * @return the previous, current, and next organization
376            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
377            * @throws SystemException if a system exception occurred
378            */
379            public static com.liferay.portal.model.Organization[] filterFindByCompanyId_PrevAndNext(
380                    long organizationId, long companyId,
381                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
382                    throws com.liferay.portal.NoSuchOrganizationException,
383                            com.liferay.portal.kernel.exception.SystemException {
384                    return getPersistence()
385                                       .filterFindByCompanyId_PrevAndNext(organizationId,
386                            companyId, orderByComparator);
387            }
388    
389            /**
390            * Returns all the organizations where companyId = &#63;.
391            *
392            * @param companyId the company ID
393            * @return the matching organizations
394            * @throws SystemException if a system exception occurred
395            */
396            public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
397                    long companyId)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return getPersistence().findByLocations(companyId);
400            }
401    
402            /**
403            * Returns a range of all the organizations where companyId = &#63;.
404            *
405            * <p>
406            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
407            * </p>
408            *
409            * @param companyId the company ID
410            * @param start the lower bound of the range of organizations
411            * @param end the upper bound of the range of organizations (not inclusive)
412            * @return the range of matching organizations
413            * @throws SystemException if a system exception occurred
414            */
415            public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
416                    long companyId, int start, int end)
417                    throws com.liferay.portal.kernel.exception.SystemException {
418                    return getPersistence().findByLocations(companyId, start, end);
419            }
420    
421            /**
422            * Returns an ordered range of all the organizations where companyId = &#63;.
423            *
424            * <p>
425            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
426            * </p>
427            *
428            * @param companyId the company ID
429            * @param start the lower bound of the range of organizations
430            * @param end the upper bound of the range of organizations (not inclusive)
431            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
432            * @return the ordered range of matching organizations
433            * @throws SystemException if a system exception occurred
434            */
435            public static java.util.List<com.liferay.portal.model.Organization> findByLocations(
436                    long companyId, int start, int end,
437                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
438                    throws com.liferay.portal.kernel.exception.SystemException {
439                    return getPersistence()
440                                       .findByLocations(companyId, start, end, orderByComparator);
441            }
442    
443            /**
444            * Returns the first organization in the ordered set where companyId = &#63;.
445            *
446            * <p>
447            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
448            * </p>
449            *
450            * @param companyId the company ID
451            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
452            * @return the first matching organization
453            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
454            * @throws SystemException if a system exception occurred
455            */
456            public static com.liferay.portal.model.Organization findByLocations_First(
457                    long companyId,
458                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
459                    throws com.liferay.portal.NoSuchOrganizationException,
460                            com.liferay.portal.kernel.exception.SystemException {
461                    return getPersistence()
462                                       .findByLocations_First(companyId, orderByComparator);
463            }
464    
465            /**
466            * Returns the last organization in the ordered set where companyId = &#63;.
467            *
468            * <p>
469            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
470            * </p>
471            *
472            * @param companyId the company ID
473            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
474            * @return the last matching organization
475            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
476            * @throws SystemException if a system exception occurred
477            */
478            public static com.liferay.portal.model.Organization findByLocations_Last(
479                    long companyId,
480                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
481                    throws com.liferay.portal.NoSuchOrganizationException,
482                            com.liferay.portal.kernel.exception.SystemException {
483                    return getPersistence()
484                                       .findByLocations_Last(companyId, orderByComparator);
485            }
486    
487            /**
488            * Returns the organizations before and after the current organization in the ordered set where companyId = &#63;.
489            *
490            * <p>
491            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
492            * </p>
493            *
494            * @param organizationId the primary key of the current organization
495            * @param companyId the company ID
496            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
497            * @return the previous, current, and next organization
498            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
499            * @throws SystemException if a system exception occurred
500            */
501            public static com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
502                    long organizationId, long companyId,
503                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
504                    throws com.liferay.portal.NoSuchOrganizationException,
505                            com.liferay.portal.kernel.exception.SystemException {
506                    return getPersistence()
507                                       .findByLocations_PrevAndNext(organizationId, companyId,
508                            orderByComparator);
509            }
510    
511            /**
512            * Returns all the organizations that the user has permission to view where companyId = &#63;.
513            *
514            * @param companyId the company ID
515            * @return the matching organizations that the user has permission to view
516            * @throws SystemException if a system exception occurred
517            */
518            public static java.util.List<com.liferay.portal.model.Organization> filterFindByLocations(
519                    long companyId)
520                    throws com.liferay.portal.kernel.exception.SystemException {
521                    return getPersistence().filterFindByLocations(companyId);
522            }
523    
524            /**
525            * Returns a range of all the organizations that the user has permission to view where companyId = &#63;.
526            *
527            * <p>
528            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
529            * </p>
530            *
531            * @param companyId the company ID
532            * @param start the lower bound of the range of organizations
533            * @param end the upper bound of the range of organizations (not inclusive)
534            * @return the range of matching organizations that the user has permission to view
535            * @throws SystemException if a system exception occurred
536            */
537            public static java.util.List<com.liferay.portal.model.Organization> filterFindByLocations(
538                    long companyId, int start, int end)
539                    throws com.liferay.portal.kernel.exception.SystemException {
540                    return getPersistence().filterFindByLocations(companyId, start, end);
541            }
542    
543            /**
544            * Returns an ordered range of all the organizations that the user has permissions to view where companyId = &#63;.
545            *
546            * <p>
547            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
548            * </p>
549            *
550            * @param companyId the company ID
551            * @param start the lower bound of the range of organizations
552            * @param end the upper bound of the range of organizations (not inclusive)
553            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
554            * @return the ordered range of matching organizations that the user has permission to view
555            * @throws SystemException if a system exception occurred
556            */
557            public static java.util.List<com.liferay.portal.model.Organization> filterFindByLocations(
558                    long companyId, int start, int end,
559                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
560                    throws com.liferay.portal.kernel.exception.SystemException {
561                    return getPersistence()
562                                       .filterFindByLocations(companyId, start, end,
563                            orderByComparator);
564            }
565    
566            /**
567            * Returns the organizations before and after the current organization in the ordered set of organizations that the user has permission to view where companyId = &#63;.
568            *
569            * @param organizationId the primary key of the current organization
570            * @param companyId the company ID
571            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
572            * @return the previous, current, and next organization
573            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
574            * @throws SystemException if a system exception occurred
575            */
576            public static com.liferay.portal.model.Organization[] filterFindByLocations_PrevAndNext(
577                    long organizationId, long companyId,
578                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
579                    throws com.liferay.portal.NoSuchOrganizationException,
580                            com.liferay.portal.kernel.exception.SystemException {
581                    return getPersistence()
582                                       .filterFindByLocations_PrevAndNext(organizationId,
583                            companyId, orderByComparator);
584            }
585    
586            /**
587            * Returns all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
588            *
589            * @param companyId the company ID
590            * @param parentOrganizationId the parent organization ID
591            * @return the matching organizations
592            * @throws SystemException if a system exception occurred
593            */
594            public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
595                    long companyId, long parentOrganizationId)
596                    throws com.liferay.portal.kernel.exception.SystemException {
597                    return getPersistence().findByC_P(companyId, parentOrganizationId);
598            }
599    
600            /**
601            * Returns a range of all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
602            *
603            * <p>
604            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
605            * </p>
606            *
607            * @param companyId the company ID
608            * @param parentOrganizationId the parent organization ID
609            * @param start the lower bound of the range of organizations
610            * @param end the upper bound of the range of organizations (not inclusive)
611            * @return the range of matching organizations
612            * @throws SystemException if a system exception occurred
613            */
614            public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
615                    long companyId, long parentOrganizationId, int start, int end)
616                    throws com.liferay.portal.kernel.exception.SystemException {
617                    return getPersistence()
618                                       .findByC_P(companyId, parentOrganizationId, start, end);
619            }
620    
621            /**
622            * Returns an ordered range of all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
623            *
624            * <p>
625            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
626            * </p>
627            *
628            * @param companyId the company ID
629            * @param parentOrganizationId the parent organization ID
630            * @param start the lower bound of the range of organizations
631            * @param end the upper bound of the range of organizations (not inclusive)
632            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
633            * @return the ordered range of matching organizations
634            * @throws SystemException if a system exception occurred
635            */
636            public static java.util.List<com.liferay.portal.model.Organization> findByC_P(
637                    long companyId, long parentOrganizationId, int start, int end,
638                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
639                    throws com.liferay.portal.kernel.exception.SystemException {
640                    return getPersistence()
641                                       .findByC_P(companyId, parentOrganizationId, start, end,
642                            orderByComparator);
643            }
644    
645            /**
646            * Returns the first organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
647            *
648            * <p>
649            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
650            * </p>
651            *
652            * @param companyId the company ID
653            * @param parentOrganizationId the parent organization ID
654            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
655            * @return the first matching organization
656            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
657            * @throws SystemException if a system exception occurred
658            */
659            public static com.liferay.portal.model.Organization findByC_P_First(
660                    long companyId, long parentOrganizationId,
661                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
662                    throws com.liferay.portal.NoSuchOrganizationException,
663                            com.liferay.portal.kernel.exception.SystemException {
664                    return getPersistence()
665                                       .findByC_P_First(companyId, parentOrganizationId,
666                            orderByComparator);
667            }
668    
669            /**
670            * Returns the last organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
671            *
672            * <p>
673            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
674            * </p>
675            *
676            * @param companyId the company ID
677            * @param parentOrganizationId the parent organization ID
678            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
679            * @return the last matching organization
680            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
681            * @throws SystemException if a system exception occurred
682            */
683            public static com.liferay.portal.model.Organization findByC_P_Last(
684                    long companyId, long parentOrganizationId,
685                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
686                    throws com.liferay.portal.NoSuchOrganizationException,
687                            com.liferay.portal.kernel.exception.SystemException {
688                    return getPersistence()
689                                       .findByC_P_Last(companyId, parentOrganizationId,
690                            orderByComparator);
691            }
692    
693            /**
694            * Returns the organizations before and after the current organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
695            *
696            * <p>
697            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
698            * </p>
699            *
700            * @param organizationId the primary key of the current organization
701            * @param companyId the company ID
702            * @param parentOrganizationId the parent organization ID
703            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
704            * @return the previous, current, and next organization
705            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
706            * @throws SystemException if a system exception occurred
707            */
708            public static com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
709                    long organizationId, long companyId, long parentOrganizationId,
710                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
711                    throws com.liferay.portal.NoSuchOrganizationException,
712                            com.liferay.portal.kernel.exception.SystemException {
713                    return getPersistence()
714                                       .findByC_P_PrevAndNext(organizationId, companyId,
715                            parentOrganizationId, orderByComparator);
716            }
717    
718            /**
719            * Returns all the organizations that the user has permission to view where companyId = &#63; and parentOrganizationId = &#63;.
720            *
721            * @param companyId the company ID
722            * @param parentOrganizationId the parent organization ID
723            * @return the matching organizations that the user has permission to view
724            * @throws SystemException if a system exception occurred
725            */
726            public static java.util.List<com.liferay.portal.model.Organization> filterFindByC_P(
727                    long companyId, long parentOrganizationId)
728                    throws com.liferay.portal.kernel.exception.SystemException {
729                    return getPersistence().filterFindByC_P(companyId, parentOrganizationId);
730            }
731    
732            /**
733            * Returns a range of all the organizations that the user has permission to view where companyId = &#63; and parentOrganizationId = &#63;.
734            *
735            * <p>
736            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
737            * </p>
738            *
739            * @param companyId the company ID
740            * @param parentOrganizationId the parent organization ID
741            * @param start the lower bound of the range of organizations
742            * @param end the upper bound of the range of organizations (not inclusive)
743            * @return the range of matching organizations that the user has permission to view
744            * @throws SystemException if a system exception occurred
745            */
746            public static java.util.List<com.liferay.portal.model.Organization> filterFindByC_P(
747                    long companyId, long parentOrganizationId, int start, int end)
748                    throws com.liferay.portal.kernel.exception.SystemException {
749                    return getPersistence()
750                                       .filterFindByC_P(companyId, parentOrganizationId, start, end);
751            }
752    
753            /**
754            * Returns an ordered range of all the organizations that the user has permissions to view where companyId = &#63; and parentOrganizationId = &#63;.
755            *
756            * <p>
757            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
758            * </p>
759            *
760            * @param companyId the company ID
761            * @param parentOrganizationId the parent organization ID
762            * @param start the lower bound of the range of organizations
763            * @param end the upper bound of the range of organizations (not inclusive)
764            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
765            * @return the ordered range of matching organizations that the user has permission to view
766            * @throws SystemException if a system exception occurred
767            */
768            public static java.util.List<com.liferay.portal.model.Organization> filterFindByC_P(
769                    long companyId, long parentOrganizationId, int start, int end,
770                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
771                    throws com.liferay.portal.kernel.exception.SystemException {
772                    return getPersistence()
773                                       .filterFindByC_P(companyId, parentOrganizationId, start,
774                            end, orderByComparator);
775            }
776    
777            /**
778            * Returns the organizations before and after the current organization in the ordered set of organizations that the user has permission to view where companyId = &#63; and parentOrganizationId = &#63;.
779            *
780            * @param organizationId the primary key of the current organization
781            * @param companyId the company ID
782            * @param parentOrganizationId the parent organization ID
783            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
784            * @return the previous, current, and next organization
785            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
786            * @throws SystemException if a system exception occurred
787            */
788            public static com.liferay.portal.model.Organization[] filterFindByC_P_PrevAndNext(
789                    long organizationId, long companyId, long parentOrganizationId,
790                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
791                    throws com.liferay.portal.NoSuchOrganizationException,
792                            com.liferay.portal.kernel.exception.SystemException {
793                    return getPersistence()
794                                       .filterFindByC_P_PrevAndNext(organizationId, companyId,
795                            parentOrganizationId, orderByComparator);
796            }
797    
798            /**
799            * Returns the organization where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchOrganizationException} if it could not be found.
800            *
801            * @param companyId the company ID
802            * @param name the name
803            * @return the matching organization
804            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
805            * @throws SystemException if a system exception occurred
806            */
807            public static com.liferay.portal.model.Organization findByC_N(
808                    long companyId, java.lang.String name)
809                    throws com.liferay.portal.NoSuchOrganizationException,
810                            com.liferay.portal.kernel.exception.SystemException {
811                    return getPersistence().findByC_N(companyId, name);
812            }
813    
814            /**
815            * Returns the organization where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
816            *
817            * @param companyId the company ID
818            * @param name the name
819            * @return the matching organization, or <code>null</code> if a matching organization could not be found
820            * @throws SystemException if a system exception occurred
821            */
822            public static com.liferay.portal.model.Organization fetchByC_N(
823                    long companyId, java.lang.String name)
824                    throws com.liferay.portal.kernel.exception.SystemException {
825                    return getPersistence().fetchByC_N(companyId, name);
826            }
827    
828            /**
829            * Returns the organization where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
830            *
831            * @param companyId the company ID
832            * @param name the name
833            * @param retrieveFromCache whether to use the finder cache
834            * @return the matching organization, or <code>null</code> if a matching organization could not be found
835            * @throws SystemException if a system exception occurred
836            */
837            public static com.liferay.portal.model.Organization fetchByC_N(
838                    long companyId, java.lang.String name, boolean retrieveFromCache)
839                    throws com.liferay.portal.kernel.exception.SystemException {
840                    return getPersistence().fetchByC_N(companyId, name, retrieveFromCache);
841            }
842    
843            /**
844            * Returns all the organizations.
845            *
846            * @return the organizations
847            * @throws SystemException if a system exception occurred
848            */
849            public static java.util.List<com.liferay.portal.model.Organization> findAll()
850                    throws com.liferay.portal.kernel.exception.SystemException {
851                    return getPersistence().findAll();
852            }
853    
854            /**
855            * Returns a range of all the organizations.
856            *
857            * <p>
858            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
859            * </p>
860            *
861            * @param start the lower bound of the range of organizations
862            * @param end the upper bound of the range of organizations (not inclusive)
863            * @return the range of organizations
864            * @throws SystemException if a system exception occurred
865            */
866            public static java.util.List<com.liferay.portal.model.Organization> findAll(
867                    int start, int end)
868                    throws com.liferay.portal.kernel.exception.SystemException {
869                    return getPersistence().findAll(start, end);
870            }
871    
872            /**
873            * Returns an ordered range of all the organizations.
874            *
875            * <p>
876            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
877            * </p>
878            *
879            * @param start the lower bound of the range of organizations
880            * @param end the upper bound of the range of organizations (not inclusive)
881            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
882            * @return the ordered range of organizations
883            * @throws SystemException if a system exception occurred
884            */
885            public static java.util.List<com.liferay.portal.model.Organization> findAll(
886                    int start, int end,
887                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
888                    throws com.liferay.portal.kernel.exception.SystemException {
889                    return getPersistence().findAll(start, end, orderByComparator);
890            }
891    
892            /**
893            * Removes all the organizations where companyId = &#63; from the database.
894            *
895            * @param companyId the company ID
896            * @throws SystemException if a system exception occurred
897            */
898            public static void removeByCompanyId(long companyId)
899                    throws com.liferay.portal.kernel.exception.SystemException {
900                    getPersistence().removeByCompanyId(companyId);
901            }
902    
903            /**
904            * Removes all the organizations where companyId = &#63; from the database.
905            *
906            * @param companyId the company ID
907            * @throws SystemException if a system exception occurred
908            */
909            public static void removeByLocations(long companyId)
910                    throws com.liferay.portal.kernel.exception.SystemException {
911                    getPersistence().removeByLocations(companyId);
912            }
913    
914            /**
915            * Removes all the organizations where companyId = &#63; and parentOrganizationId = &#63; from the database.
916            *
917            * @param companyId the company ID
918            * @param parentOrganizationId the parent organization ID
919            * @throws SystemException if a system exception occurred
920            */
921            public static void removeByC_P(long companyId, long parentOrganizationId)
922                    throws com.liferay.portal.kernel.exception.SystemException {
923                    getPersistence().removeByC_P(companyId, parentOrganizationId);
924            }
925    
926            /**
927            * Removes the organization where companyId = &#63; and name = &#63; from the database.
928            *
929            * @param companyId the company ID
930            * @param name the name
931            * @throws SystemException if a system exception occurred
932            */
933            public static void removeByC_N(long companyId, java.lang.String name)
934                    throws com.liferay.portal.NoSuchOrganizationException,
935                            com.liferay.portal.kernel.exception.SystemException {
936                    getPersistence().removeByC_N(companyId, name);
937            }
938    
939            /**
940            * Removes all the organizations from the database.
941            *
942            * @throws SystemException if a system exception occurred
943            */
944            public static void removeAll()
945                    throws com.liferay.portal.kernel.exception.SystemException {
946                    getPersistence().removeAll();
947            }
948    
949            /**
950            * Returns the number of organizations where companyId = &#63;.
951            *
952            * @param companyId the company ID
953            * @return the number of matching organizations
954            * @throws SystemException if a system exception occurred
955            */
956            public static int countByCompanyId(long companyId)
957                    throws com.liferay.portal.kernel.exception.SystemException {
958                    return getPersistence().countByCompanyId(companyId);
959            }
960    
961            /**
962            * Returns the number of organizations that the user has permission to view where companyId = &#63;.
963            *
964            * @param companyId the company ID
965            * @return the number of matching organizations that the user has permission to view
966            * @throws SystemException if a system exception occurred
967            */
968            public static int filterCountByCompanyId(long companyId)
969                    throws com.liferay.portal.kernel.exception.SystemException {
970                    return getPersistence().filterCountByCompanyId(companyId);
971            }
972    
973            /**
974            * Returns the number of organizations where companyId = &#63;.
975            *
976            * @param companyId the company ID
977            * @return the number of matching organizations
978            * @throws SystemException if a system exception occurred
979            */
980            public static int countByLocations(long companyId)
981                    throws com.liferay.portal.kernel.exception.SystemException {
982                    return getPersistence().countByLocations(companyId);
983            }
984    
985            /**
986            * Returns the number of organizations that the user has permission to view where companyId = &#63;.
987            *
988            * @param companyId the company ID
989            * @return the number of matching organizations that the user has permission to view
990            * @throws SystemException if a system exception occurred
991            */
992            public static int filterCountByLocations(long companyId)
993                    throws com.liferay.portal.kernel.exception.SystemException {
994                    return getPersistence().filterCountByLocations(companyId);
995            }
996    
997            /**
998            * Returns the number of organizations where companyId = &#63; and parentOrganizationId = &#63;.
999            *
1000            * @param companyId the company ID
1001            * @param parentOrganizationId the parent organization ID
1002            * @return the number of matching organizations
1003            * @throws SystemException if a system exception occurred
1004            */
1005            public static int countByC_P(long companyId, long parentOrganizationId)
1006                    throws com.liferay.portal.kernel.exception.SystemException {
1007                    return getPersistence().countByC_P(companyId, parentOrganizationId);
1008            }
1009    
1010            /**
1011            * Returns the number of organizations that the user has permission to view where companyId = &#63; and parentOrganizationId = &#63;.
1012            *
1013            * @param companyId the company ID
1014            * @param parentOrganizationId the parent organization ID
1015            * @return the number of matching organizations that the user has permission to view
1016            * @throws SystemException if a system exception occurred
1017            */
1018            public static int filterCountByC_P(long companyId, long parentOrganizationId)
1019                    throws com.liferay.portal.kernel.exception.SystemException {
1020                    return getPersistence().filterCountByC_P(companyId, parentOrganizationId);
1021            }
1022    
1023            /**
1024            * Returns the number of organizations where companyId = &#63; and name = &#63;.
1025            *
1026            * @param companyId the company ID
1027            * @param name the name
1028            * @return the number of matching organizations
1029            * @throws SystemException if a system exception occurred
1030            */
1031            public static int countByC_N(long companyId, java.lang.String name)
1032                    throws com.liferay.portal.kernel.exception.SystemException {
1033                    return getPersistence().countByC_N(companyId, name);
1034            }
1035    
1036            /**
1037            * Returns the number of organizations.
1038            *
1039            * @return the number of organizations
1040            * @throws SystemException if a system exception occurred
1041            */
1042            public static int countAll()
1043                    throws com.liferay.portal.kernel.exception.SystemException {
1044                    return getPersistence().countAll();
1045            }
1046    
1047            /**
1048            * Returns all the groups associated with the organization.
1049            *
1050            * @param pk the primary key of the organization
1051            * @return the groups associated with the organization
1052            * @throws SystemException if a system exception occurred
1053            */
1054            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1055                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1056                    return getPersistence().getGroups(pk);
1057            }
1058    
1059            /**
1060            * Returns a range of all the groups associated with the organization.
1061            *
1062            * <p>
1063            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1064            * </p>
1065            *
1066            * @param pk the primary key of the organization
1067            * @param start the lower bound of the range of organizations
1068            * @param end the upper bound of the range of organizations (not inclusive)
1069            * @return the range of groups associated with the organization
1070            * @throws SystemException if a system exception occurred
1071            */
1072            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1073                    long pk, int start, int end)
1074                    throws com.liferay.portal.kernel.exception.SystemException {
1075                    return getPersistence().getGroups(pk, start, end);
1076            }
1077    
1078            /**
1079            * Returns an ordered range of all the groups associated with the organization.
1080            *
1081            * <p>
1082            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1083            * </p>
1084            *
1085            * @param pk the primary key of the organization
1086            * @param start the lower bound of the range of organizations
1087            * @param end the upper bound of the range of organizations (not inclusive)
1088            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1089            * @return the ordered range of groups associated with the organization
1090            * @throws SystemException if a system exception occurred
1091            */
1092            public static java.util.List<com.liferay.portal.model.Group> getGroups(
1093                    long pk, int start, int end,
1094                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1095                    throws com.liferay.portal.kernel.exception.SystemException {
1096                    return getPersistence().getGroups(pk, start, end, orderByComparator);
1097            }
1098    
1099            /**
1100            * Returns the number of groups associated with the organization.
1101            *
1102            * @param pk the primary key of the organization
1103            * @return the number of groups associated with the organization
1104            * @throws SystemException if a system exception occurred
1105            */
1106            public static int getGroupsSize(long pk)
1107                    throws com.liferay.portal.kernel.exception.SystemException {
1108                    return getPersistence().getGroupsSize(pk);
1109            }
1110    
1111            /**
1112            * Returns <code>true</code> if the group is associated with the organization.
1113            *
1114            * @param pk the primary key of the organization
1115            * @param groupPK the primary key of the group
1116            * @return <code>true</code> if the group is associated with the organization; <code>false</code> otherwise
1117            * @throws SystemException if a system exception occurred
1118            */
1119            public static boolean containsGroup(long pk, long groupPK)
1120                    throws com.liferay.portal.kernel.exception.SystemException {
1121                    return getPersistence().containsGroup(pk, groupPK);
1122            }
1123    
1124            /**
1125            * Returns <code>true</code> if the organization has any groups associated with it.
1126            *
1127            * @param pk the primary key of the organization to check for associations with groups
1128            * @return <code>true</code> if the organization has any groups associated with it; <code>false</code> otherwise
1129            * @throws SystemException if a system exception occurred
1130            */
1131            public static boolean containsGroups(long pk)
1132                    throws com.liferay.portal.kernel.exception.SystemException {
1133                    return getPersistence().containsGroups(pk);
1134            }
1135    
1136            /**
1137            * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1138            *
1139            * @param pk the primary key of the organization
1140            * @param groupPK the primary key of the group
1141            * @throws SystemException if a system exception occurred
1142            */
1143            public static void addGroup(long pk, long groupPK)
1144                    throws com.liferay.portal.kernel.exception.SystemException {
1145                    getPersistence().addGroup(pk, groupPK);
1146            }
1147    
1148            /**
1149            * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1150            *
1151            * @param pk the primary key of the organization
1152            * @param group the group
1153            * @throws SystemException if a system exception occurred
1154            */
1155            public static void addGroup(long pk, com.liferay.portal.model.Group group)
1156                    throws com.liferay.portal.kernel.exception.SystemException {
1157                    getPersistence().addGroup(pk, group);
1158            }
1159    
1160            /**
1161            * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1162            *
1163            * @param pk the primary key of the organization
1164            * @param groupPKs the primary keys of the groups
1165            * @throws SystemException if a system exception occurred
1166            */
1167            public static void addGroups(long pk, long[] groupPKs)
1168                    throws com.liferay.portal.kernel.exception.SystemException {
1169                    getPersistence().addGroups(pk, groupPKs);
1170            }
1171    
1172            /**
1173            * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1174            *
1175            * @param pk the primary key of the organization
1176            * @param groups the groups
1177            * @throws SystemException if a system exception occurred
1178            */
1179            public static void addGroups(long pk,
1180                    java.util.List<com.liferay.portal.model.Group> groups)
1181                    throws com.liferay.portal.kernel.exception.SystemException {
1182                    getPersistence().addGroups(pk, groups);
1183            }
1184    
1185            /**
1186            * Clears all associations between the organization and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1187            *
1188            * @param pk the primary key of the organization to clear the associated groups from
1189            * @throws SystemException if a system exception occurred
1190            */
1191            public static void clearGroups(long pk)
1192                    throws com.liferay.portal.kernel.exception.SystemException {
1193                    getPersistence().clearGroups(pk);
1194            }
1195    
1196            /**
1197            * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1198            *
1199            * @param pk the primary key of the organization
1200            * @param groupPK the primary key of the group
1201            * @throws SystemException if a system exception occurred
1202            */
1203            public static void removeGroup(long pk, long groupPK)
1204                    throws com.liferay.portal.kernel.exception.SystemException {
1205                    getPersistence().removeGroup(pk, groupPK);
1206            }
1207    
1208            /**
1209            * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1210            *
1211            * @param pk the primary key of the organization
1212            * @param group the group
1213            * @throws SystemException if a system exception occurred
1214            */
1215            public static void removeGroup(long pk, com.liferay.portal.model.Group group)
1216                    throws com.liferay.portal.kernel.exception.SystemException {
1217                    getPersistence().removeGroup(pk, group);
1218            }
1219    
1220            /**
1221            * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1222            *
1223            * @param pk the primary key of the organization
1224            * @param groupPKs the primary keys of the groups
1225            * @throws SystemException if a system exception occurred
1226            */
1227            public static void removeGroups(long pk, long[] groupPKs)
1228                    throws com.liferay.portal.kernel.exception.SystemException {
1229                    getPersistence().removeGroups(pk, groupPKs);
1230            }
1231    
1232            /**
1233            * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1234            *
1235            * @param pk the primary key of the organization
1236            * @param groups the groups
1237            * @throws SystemException if a system exception occurred
1238            */
1239            public static void removeGroups(long pk,
1240                    java.util.List<com.liferay.portal.model.Group> groups)
1241                    throws com.liferay.portal.kernel.exception.SystemException {
1242                    getPersistence().removeGroups(pk, groups);
1243            }
1244    
1245            /**
1246            * Sets the groups associated with the organization, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1247            *
1248            * @param pk the primary key of the organization
1249            * @param groupPKs the primary keys of the groups to be associated with the organization
1250            * @throws SystemException if a system exception occurred
1251            */
1252            public static void setGroups(long pk, long[] groupPKs)
1253                    throws com.liferay.portal.kernel.exception.SystemException {
1254                    getPersistence().setGroups(pk, groupPKs);
1255            }
1256    
1257            /**
1258            * Sets the groups associated with the organization, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1259            *
1260            * @param pk the primary key of the organization
1261            * @param groups the groups to be associated with the organization
1262            * @throws SystemException if a system exception occurred
1263            */
1264            public static void setGroups(long pk,
1265                    java.util.List<com.liferay.portal.model.Group> groups)
1266                    throws com.liferay.portal.kernel.exception.SystemException {
1267                    getPersistence().setGroups(pk, groups);
1268            }
1269    
1270            /**
1271            * Returns all the users associated with the organization.
1272            *
1273            * @param pk the primary key of the organization
1274            * @return the users associated with the organization
1275            * @throws SystemException if a system exception occurred
1276            */
1277            public static java.util.List<com.liferay.portal.model.User> getUsers(
1278                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
1279                    return getPersistence().getUsers(pk);
1280            }
1281    
1282            /**
1283            * Returns a range of all the users associated with the organization.
1284            *
1285            * <p>
1286            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1287            * </p>
1288            *
1289            * @param pk the primary key of the organization
1290            * @param start the lower bound of the range of organizations
1291            * @param end the upper bound of the range of organizations (not inclusive)
1292            * @return the range of users associated with the organization
1293            * @throws SystemException if a system exception occurred
1294            */
1295            public static java.util.List<com.liferay.portal.model.User> getUsers(
1296                    long pk, int start, int end)
1297                    throws com.liferay.portal.kernel.exception.SystemException {
1298                    return getPersistence().getUsers(pk, start, end);
1299            }
1300    
1301            /**
1302            * Returns an ordered range of all the users associated with the organization.
1303            *
1304            * <p>
1305            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1306            * </p>
1307            *
1308            * @param pk the primary key of the organization
1309            * @param start the lower bound of the range of organizations
1310            * @param end the upper bound of the range of organizations (not inclusive)
1311            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1312            * @return the ordered range of users associated with the organization
1313            * @throws SystemException if a system exception occurred
1314            */
1315            public static java.util.List<com.liferay.portal.model.User> getUsers(
1316                    long pk, int start, int end,
1317                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1318                    throws com.liferay.portal.kernel.exception.SystemException {
1319                    return getPersistence().getUsers(pk, start, end, orderByComparator);
1320            }
1321    
1322            /**
1323            * Returns the number of users associated with the organization.
1324            *
1325            * @param pk the primary key of the organization
1326            * @return the number of users associated with the organization
1327            * @throws SystemException if a system exception occurred
1328            */
1329            public static int getUsersSize(long pk)
1330                    throws com.liferay.portal.kernel.exception.SystemException {
1331                    return getPersistence().getUsersSize(pk);
1332            }
1333    
1334            /**
1335            * Returns <code>true</code> if the user is associated with the organization.
1336            *
1337            * @param pk the primary key of the organization
1338            * @param userPK the primary key of the user
1339            * @return <code>true</code> if the user is associated with the organization; <code>false</code> otherwise
1340            * @throws SystemException if a system exception occurred
1341            */
1342            public static boolean containsUser(long pk, long userPK)
1343                    throws com.liferay.portal.kernel.exception.SystemException {
1344                    return getPersistence().containsUser(pk, userPK);
1345            }
1346    
1347            /**
1348            * Returns <code>true</code> if the organization has any users associated with it.
1349            *
1350            * @param pk the primary key of the organization to check for associations with users
1351            * @return <code>true</code> if the organization has any users associated with it; <code>false</code> otherwise
1352            * @throws SystemException if a system exception occurred
1353            */
1354            public static boolean containsUsers(long pk)
1355                    throws com.liferay.portal.kernel.exception.SystemException {
1356                    return getPersistence().containsUsers(pk);
1357            }
1358    
1359            /**
1360            * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1361            *
1362            * @param pk the primary key of the organization
1363            * @param userPK the primary key of the user
1364            * @throws SystemException if a system exception occurred
1365            */
1366            public static void addUser(long pk, long userPK)
1367                    throws com.liferay.portal.kernel.exception.SystemException {
1368                    getPersistence().addUser(pk, userPK);
1369            }
1370    
1371            /**
1372            * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1373            *
1374            * @param pk the primary key of the organization
1375            * @param user the user
1376            * @throws SystemException if a system exception occurred
1377            */
1378            public static void addUser(long pk, com.liferay.portal.model.User user)
1379                    throws com.liferay.portal.kernel.exception.SystemException {
1380                    getPersistence().addUser(pk, user);
1381            }
1382    
1383            /**
1384            * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1385            *
1386            * @param pk the primary key of the organization
1387            * @param userPKs the primary keys of the users
1388            * @throws SystemException if a system exception occurred
1389            */
1390            public static void addUsers(long pk, long[] userPKs)
1391                    throws com.liferay.portal.kernel.exception.SystemException {
1392                    getPersistence().addUsers(pk, userPKs);
1393            }
1394    
1395            /**
1396            * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1397            *
1398            * @param pk the primary key of the organization
1399            * @param users the users
1400            * @throws SystemException if a system exception occurred
1401            */
1402            public static void addUsers(long pk,
1403                    java.util.List<com.liferay.portal.model.User> users)
1404                    throws com.liferay.portal.kernel.exception.SystemException {
1405                    getPersistence().addUsers(pk, users);
1406            }
1407    
1408            /**
1409            * Clears all associations between the organization and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1410            *
1411            * @param pk the primary key of the organization to clear the associated users from
1412            * @throws SystemException if a system exception occurred
1413            */
1414            public static void clearUsers(long pk)
1415                    throws com.liferay.portal.kernel.exception.SystemException {
1416                    getPersistence().clearUsers(pk);
1417            }
1418    
1419            /**
1420            * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1421            *
1422            * @param pk the primary key of the organization
1423            * @param userPK the primary key of the user
1424            * @throws SystemException if a system exception occurred
1425            */
1426            public static void removeUser(long pk, long userPK)
1427                    throws com.liferay.portal.kernel.exception.SystemException {
1428                    getPersistence().removeUser(pk, userPK);
1429            }
1430    
1431            /**
1432            * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1433            *
1434            * @param pk the primary key of the organization
1435            * @param user the user
1436            * @throws SystemException if a system exception occurred
1437            */
1438            public static void removeUser(long pk, com.liferay.portal.model.User user)
1439                    throws com.liferay.portal.kernel.exception.SystemException {
1440                    getPersistence().removeUser(pk, user);
1441            }
1442    
1443            /**
1444            * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1445            *
1446            * @param pk the primary key of the organization
1447            * @param userPKs the primary keys of the users
1448            * @throws SystemException if a system exception occurred
1449            */
1450            public static void removeUsers(long pk, long[] userPKs)
1451                    throws com.liferay.portal.kernel.exception.SystemException {
1452                    getPersistence().removeUsers(pk, userPKs);
1453            }
1454    
1455            /**
1456            * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1457            *
1458            * @param pk the primary key of the organization
1459            * @param users the users
1460            * @throws SystemException if a system exception occurred
1461            */
1462            public static void removeUsers(long pk,
1463                    java.util.List<com.liferay.portal.model.User> users)
1464                    throws com.liferay.portal.kernel.exception.SystemException {
1465                    getPersistence().removeUsers(pk, users);
1466            }
1467    
1468            /**
1469            * Sets the users associated with the organization, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1470            *
1471            * @param pk the primary key of the organization
1472            * @param userPKs the primary keys of the users to be associated with the organization
1473            * @throws SystemException if a system exception occurred
1474            */
1475            public static void setUsers(long pk, long[] userPKs)
1476                    throws com.liferay.portal.kernel.exception.SystemException {
1477                    getPersistence().setUsers(pk, userPKs);
1478            }
1479    
1480            /**
1481            * Sets the users associated with the organization, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1482            *
1483            * @param pk the primary key of the organization
1484            * @param users the users to be associated with the organization
1485            * @throws SystemException if a system exception occurred
1486            */
1487            public static void setUsers(long pk,
1488                    java.util.List<com.liferay.portal.model.User> users)
1489                    throws com.liferay.portal.kernel.exception.SystemException {
1490                    getPersistence().setUsers(pk, users);
1491            }
1492    
1493            public static OrganizationPersistence getPersistence() {
1494                    if (_persistence == null) {
1495                            _persistence = (OrganizationPersistence)PortalBeanLocatorUtil.locate(OrganizationPersistence.class.getName());
1496    
1497                            ReferenceRegistry.registerReference(OrganizationUtil.class,
1498                                    "_persistence");
1499                    }
1500    
1501                    return _persistence;
1502            }
1503    
1504            public void setPersistence(OrganizationPersistence persistence) {
1505                    _persistence = persistence;
1506    
1507                    ReferenceRegistry.registerReference(OrganizationUtil.class,
1508                            "_persistence");
1509            }
1510    
1511            private static OrganizationPersistence _persistence;
1512    }