001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.Organization;
020    
021    /**
022     * The persistence interface for the organization service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see com.liferay.portal.service.persistence.impl.OrganizationPersistenceImpl
030     * @see OrganizationUtil
031     * @generated
032     */
033    @ProviderType
034    public interface OrganizationPersistence extends BasePersistence<Organization> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link OrganizationUtil} to access the organization persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the organizations where uuid = &#63;.
043            *
044            * @param uuid the uuid
045            * @return the matching organizations
046            */
047            public java.util.List<Organization> findByUuid(java.lang.String uuid);
048    
049            /**
050            * Returns a range of all the organizations where uuid = &#63;.
051            *
052            * <p>
053            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
054            * </p>
055            *
056            * @param uuid the uuid
057            * @param start the lower bound of the range of organizations
058            * @param end the upper bound of the range of organizations (not inclusive)
059            * @return the range of matching organizations
060            */
061            public java.util.List<Organization> findByUuid(java.lang.String uuid,
062                    int start, int end);
063    
064            /**
065            * Returns an ordered range of all the organizations where uuid = &#63;.
066            *
067            * <p>
068            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
069            * </p>
070            *
071            * @param uuid the uuid
072            * @param start the lower bound of the range of organizations
073            * @param end the upper bound of the range of organizations (not inclusive)
074            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
075            * @return the ordered range of matching organizations
076            */
077            public java.util.List<Organization> findByUuid(java.lang.String uuid,
078                    int start, int end,
079                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
080    
081            /**
082            * Returns the first organization in the ordered set where uuid = &#63;.
083            *
084            * @param uuid the uuid
085            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
086            * @return the first matching organization
087            * @throws NoSuchOrganizationException if a matching organization could not be found
088            */
089            public Organization findByUuid_First(java.lang.String uuid,
090                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
091                    throws com.liferay.portal.NoSuchOrganizationException;
092    
093            /**
094            * Returns the first organization in the ordered set where uuid = &#63;.
095            *
096            * @param uuid the uuid
097            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
098            * @return the first matching organization, or <code>null</code> if a matching organization could not be found
099            */
100            public Organization fetchByUuid_First(java.lang.String uuid,
101                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
102    
103            /**
104            * Returns the last organization in the ordered set where uuid = &#63;.
105            *
106            * @param uuid the uuid
107            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
108            * @return the last matching organization
109            * @throws NoSuchOrganizationException if a matching organization could not be found
110            */
111            public Organization findByUuid_Last(java.lang.String uuid,
112                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
113                    throws com.liferay.portal.NoSuchOrganizationException;
114    
115            /**
116            * Returns the last organization in the ordered set where uuid = &#63;.
117            *
118            * @param uuid the uuid
119            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
120            * @return the last matching organization, or <code>null</code> if a matching organization could not be found
121            */
122            public Organization fetchByUuid_Last(java.lang.String uuid,
123                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
124    
125            /**
126            * Returns the organizations before and after the current organization in the ordered set where uuid = &#63;.
127            *
128            * @param organizationId the primary key of the current organization
129            * @param uuid the uuid
130            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
131            * @return the previous, current, and next organization
132            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
133            */
134            public Organization[] findByUuid_PrevAndNext(long organizationId,
135                    java.lang.String uuid,
136                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
137                    throws com.liferay.portal.NoSuchOrganizationException;
138    
139            /**
140            * Returns all the organizations that the user has permission to view where uuid = &#63;.
141            *
142            * @param uuid the uuid
143            * @return the matching organizations that the user has permission to view
144            */
145            public java.util.List<Organization> filterFindByUuid(java.lang.String uuid);
146    
147            /**
148            * Returns a range of all the organizations that the user has permission to view where uuid = &#63;.
149            *
150            * <p>
151            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
152            * </p>
153            *
154            * @param uuid the uuid
155            * @param start the lower bound of the range of organizations
156            * @param end the upper bound of the range of organizations (not inclusive)
157            * @return the range of matching organizations that the user has permission to view
158            */
159            public java.util.List<Organization> filterFindByUuid(
160                    java.lang.String uuid, int start, int end);
161    
162            /**
163            * Returns an ordered range of all the organizations that the user has permissions to view where uuid = &#63;.
164            *
165            * <p>
166            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
167            * </p>
168            *
169            * @param uuid the uuid
170            * @param start the lower bound of the range of organizations
171            * @param end the upper bound of the range of organizations (not inclusive)
172            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
173            * @return the ordered range of matching organizations that the user has permission to view
174            */
175            public java.util.List<Organization> filterFindByUuid(
176                    java.lang.String uuid, int start, int end,
177                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
178    
179            /**
180            * Returns the organizations before and after the current organization in the ordered set of organizations that the user has permission to view where uuid = &#63;.
181            *
182            * @param organizationId the primary key of the current organization
183            * @param uuid the uuid
184            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
185            * @return the previous, current, and next organization
186            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
187            */
188            public Organization[] filterFindByUuid_PrevAndNext(long organizationId,
189                    java.lang.String uuid,
190                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
191                    throws com.liferay.portal.NoSuchOrganizationException;
192    
193            /**
194            * Removes all the organizations where uuid = &#63; from the database.
195            *
196            * @param uuid the uuid
197            */
198            public void removeByUuid(java.lang.String uuid);
199    
200            /**
201            * Returns the number of organizations where uuid = &#63;.
202            *
203            * @param uuid the uuid
204            * @return the number of matching organizations
205            */
206            public int countByUuid(java.lang.String uuid);
207    
208            /**
209            * Returns the number of organizations that the user has permission to view where uuid = &#63;.
210            *
211            * @param uuid the uuid
212            * @return the number of matching organizations that the user has permission to view
213            */
214            public int filterCountByUuid(java.lang.String uuid);
215    
216            /**
217            * Returns all the organizations where uuid = &#63; and companyId = &#63;.
218            *
219            * @param uuid the uuid
220            * @param companyId the company ID
221            * @return the matching organizations
222            */
223            public java.util.List<Organization> findByUuid_C(java.lang.String uuid,
224                    long companyId);
225    
226            /**
227            * Returns a range of all the organizations where uuid = &#63; and companyId = &#63;.
228            *
229            * <p>
230            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
231            * </p>
232            *
233            * @param uuid the uuid
234            * @param companyId the company ID
235            * @param start the lower bound of the range of organizations
236            * @param end the upper bound of the range of organizations (not inclusive)
237            * @return the range of matching organizations
238            */
239            public java.util.List<Organization> findByUuid_C(java.lang.String uuid,
240                    long companyId, int start, int end);
241    
242            /**
243            * Returns an ordered range of all the organizations where uuid = &#63; and companyId = &#63;.
244            *
245            * <p>
246            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
247            * </p>
248            *
249            * @param uuid the uuid
250            * @param companyId the company ID
251            * @param start the lower bound of the range of organizations
252            * @param end the upper bound of the range of organizations (not inclusive)
253            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
254            * @return the ordered range of matching organizations
255            */
256            public java.util.List<Organization> findByUuid_C(java.lang.String uuid,
257                    long companyId, int start, int end,
258                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
259    
260            /**
261            * Returns the first organization in the ordered set where uuid = &#63; and companyId = &#63;.
262            *
263            * @param uuid the uuid
264            * @param companyId the company ID
265            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
266            * @return the first matching organization
267            * @throws NoSuchOrganizationException if a matching organization could not be found
268            */
269            public Organization findByUuid_C_First(java.lang.String uuid,
270                    long companyId,
271                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
272                    throws com.liferay.portal.NoSuchOrganizationException;
273    
274            /**
275            * Returns the first organization in the ordered set where uuid = &#63; and companyId = &#63;.
276            *
277            * @param uuid the uuid
278            * @param companyId the company ID
279            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
280            * @return the first matching organization, or <code>null</code> if a matching organization could not be found
281            */
282            public Organization fetchByUuid_C_First(java.lang.String uuid,
283                    long companyId,
284                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
285    
286            /**
287            * Returns the last organization in the ordered set where uuid = &#63; and companyId = &#63;.
288            *
289            * @param uuid the uuid
290            * @param companyId the company ID
291            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
292            * @return the last matching organization
293            * @throws NoSuchOrganizationException if a matching organization could not be found
294            */
295            public Organization findByUuid_C_Last(java.lang.String uuid,
296                    long companyId,
297                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
298                    throws com.liferay.portal.NoSuchOrganizationException;
299    
300            /**
301            * Returns the last organization in the ordered set where uuid = &#63; and companyId = &#63;.
302            *
303            * @param uuid the uuid
304            * @param companyId the company ID
305            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
306            * @return the last matching organization, or <code>null</code> if a matching organization could not be found
307            */
308            public Organization fetchByUuid_C_Last(java.lang.String uuid,
309                    long companyId,
310                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
311    
312            /**
313            * Returns the organizations before and after the current organization in the ordered set where uuid = &#63; and companyId = &#63;.
314            *
315            * @param organizationId the primary key of the current organization
316            * @param uuid the uuid
317            * @param companyId the company ID
318            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
319            * @return the previous, current, and next organization
320            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
321            */
322            public Organization[] findByUuid_C_PrevAndNext(long organizationId,
323                    java.lang.String uuid, long companyId,
324                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
325                    throws com.liferay.portal.NoSuchOrganizationException;
326    
327            /**
328            * Returns all the organizations that the user has permission to view where uuid = &#63; and companyId = &#63;.
329            *
330            * @param uuid the uuid
331            * @param companyId the company ID
332            * @return the matching organizations that the user has permission to view
333            */
334            public java.util.List<Organization> filterFindByUuid_C(
335                    java.lang.String uuid, long companyId);
336    
337            /**
338            * Returns a range of all the organizations that the user has permission to view where uuid = &#63; and companyId = &#63;.
339            *
340            * <p>
341            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
342            * </p>
343            *
344            * @param uuid the uuid
345            * @param companyId the company ID
346            * @param start the lower bound of the range of organizations
347            * @param end the upper bound of the range of organizations (not inclusive)
348            * @return the range of matching organizations that the user has permission to view
349            */
350            public java.util.List<Organization> filterFindByUuid_C(
351                    java.lang.String uuid, long companyId, int start, int end);
352    
353            /**
354            * Returns an ordered range of all the organizations that the user has permissions to view where uuid = &#63; and companyId = &#63;.
355            *
356            * <p>
357            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
358            * </p>
359            *
360            * @param uuid the uuid
361            * @param companyId the company ID
362            * @param start the lower bound of the range of organizations
363            * @param end the upper bound of the range of organizations (not inclusive)
364            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
365            * @return the ordered range of matching organizations that the user has permission to view
366            */
367            public java.util.List<Organization> filterFindByUuid_C(
368                    java.lang.String uuid, long companyId, int start, int end,
369                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
370    
371            /**
372            * Returns the organizations before and after the current organization in the ordered set of organizations that the user has permission to view where uuid = &#63; and companyId = &#63;.
373            *
374            * @param organizationId the primary key of the current organization
375            * @param uuid the uuid
376            * @param companyId the company ID
377            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
378            * @return the previous, current, and next organization
379            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
380            */
381            public Organization[] filterFindByUuid_C_PrevAndNext(long organizationId,
382                    java.lang.String uuid, long companyId,
383                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
384                    throws com.liferay.portal.NoSuchOrganizationException;
385    
386            /**
387            * Removes all the organizations where uuid = &#63; and companyId = &#63; from the database.
388            *
389            * @param uuid the uuid
390            * @param companyId the company ID
391            */
392            public void removeByUuid_C(java.lang.String uuid, long companyId);
393    
394            /**
395            * Returns the number of organizations where uuid = &#63; and companyId = &#63;.
396            *
397            * @param uuid the uuid
398            * @param companyId the company ID
399            * @return the number of matching organizations
400            */
401            public int countByUuid_C(java.lang.String uuid, long companyId);
402    
403            /**
404            * Returns the number of organizations that the user has permission to view where uuid = &#63; and companyId = &#63;.
405            *
406            * @param uuid the uuid
407            * @param companyId the company ID
408            * @return the number of matching organizations that the user has permission to view
409            */
410            public int filterCountByUuid_C(java.lang.String uuid, long companyId);
411    
412            /**
413            * Returns all the organizations where companyId = &#63;.
414            *
415            * @param companyId the company ID
416            * @return the matching organizations
417            */
418            public java.util.List<Organization> findByCompanyId(long companyId);
419    
420            /**
421            * Returns a range of all the organizations where companyId = &#63;.
422            *
423            * <p>
424            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
425            * </p>
426            *
427            * @param companyId the company ID
428            * @param start the lower bound of the range of organizations
429            * @param end the upper bound of the range of organizations (not inclusive)
430            * @return the range of matching organizations
431            */
432            public java.util.List<Organization> findByCompanyId(long companyId,
433                    int start, int end);
434    
435            /**
436            * Returns an ordered range of all the organizations where companyId = &#63;.
437            *
438            * <p>
439            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
440            * </p>
441            *
442            * @param companyId the company ID
443            * @param start the lower bound of the range of organizations
444            * @param end the upper bound of the range of organizations (not inclusive)
445            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
446            * @return the ordered range of matching organizations
447            */
448            public java.util.List<Organization> findByCompanyId(long companyId,
449                    int start, int end,
450                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
451    
452            /**
453            * Returns the first 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 first matching organization
458            * @throws NoSuchOrganizationException if a matching organization could not be found
459            */
460            public Organization findByCompanyId_First(long companyId,
461                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
462                    throws com.liferay.portal.NoSuchOrganizationException;
463    
464            /**
465            * Returns the first organization in the ordered set where companyId = &#63;.
466            *
467            * @param companyId the company ID
468            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
469            * @return the first matching organization, or <code>null</code> if a matching organization could not be found
470            */
471            public Organization fetchByCompanyId_First(long companyId,
472                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
473    
474            /**
475            * Returns the last organization in the ordered set where companyId = &#63;.
476            *
477            * @param companyId the company ID
478            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
479            * @return the last matching organization
480            * @throws NoSuchOrganizationException if a matching organization could not be found
481            */
482            public Organization findByCompanyId_Last(long companyId,
483                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
484                    throws com.liferay.portal.NoSuchOrganizationException;
485    
486            /**
487            * Returns the last organization in the ordered set where companyId = &#63;.
488            *
489            * @param companyId the company ID
490            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
491            * @return the last matching organization, or <code>null</code> if a matching organization could not be found
492            */
493            public Organization fetchByCompanyId_Last(long companyId,
494                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
495    
496            /**
497            * Returns the organizations before and after the current organization in the ordered set where companyId = &#63;.
498            *
499            * @param organizationId the primary key of the current organization
500            * @param companyId the company ID
501            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
502            * @return the previous, current, and next organization
503            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
504            */
505            public Organization[] findByCompanyId_PrevAndNext(long organizationId,
506                    long companyId,
507                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
508                    throws com.liferay.portal.NoSuchOrganizationException;
509    
510            /**
511            * Returns all the organizations that the user has permission to view where companyId = &#63;.
512            *
513            * @param companyId the company ID
514            * @return the matching organizations that the user has permission to view
515            */
516            public java.util.List<Organization> filterFindByCompanyId(long companyId);
517    
518            /**
519            * Returns a range of all the organizations that the user has permission to view where companyId = &#63;.
520            *
521            * <p>
522            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
523            * </p>
524            *
525            * @param companyId the company ID
526            * @param start the lower bound of the range of organizations
527            * @param end the upper bound of the range of organizations (not inclusive)
528            * @return the range of matching organizations that the user has permission to view
529            */
530            public java.util.List<Organization> filterFindByCompanyId(long companyId,
531                    int start, int end);
532    
533            /**
534            * Returns an ordered range of all the organizations that the user has permissions to view where companyId = &#63;.
535            *
536            * <p>
537            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
538            * </p>
539            *
540            * @param companyId the company ID
541            * @param start the lower bound of the range of organizations
542            * @param end the upper bound of the range of organizations (not inclusive)
543            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
544            * @return the ordered range of matching organizations that the user has permission to view
545            */
546            public java.util.List<Organization> filterFindByCompanyId(long companyId,
547                    int start, int end,
548                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
549    
550            /**
551            * 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;.
552            *
553            * @param organizationId the primary key of the current organization
554            * @param companyId the company ID
555            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
556            * @return the previous, current, and next organization
557            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
558            */
559            public Organization[] filterFindByCompanyId_PrevAndNext(
560                    long organizationId, long companyId,
561                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
562                    throws com.liferay.portal.NoSuchOrganizationException;
563    
564            /**
565            * Removes all the organizations where companyId = &#63; from the database.
566            *
567            * @param companyId the company ID
568            */
569            public void removeByCompanyId(long companyId);
570    
571            /**
572            * Returns the number of organizations where companyId = &#63;.
573            *
574            * @param companyId the company ID
575            * @return the number of matching organizations
576            */
577            public int countByCompanyId(long companyId);
578    
579            /**
580            * Returns the number of organizations that the user has permission to view where companyId = &#63;.
581            *
582            * @param companyId the company ID
583            * @return the number of matching organizations that the user has permission to view
584            */
585            public int filterCountByCompanyId(long companyId);
586    
587            /**
588            * Returns all the organizations where companyId = &#63;.
589            *
590            * @param companyId the company ID
591            * @return the matching organizations
592            */
593            public java.util.List<Organization> findByLocations(long companyId);
594    
595            /**
596            * Returns a range of all the organizations where companyId = &#63;.
597            *
598            * <p>
599            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
600            * </p>
601            *
602            * @param companyId the company ID
603            * @param start the lower bound of the range of organizations
604            * @param end the upper bound of the range of organizations (not inclusive)
605            * @return the range of matching organizations
606            */
607            public java.util.List<Organization> findByLocations(long companyId,
608                    int start, int end);
609    
610            /**
611            * Returns an ordered range of all the organizations where companyId = &#63;.
612            *
613            * <p>
614            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
615            * </p>
616            *
617            * @param companyId the company ID
618            * @param start the lower bound of the range of organizations
619            * @param end the upper bound of the range of organizations (not inclusive)
620            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
621            * @return the ordered range of matching organizations
622            */
623            public java.util.List<Organization> findByLocations(long companyId,
624                    int start, int end,
625                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
626    
627            /**
628            * Returns the first organization in the ordered set where companyId = &#63;.
629            *
630            * @param companyId the company ID
631            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
632            * @return the first matching organization
633            * @throws NoSuchOrganizationException if a matching organization could not be found
634            */
635            public Organization findByLocations_First(long companyId,
636                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
637                    throws com.liferay.portal.NoSuchOrganizationException;
638    
639            /**
640            * Returns the first organization in the ordered set where companyId = &#63;.
641            *
642            * @param companyId the company ID
643            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
644            * @return the first matching organization, or <code>null</code> if a matching organization could not be found
645            */
646            public Organization fetchByLocations_First(long companyId,
647                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
648    
649            /**
650            * Returns the last organization in the ordered set where companyId = &#63;.
651            *
652            * @param companyId the company ID
653            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
654            * @return the last matching organization
655            * @throws NoSuchOrganizationException if a matching organization could not be found
656            */
657            public Organization findByLocations_Last(long companyId,
658                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
659                    throws com.liferay.portal.NoSuchOrganizationException;
660    
661            /**
662            * Returns the last organization in the ordered set where companyId = &#63;.
663            *
664            * @param companyId the company ID
665            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
666            * @return the last matching organization, or <code>null</code> if a matching organization could not be found
667            */
668            public Organization fetchByLocations_Last(long companyId,
669                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
670    
671            /**
672            * Returns the organizations before and after the current organization in the ordered set where companyId = &#63;.
673            *
674            * @param organizationId the primary key of the current organization
675            * @param companyId the company ID
676            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
677            * @return the previous, current, and next organization
678            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
679            */
680            public Organization[] findByLocations_PrevAndNext(long organizationId,
681                    long companyId,
682                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
683                    throws com.liferay.portal.NoSuchOrganizationException;
684    
685            /**
686            * Returns all the organizations that the user has permission to view where companyId = &#63;.
687            *
688            * @param companyId the company ID
689            * @return the matching organizations that the user has permission to view
690            */
691            public java.util.List<Organization> filterFindByLocations(long companyId);
692    
693            /**
694            * Returns a range of all the organizations that the user has permission to view where companyId = &#63;.
695            *
696            * <p>
697            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
698            * </p>
699            *
700            * @param companyId the company ID
701            * @param start the lower bound of the range of organizations
702            * @param end the upper bound of the range of organizations (not inclusive)
703            * @return the range of matching organizations that the user has permission to view
704            */
705            public java.util.List<Organization> filterFindByLocations(long companyId,
706                    int start, int end);
707    
708            /**
709            * Returns an ordered range of all the organizations that the user has permissions to view where companyId = &#63;.
710            *
711            * <p>
712            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
713            * </p>
714            *
715            * @param companyId the company ID
716            * @param start the lower bound of the range of organizations
717            * @param end the upper bound of the range of organizations (not inclusive)
718            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
719            * @return the ordered range of matching organizations that the user has permission to view
720            */
721            public java.util.List<Organization> filterFindByLocations(long companyId,
722                    int start, int end,
723                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
724    
725            /**
726            * 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;.
727            *
728            * @param organizationId the primary key of the current organization
729            * @param companyId the company ID
730            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
731            * @return the previous, current, and next organization
732            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
733            */
734            public Organization[] filterFindByLocations_PrevAndNext(
735                    long organizationId, long companyId,
736                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
737                    throws com.liferay.portal.NoSuchOrganizationException;
738    
739            /**
740            * Removes all the organizations where companyId = &#63; from the database.
741            *
742            * @param companyId the company ID
743            */
744            public void removeByLocations(long companyId);
745    
746            /**
747            * Returns the number of organizations where companyId = &#63;.
748            *
749            * @param companyId the company ID
750            * @return the number of matching organizations
751            */
752            public int countByLocations(long companyId);
753    
754            /**
755            * Returns the number of organizations that the user has permission to view where companyId = &#63;.
756            *
757            * @param companyId the company ID
758            * @return the number of matching organizations that the user has permission to view
759            */
760            public int filterCountByLocations(long companyId);
761    
762            /**
763            * Returns all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
764            *
765            * @param companyId the company ID
766            * @param parentOrganizationId the parent organization ID
767            * @return the matching organizations
768            */
769            public java.util.List<Organization> findByC_P(long companyId,
770                    long parentOrganizationId);
771    
772            /**
773            * Returns a range of all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
774            *
775            * <p>
776            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
777            * </p>
778            *
779            * @param companyId the company ID
780            * @param parentOrganizationId the parent organization ID
781            * @param start the lower bound of the range of organizations
782            * @param end the upper bound of the range of organizations (not inclusive)
783            * @return the range of matching organizations
784            */
785            public java.util.List<Organization> findByC_P(long companyId,
786                    long parentOrganizationId, int start, int end);
787    
788            /**
789            * Returns an ordered range of all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
790            *
791            * <p>
792            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
793            * </p>
794            *
795            * @param companyId the company ID
796            * @param parentOrganizationId the parent organization ID
797            * @param start the lower bound of the range of organizations
798            * @param end the upper bound of the range of organizations (not inclusive)
799            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
800            * @return the ordered range of matching organizations
801            */
802            public java.util.List<Organization> findByC_P(long companyId,
803                    long parentOrganizationId, int start, int end,
804                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
805    
806            /**
807            * Returns the first organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
808            *
809            * @param companyId the company ID
810            * @param parentOrganizationId the parent organization ID
811            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
812            * @return the first matching organization
813            * @throws NoSuchOrganizationException if a matching organization could not be found
814            */
815            public Organization findByC_P_First(long companyId,
816                    long parentOrganizationId,
817                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
818                    throws com.liferay.portal.NoSuchOrganizationException;
819    
820            /**
821            * Returns the first organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
822            *
823            * @param companyId the company ID
824            * @param parentOrganizationId the parent organization ID
825            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
826            * @return the first matching organization, or <code>null</code> if a matching organization could not be found
827            */
828            public Organization fetchByC_P_First(long companyId,
829                    long parentOrganizationId,
830                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
831    
832            /**
833            * Returns the last organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
834            *
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 last matching organization
839            * @throws NoSuchOrganizationException if a matching organization could not be found
840            */
841            public Organization findByC_P_Last(long companyId,
842                    long parentOrganizationId,
843                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
844                    throws com.liferay.portal.NoSuchOrganizationException;
845    
846            /**
847            * Returns the last organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
848            *
849            * @param companyId the company ID
850            * @param parentOrganizationId the parent organization ID
851            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
852            * @return the last matching organization, or <code>null</code> if a matching organization could not be found
853            */
854            public Organization fetchByC_P_Last(long companyId,
855                    long parentOrganizationId,
856                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
857    
858            /**
859            * Returns the organizations before and after the current organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
860            *
861            * @param organizationId the primary key of the current organization
862            * @param companyId the company ID
863            * @param parentOrganizationId the parent organization ID
864            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
865            * @return the previous, current, and next organization
866            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
867            */
868            public Organization[] findByC_P_PrevAndNext(long organizationId,
869                    long companyId, long parentOrganizationId,
870                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
871                    throws com.liferay.portal.NoSuchOrganizationException;
872    
873            /**
874            * Returns all the organizations that the user has permission to view where companyId = &#63; and parentOrganizationId = &#63;.
875            *
876            * @param companyId the company ID
877            * @param parentOrganizationId the parent organization ID
878            * @return the matching organizations that the user has permission to view
879            */
880            public java.util.List<Organization> filterFindByC_P(long companyId,
881                    long parentOrganizationId);
882    
883            /**
884            * Returns a range of all the organizations that the user has permission to view where companyId = &#63; and parentOrganizationId = &#63;.
885            *
886            * <p>
887            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
888            * </p>
889            *
890            * @param companyId the company ID
891            * @param parentOrganizationId the parent organization ID
892            * @param start the lower bound of the range of organizations
893            * @param end the upper bound of the range of organizations (not inclusive)
894            * @return the range of matching organizations that the user has permission to view
895            */
896            public java.util.List<Organization> filterFindByC_P(long companyId,
897                    long parentOrganizationId, int start, int end);
898    
899            /**
900            * Returns an ordered range of all the organizations that the user has permissions to view where companyId = &#63; and parentOrganizationId = &#63;.
901            *
902            * <p>
903            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
904            * </p>
905            *
906            * @param companyId the company ID
907            * @param parentOrganizationId the parent organization ID
908            * @param start the lower bound of the range of organizations
909            * @param end the upper bound of the range of organizations (not inclusive)
910            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
911            * @return the ordered range of matching organizations that the user has permission to view
912            */
913            public java.util.List<Organization> filterFindByC_P(long companyId,
914                    long parentOrganizationId, int start, int end,
915                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
916    
917            /**
918            * 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;.
919            *
920            * @param organizationId the primary key of the current organization
921            * @param companyId the company ID
922            * @param parentOrganizationId the parent organization ID
923            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
924            * @return the previous, current, and next organization
925            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
926            */
927            public Organization[] filterFindByC_P_PrevAndNext(long organizationId,
928                    long companyId, long parentOrganizationId,
929                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
930                    throws com.liferay.portal.NoSuchOrganizationException;
931    
932            /**
933            * Removes all the organizations where companyId = &#63; and parentOrganizationId = &#63; from the database.
934            *
935            * @param companyId the company ID
936            * @param parentOrganizationId the parent organization ID
937            */
938            public void removeByC_P(long companyId, long parentOrganizationId);
939    
940            /**
941            * Returns the number of organizations where companyId = &#63; and parentOrganizationId = &#63;.
942            *
943            * @param companyId the company ID
944            * @param parentOrganizationId the parent organization ID
945            * @return the number of matching organizations
946            */
947            public int countByC_P(long companyId, long parentOrganizationId);
948    
949            /**
950            * Returns the number of organizations that the user has permission to view where companyId = &#63; and parentOrganizationId = &#63;.
951            *
952            * @param companyId the company ID
953            * @param parentOrganizationId the parent organization ID
954            * @return the number of matching organizations that the user has permission to view
955            */
956            public int filterCountByC_P(long companyId, long parentOrganizationId);
957    
958            /**
959            * Returns all the organizations where companyId = &#63; and treePath LIKE &#63;.
960            *
961            * @param companyId the company ID
962            * @param treePath the tree path
963            * @return the matching organizations
964            */
965            public java.util.List<Organization> findByC_T(long companyId,
966                    java.lang.String treePath);
967    
968            /**
969            * Returns a range of all the organizations where companyId = &#63; and treePath LIKE &#63;.
970            *
971            * <p>
972            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
973            * </p>
974            *
975            * @param companyId the company ID
976            * @param treePath the tree path
977            * @param start the lower bound of the range of organizations
978            * @param end the upper bound of the range of organizations (not inclusive)
979            * @return the range of matching organizations
980            */
981            public java.util.List<Organization> findByC_T(long companyId,
982                    java.lang.String treePath, int start, int end);
983    
984            /**
985            * Returns an ordered range of all the organizations where companyId = &#63; and treePath LIKE &#63;.
986            *
987            * <p>
988            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
989            * </p>
990            *
991            * @param companyId the company ID
992            * @param treePath the tree path
993            * @param start the lower bound of the range of organizations
994            * @param end the upper bound of the range of organizations (not inclusive)
995            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
996            * @return the ordered range of matching organizations
997            */
998            public java.util.List<Organization> findByC_T(long companyId,
999                    java.lang.String treePath, int start, int end,
1000                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
1001    
1002            /**
1003            * Returns the first organization in the ordered set where companyId = &#63; and treePath LIKE &#63;.
1004            *
1005            * @param companyId the company ID
1006            * @param treePath the tree path
1007            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1008            * @return the first matching organization
1009            * @throws NoSuchOrganizationException if a matching organization could not be found
1010            */
1011            public Organization findByC_T_First(long companyId,
1012                    java.lang.String treePath,
1013                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
1014                    throws com.liferay.portal.NoSuchOrganizationException;
1015    
1016            /**
1017            * Returns the first organization in the ordered set where companyId = &#63; and treePath LIKE &#63;.
1018            *
1019            * @param companyId the company ID
1020            * @param treePath the tree path
1021            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1022            * @return the first matching organization, or <code>null</code> if a matching organization could not be found
1023            */
1024            public Organization fetchByC_T_First(long companyId,
1025                    java.lang.String treePath,
1026                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
1027    
1028            /**
1029            * Returns the last organization in the ordered set where companyId = &#63; and treePath LIKE &#63;.
1030            *
1031            * @param companyId the company ID
1032            * @param treePath the tree path
1033            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1034            * @return the last matching organization
1035            * @throws NoSuchOrganizationException if a matching organization could not be found
1036            */
1037            public Organization findByC_T_Last(long companyId,
1038                    java.lang.String treePath,
1039                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
1040                    throws com.liferay.portal.NoSuchOrganizationException;
1041    
1042            /**
1043            * Returns the last organization in the ordered set where companyId = &#63; and treePath LIKE &#63;.
1044            *
1045            * @param companyId the company ID
1046            * @param treePath the tree path
1047            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1048            * @return the last matching organization, or <code>null</code> if a matching organization could not be found
1049            */
1050            public Organization fetchByC_T_Last(long companyId,
1051                    java.lang.String treePath,
1052                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
1053    
1054            /**
1055            * Returns the organizations before and after the current organization in the ordered set where companyId = &#63; and treePath LIKE &#63;.
1056            *
1057            * @param organizationId the primary key of the current organization
1058            * @param companyId the company ID
1059            * @param treePath the tree path
1060            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1061            * @return the previous, current, and next organization
1062            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
1063            */
1064            public Organization[] findByC_T_PrevAndNext(long organizationId,
1065                    long companyId, java.lang.String treePath,
1066                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
1067                    throws com.liferay.portal.NoSuchOrganizationException;
1068    
1069            /**
1070            * Returns all the organizations that the user has permission to view where companyId = &#63; and treePath LIKE &#63;.
1071            *
1072            * @param companyId the company ID
1073            * @param treePath the tree path
1074            * @return the matching organizations that the user has permission to view
1075            */
1076            public java.util.List<Organization> filterFindByC_T(long companyId,
1077                    java.lang.String treePath);
1078    
1079            /**
1080            * Returns a range of all the organizations that the user has permission to view where companyId = &#63; and treePath LIKE &#63;.
1081            *
1082            * <p>
1083            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1084            * </p>
1085            *
1086            * @param companyId the company ID
1087            * @param treePath the tree path
1088            * @param start the lower bound of the range of organizations
1089            * @param end the upper bound of the range of organizations (not inclusive)
1090            * @return the range of matching organizations that the user has permission to view
1091            */
1092            public java.util.List<Organization> filterFindByC_T(long companyId,
1093                    java.lang.String treePath, int start, int end);
1094    
1095            /**
1096            * Returns an ordered range of all the organizations that the user has permissions to view where companyId = &#63; and treePath LIKE &#63;.
1097            *
1098            * <p>
1099            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1100            * </p>
1101            *
1102            * @param companyId the company ID
1103            * @param treePath the tree path
1104            * @param start the lower bound of the range of organizations
1105            * @param end the upper bound of the range of organizations (not inclusive)
1106            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1107            * @return the ordered range of matching organizations that the user has permission to view
1108            */
1109            public java.util.List<Organization> filterFindByC_T(long companyId,
1110                    java.lang.String treePath, int start, int end,
1111                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
1112    
1113            /**
1114            * 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 treePath LIKE &#63;.
1115            *
1116            * @param organizationId the primary key of the current organization
1117            * @param companyId the company ID
1118            * @param treePath the tree path
1119            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1120            * @return the previous, current, and next organization
1121            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
1122            */
1123            public Organization[] filterFindByC_T_PrevAndNext(long organizationId,
1124                    long companyId, java.lang.String treePath,
1125                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
1126                    throws com.liferay.portal.NoSuchOrganizationException;
1127    
1128            /**
1129            * Removes all the organizations where companyId = &#63; and treePath LIKE &#63; from the database.
1130            *
1131            * @param companyId the company ID
1132            * @param treePath the tree path
1133            */
1134            public void removeByC_T(long companyId, java.lang.String treePath);
1135    
1136            /**
1137            * Returns the number of organizations where companyId = &#63; and treePath LIKE &#63;.
1138            *
1139            * @param companyId the company ID
1140            * @param treePath the tree path
1141            * @return the number of matching organizations
1142            */
1143            public int countByC_T(long companyId, java.lang.String treePath);
1144    
1145            /**
1146            * Returns the number of organizations that the user has permission to view where companyId = &#63; and treePath LIKE &#63;.
1147            *
1148            * @param companyId the company ID
1149            * @param treePath the tree path
1150            * @return the number of matching organizations that the user has permission to view
1151            */
1152            public int filterCountByC_T(long companyId, java.lang.String treePath);
1153    
1154            /**
1155            * Returns the organization where companyId = &#63; and name = &#63; or throws a {@link NoSuchOrganizationException} if it could not be found.
1156            *
1157            * @param companyId the company ID
1158            * @param name the name
1159            * @return the matching organization
1160            * @throws NoSuchOrganizationException if a matching organization could not be found
1161            */
1162            public Organization findByC_N(long companyId, java.lang.String name)
1163                    throws com.liferay.portal.NoSuchOrganizationException;
1164    
1165            /**
1166            * Returns the organization where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
1167            *
1168            * @param companyId the company ID
1169            * @param name the name
1170            * @return the matching organization, or <code>null</code> if a matching organization could not be found
1171            */
1172            public Organization fetchByC_N(long companyId, java.lang.String name);
1173    
1174            /**
1175            * 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.
1176            *
1177            * @param companyId the company ID
1178            * @param name the name
1179            * @param retrieveFromCache whether to use the finder cache
1180            * @return the matching organization, or <code>null</code> if a matching organization could not be found
1181            */
1182            public Organization fetchByC_N(long companyId, java.lang.String name,
1183                    boolean retrieveFromCache);
1184    
1185            /**
1186            * Removes the organization where companyId = &#63; and name = &#63; from the database.
1187            *
1188            * @param companyId the company ID
1189            * @param name the name
1190            * @return the organization that was removed
1191            */
1192            public Organization removeByC_N(long companyId, java.lang.String name)
1193                    throws com.liferay.portal.NoSuchOrganizationException;
1194    
1195            /**
1196            * Returns the number of organizations where companyId = &#63; and name = &#63;.
1197            *
1198            * @param companyId the company ID
1199            * @param name the name
1200            * @return the number of matching organizations
1201            */
1202            public int countByC_N(long companyId, java.lang.String name);
1203    
1204            /**
1205            * Returns all the organizations where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1206            *
1207            * @param organizationId the organization ID
1208            * @param companyId the company ID
1209            * @param parentOrganizationId the parent organization ID
1210            * @return the matching organizations
1211            */
1212            public java.util.List<Organization> findByO_C_P(long organizationId,
1213                    long companyId, long parentOrganizationId);
1214    
1215            /**
1216            * Returns a range of all the organizations where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1217            *
1218            * <p>
1219            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1220            * </p>
1221            *
1222            * @param organizationId the organization ID
1223            * @param companyId the company ID
1224            * @param parentOrganizationId the parent organization ID
1225            * @param start the lower bound of the range of organizations
1226            * @param end the upper bound of the range of organizations (not inclusive)
1227            * @return the range of matching organizations
1228            */
1229            public java.util.List<Organization> findByO_C_P(long organizationId,
1230                    long companyId, long parentOrganizationId, int start, int end);
1231    
1232            /**
1233            * Returns an ordered range of all the organizations where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1234            *
1235            * <p>
1236            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1237            * </p>
1238            *
1239            * @param organizationId the organization ID
1240            * @param companyId the company ID
1241            * @param parentOrganizationId the parent organization ID
1242            * @param start the lower bound of the range of organizations
1243            * @param end the upper bound of the range of organizations (not inclusive)
1244            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1245            * @return the ordered range of matching organizations
1246            */
1247            public java.util.List<Organization> findByO_C_P(long organizationId,
1248                    long companyId, long parentOrganizationId, int start, int end,
1249                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
1250    
1251            /**
1252            * Returns the first organization in the ordered set where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1253            *
1254            * @param organizationId the organization ID
1255            * @param companyId the company ID
1256            * @param parentOrganizationId the parent organization ID
1257            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1258            * @return the first matching organization
1259            * @throws NoSuchOrganizationException if a matching organization could not be found
1260            */
1261            public Organization findByO_C_P_First(long organizationId, long companyId,
1262                    long parentOrganizationId,
1263                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
1264                    throws com.liferay.portal.NoSuchOrganizationException;
1265    
1266            /**
1267            * Returns the first organization in the ordered set where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1268            *
1269            * @param organizationId the organization ID
1270            * @param companyId the company ID
1271            * @param parentOrganizationId the parent organization ID
1272            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1273            * @return the first matching organization, or <code>null</code> if a matching organization could not be found
1274            */
1275            public Organization fetchByO_C_P_First(long organizationId, long companyId,
1276                    long parentOrganizationId,
1277                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
1278    
1279            /**
1280            * Returns the last organization in the ordered set where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1281            *
1282            * @param organizationId the organization ID
1283            * @param companyId the company ID
1284            * @param parentOrganizationId the parent organization ID
1285            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1286            * @return the last matching organization
1287            * @throws NoSuchOrganizationException if a matching organization could not be found
1288            */
1289            public Organization findByO_C_P_Last(long organizationId, long companyId,
1290                    long parentOrganizationId,
1291                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator)
1292                    throws com.liferay.portal.NoSuchOrganizationException;
1293    
1294            /**
1295            * Returns the last organization in the ordered set where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1296            *
1297            * @param organizationId the organization ID
1298            * @param companyId the company ID
1299            * @param parentOrganizationId the parent organization ID
1300            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1301            * @return the last matching organization, or <code>null</code> if a matching organization could not be found
1302            */
1303            public Organization fetchByO_C_P_Last(long organizationId, long companyId,
1304                    long parentOrganizationId,
1305                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
1306    
1307            /**
1308            * Returns all the organizations that the user has permission to view where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1309            *
1310            * @param organizationId the organization ID
1311            * @param companyId the company ID
1312            * @param parentOrganizationId the parent organization ID
1313            * @return the matching organizations that the user has permission to view
1314            */
1315            public java.util.List<Organization> filterFindByO_C_P(long organizationId,
1316                    long companyId, long parentOrganizationId);
1317    
1318            /**
1319            * Returns a range of all the organizations that the user has permission to view where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1320            *
1321            * <p>
1322            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1323            * </p>
1324            *
1325            * @param organizationId the organization ID
1326            * @param companyId the company ID
1327            * @param parentOrganizationId the parent organization ID
1328            * @param start the lower bound of the range of organizations
1329            * @param end the upper bound of the range of organizations (not inclusive)
1330            * @return the range of matching organizations that the user has permission to view
1331            */
1332            public java.util.List<Organization> filterFindByO_C_P(long organizationId,
1333                    long companyId, long parentOrganizationId, int start, int end);
1334    
1335            /**
1336            * Returns an ordered range of all the organizations that the user has permissions to view where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1337            *
1338            * <p>
1339            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1340            * </p>
1341            *
1342            * @param organizationId the organization ID
1343            * @param companyId the company ID
1344            * @param parentOrganizationId the parent organization ID
1345            * @param start the lower bound of the range of organizations
1346            * @param end the upper bound of the range of organizations (not inclusive)
1347            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1348            * @return the ordered range of matching organizations that the user has permission to view
1349            */
1350            public java.util.List<Organization> filterFindByO_C_P(long organizationId,
1351                    long companyId, long parentOrganizationId, int start, int end,
1352                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
1353    
1354            /**
1355            * Removes all the organizations where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63; from the database.
1356            *
1357            * @param organizationId the organization ID
1358            * @param companyId the company ID
1359            * @param parentOrganizationId the parent organization ID
1360            */
1361            public void removeByO_C_P(long organizationId, long companyId,
1362                    long parentOrganizationId);
1363    
1364            /**
1365            * Returns the number of organizations where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1366            *
1367            * @param organizationId the organization ID
1368            * @param companyId the company ID
1369            * @param parentOrganizationId the parent organization ID
1370            * @return the number of matching organizations
1371            */
1372            public int countByO_C_P(long organizationId, long companyId,
1373                    long parentOrganizationId);
1374    
1375            /**
1376            * Returns the number of organizations that the user has permission to view where organizationId &gt; &#63; and companyId = &#63; and parentOrganizationId = &#63;.
1377            *
1378            * @param organizationId the organization ID
1379            * @param companyId the company ID
1380            * @param parentOrganizationId the parent organization ID
1381            * @return the number of matching organizations that the user has permission to view
1382            */
1383            public int filterCountByO_C_P(long organizationId, long companyId,
1384                    long parentOrganizationId);
1385    
1386            /**
1387            * Caches the organization in the entity cache if it is enabled.
1388            *
1389            * @param organization the organization
1390            */
1391            public void cacheResult(Organization organization);
1392    
1393            /**
1394            * Caches the organizations in the entity cache if it is enabled.
1395            *
1396            * @param organizations the organizations
1397            */
1398            public void cacheResult(java.util.List<Organization> organizations);
1399    
1400            /**
1401            * Creates a new organization with the primary key. Does not add the organization to the database.
1402            *
1403            * @param organizationId the primary key for the new organization
1404            * @return the new organization
1405            */
1406            public Organization create(long organizationId);
1407    
1408            /**
1409            * Removes the organization with the primary key from the database. Also notifies the appropriate model listeners.
1410            *
1411            * @param organizationId the primary key of the organization
1412            * @return the organization that was removed
1413            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
1414            */
1415            public Organization remove(long organizationId)
1416                    throws com.liferay.portal.NoSuchOrganizationException;
1417    
1418            public Organization updateImpl(Organization organization);
1419    
1420            /**
1421            * Returns the organization with the primary key or throws a {@link NoSuchOrganizationException} if it could not be found.
1422            *
1423            * @param organizationId the primary key of the organization
1424            * @return the organization
1425            * @throws NoSuchOrganizationException if a organization with the primary key could not be found
1426            */
1427            public Organization findByPrimaryKey(long organizationId)
1428                    throws com.liferay.portal.NoSuchOrganizationException;
1429    
1430            /**
1431            * Returns the organization with the primary key or returns <code>null</code> if it could not be found.
1432            *
1433            * @param organizationId the primary key of the organization
1434            * @return the organization, or <code>null</code> if a organization with the primary key could not be found
1435            */
1436            public Organization fetchByPrimaryKey(long organizationId);
1437    
1438            @Override
1439            public java.util.Map<java.io.Serializable, Organization> fetchByPrimaryKeys(
1440                    java.util.Set<java.io.Serializable> primaryKeys);
1441    
1442            /**
1443            * Returns all the organizations.
1444            *
1445            * @return the organizations
1446            */
1447            public java.util.List<Organization> findAll();
1448    
1449            /**
1450            * Returns a range of all the organizations.
1451            *
1452            * <p>
1453            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1454            * </p>
1455            *
1456            * @param start the lower bound of the range of organizations
1457            * @param end the upper bound of the range of organizations (not inclusive)
1458            * @return the range of organizations
1459            */
1460            public java.util.List<Organization> findAll(int start, int end);
1461    
1462            /**
1463            * Returns an ordered range of all the organizations.
1464            *
1465            * <p>
1466            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1467            * </p>
1468            *
1469            * @param start the lower bound of the range of organizations
1470            * @param end the upper bound of the range of organizations (not inclusive)
1471            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1472            * @return the ordered range of organizations
1473            */
1474            public java.util.List<Organization> findAll(int start, int end,
1475                    com.liferay.portal.kernel.util.OrderByComparator<Organization> orderByComparator);
1476    
1477            /**
1478            * Removes all the organizations from the database.
1479            */
1480            public void removeAll();
1481    
1482            /**
1483            * Returns the number of organizations.
1484            *
1485            * @return the number of organizations
1486            */
1487            public int countAll();
1488    
1489            /**
1490            * Returns the primaryKeys of groups associated with the organization.
1491            *
1492            * @param pk the primary key of the organization
1493            * @return long[] of the primaryKeys of groups associated with the organization
1494            */
1495            public long[] getGroupPrimaryKeys(long pk);
1496    
1497            /**
1498            * Returns all the groups associated with the organization.
1499            *
1500            * @param pk the primary key of the organization
1501            * @return the groups associated with the organization
1502            */
1503            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk);
1504    
1505            /**
1506            * Returns a range of all the groups associated with the organization.
1507            *
1508            * <p>
1509            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1510            * </p>
1511            *
1512            * @param pk the primary key of the organization
1513            * @param start the lower bound of the range of organizations
1514            * @param end the upper bound of the range of organizations (not inclusive)
1515            * @return the range of groups associated with the organization
1516            */
1517            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
1518                    int start, int end);
1519    
1520            /**
1521            * Returns an ordered range of all the groups associated with the organization.
1522            *
1523            * <p>
1524            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1525            * </p>
1526            *
1527            * @param pk the primary key of the organization
1528            * @param start the lower bound of the range of organizations
1529            * @param end the upper bound of the range of organizations (not inclusive)
1530            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1531            * @return the ordered range of groups associated with the organization
1532            */
1533            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
1534                    int start, int end,
1535                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Group> orderByComparator);
1536    
1537            /**
1538            * Returns the number of groups associated with the organization.
1539            *
1540            * @param pk the primary key of the organization
1541            * @return the number of groups associated with the organization
1542            */
1543            public int getGroupsSize(long pk);
1544    
1545            /**
1546            * Returns <code>true</code> if the group is associated with the organization.
1547            *
1548            * @param pk the primary key of the organization
1549            * @param groupPK the primary key of the group
1550            * @return <code>true</code> if the group is associated with the organization; <code>false</code> otherwise
1551            */
1552            public boolean containsGroup(long pk, long groupPK);
1553    
1554            /**
1555            * Returns <code>true</code> if the organization has any groups associated with it.
1556            *
1557            * @param pk the primary key of the organization to check for associations with groups
1558            * @return <code>true</code> if the organization has any groups associated with it; <code>false</code> otherwise
1559            */
1560            public boolean containsGroups(long pk);
1561    
1562            /**
1563            * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1564            *
1565            * @param pk the primary key of the organization
1566            * @param groupPK the primary key of the group
1567            */
1568            public void addGroup(long pk, long groupPK);
1569    
1570            /**
1571            * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1572            *
1573            * @param pk the primary key of the organization
1574            * @param group the group
1575            */
1576            public void addGroup(long pk, com.liferay.portal.model.Group group);
1577    
1578            /**
1579            * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1580            *
1581            * @param pk the primary key of the organization
1582            * @param groupPKs the primary keys of the groups
1583            */
1584            public void addGroups(long pk, long[] groupPKs);
1585    
1586            /**
1587            * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1588            *
1589            * @param pk the primary key of the organization
1590            * @param groups the groups
1591            */
1592            public void addGroups(long pk,
1593                    java.util.List<com.liferay.portal.model.Group> groups);
1594    
1595            /**
1596            * Clears all associations between the organization and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1597            *
1598            * @param pk the primary key of the organization to clear the associated groups from
1599            */
1600            public void clearGroups(long pk);
1601    
1602            /**
1603            * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1604            *
1605            * @param pk the primary key of the organization
1606            * @param groupPK the primary key of the group
1607            */
1608            public void removeGroup(long pk, long groupPK);
1609    
1610            /**
1611            * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1612            *
1613            * @param pk the primary key of the organization
1614            * @param group the group
1615            */
1616            public void removeGroup(long pk, com.liferay.portal.model.Group group);
1617    
1618            /**
1619            * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1620            *
1621            * @param pk the primary key of the organization
1622            * @param groupPKs the primary keys of the groups
1623            */
1624            public void removeGroups(long pk, long[] groupPKs);
1625    
1626            /**
1627            * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1628            *
1629            * @param pk the primary key of the organization
1630            * @param groups the groups
1631            */
1632            public void removeGroups(long pk,
1633                    java.util.List<com.liferay.portal.model.Group> groups);
1634    
1635            /**
1636            * 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.
1637            *
1638            * @param pk the primary key of the organization
1639            * @param groupPKs the primary keys of the groups to be associated with the organization
1640            */
1641            public void setGroups(long pk, long[] groupPKs);
1642    
1643            /**
1644            * 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.
1645            *
1646            * @param pk the primary key of the organization
1647            * @param groups the groups to be associated with the organization
1648            */
1649            public void setGroups(long pk,
1650                    java.util.List<com.liferay.portal.model.Group> groups);
1651    
1652            /**
1653            * Returns the primaryKeys of users associated with the organization.
1654            *
1655            * @param pk the primary key of the organization
1656            * @return long[] of the primaryKeys of users associated with the organization
1657            */
1658            public long[] getUserPrimaryKeys(long pk);
1659    
1660            /**
1661            * Returns all the users associated with the organization.
1662            *
1663            * @param pk the primary key of the organization
1664            * @return the users associated with the organization
1665            */
1666            public java.util.List<com.liferay.portal.model.User> getUsers(long pk);
1667    
1668            /**
1669            * Returns a range of all the users associated with the organization.
1670            *
1671            * <p>
1672            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1673            * </p>
1674            *
1675            * @param pk the primary key of the organization
1676            * @param start the lower bound of the range of organizations
1677            * @param end the upper bound of the range of organizations (not inclusive)
1678            * @return the range of users associated with the organization
1679            */
1680            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
1681                    int start, int end);
1682    
1683            /**
1684            * Returns an ordered range of all the users associated with the organization.
1685            *
1686            * <p>
1687            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
1688            * </p>
1689            *
1690            * @param pk the primary key of the organization
1691            * @param start the lower bound of the range of organizations
1692            * @param end the upper bound of the range of organizations (not inclusive)
1693            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1694            * @return the ordered range of users associated with the organization
1695            */
1696            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
1697                    int start, int end,
1698                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator);
1699    
1700            /**
1701            * Returns the number of users associated with the organization.
1702            *
1703            * @param pk the primary key of the organization
1704            * @return the number of users associated with the organization
1705            */
1706            public int getUsersSize(long pk);
1707    
1708            /**
1709            * Returns <code>true</code> if the user is associated with the organization.
1710            *
1711            * @param pk the primary key of the organization
1712            * @param userPK the primary key of the user
1713            * @return <code>true</code> if the user is associated with the organization; <code>false</code> otherwise
1714            */
1715            public boolean containsUser(long pk, long userPK);
1716    
1717            /**
1718            * Returns <code>true</code> if the organization has any users associated with it.
1719            *
1720            * @param pk the primary key of the organization to check for associations with users
1721            * @return <code>true</code> if the organization has any users associated with it; <code>false</code> otherwise
1722            */
1723            public boolean containsUsers(long pk);
1724    
1725            /**
1726            * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1727            *
1728            * @param pk the primary key of the organization
1729            * @param userPK the primary key of the user
1730            */
1731            public void addUser(long pk, long userPK);
1732    
1733            /**
1734            * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1735            *
1736            * @param pk the primary key of the organization
1737            * @param user the user
1738            */
1739            public void addUser(long pk, com.liferay.portal.model.User user);
1740    
1741            /**
1742            * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1743            *
1744            * @param pk the primary key of the organization
1745            * @param userPKs the primary keys of the users
1746            */
1747            public void addUsers(long pk, long[] userPKs);
1748    
1749            /**
1750            * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1751            *
1752            * @param pk the primary key of the organization
1753            * @param users the users
1754            */
1755            public void addUsers(long pk,
1756                    java.util.List<com.liferay.portal.model.User> users);
1757    
1758            /**
1759            * Clears all associations between the organization and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1760            *
1761            * @param pk the primary key of the organization to clear the associated users from
1762            */
1763            public void clearUsers(long pk);
1764    
1765            /**
1766            * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1767            *
1768            * @param pk the primary key of the organization
1769            * @param userPK the primary key of the user
1770            */
1771            public void removeUser(long pk, long userPK);
1772    
1773            /**
1774            * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1775            *
1776            * @param pk the primary key of the organization
1777            * @param user the user
1778            */
1779            public void removeUser(long pk, com.liferay.portal.model.User user);
1780    
1781            /**
1782            * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1783            *
1784            * @param pk the primary key of the organization
1785            * @param userPKs the primary keys of the users
1786            */
1787            public void removeUsers(long pk, long[] userPKs);
1788    
1789            /**
1790            * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1791            *
1792            * @param pk the primary key of the organization
1793            * @param users the users
1794            */
1795            public void removeUsers(long pk,
1796                    java.util.List<com.liferay.portal.model.User> users);
1797    
1798            /**
1799            * 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.
1800            *
1801            * @param pk the primary key of the organization
1802            * @param userPKs the primary keys of the users to be associated with the organization
1803            */
1804            public void setUsers(long pk, long[] userPKs);
1805    
1806            /**
1807            * 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.
1808            *
1809            * @param pk the primary key of the organization
1810            * @param users the users to be associated with the organization
1811            */
1812            public void setUsers(long pk,
1813                    java.util.List<com.liferay.portal.model.User> users);
1814    }