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