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