001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.Organization;
018    
019    /**
020     * The persistence interface for the organization service.
021     *
022     * <p>
023     * 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.
024     * </p>
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see OrganizationPersistenceImpl
032     * @see OrganizationUtil
033     * @generated
034     */
035    public interface OrganizationPersistence extends BasePersistence<Organization> {
036            /**
037            * Caches the organization in the entity cache if it is enabled.
038            *
039            * @param organization the organization to cache
040            */
041            public void cacheResult(com.liferay.portal.model.Organization organization);
042    
043            /**
044            * Caches the organizations in the entity cache if it is enabled.
045            *
046            * @param organizations the organizations to cache
047            */
048            public void cacheResult(
049                    java.util.List<com.liferay.portal.model.Organization> organizations);
050    
051            /**
052            * Creates a new organization with the primary key. Does not add the organization to the database.
053            *
054            * @param organizationId the primary key for the new organization
055            * @return the new organization
056            */
057            public com.liferay.portal.model.Organization create(long organizationId);
058    
059            /**
060            * Removes the organization with the primary key from the database. Also notifies the appropriate model listeners.
061            *
062            * @param organizationId the primary key of the organization to remove
063            * @return the organization that was removed
064            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
065            * @throws SystemException if a system exception occurred
066            */
067            public com.liferay.portal.model.Organization remove(long organizationId)
068                    throws com.liferay.portal.NoSuchOrganizationException,
069                            com.liferay.portal.kernel.exception.SystemException;
070    
071            public com.liferay.portal.model.Organization updateImpl(
072                    com.liferay.portal.model.Organization organization, boolean merge)
073                    throws com.liferay.portal.kernel.exception.SystemException;
074    
075            /**
076            * Finds the organization with the primary key or throws a {@link com.liferay.portal.NoSuchOrganizationException} if it could not be found.
077            *
078            * @param organizationId the primary key of the organization to find
079            * @return the organization
080            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
081            * @throws SystemException if a system exception occurred
082            */
083            public com.liferay.portal.model.Organization findByPrimaryKey(
084                    long organizationId)
085                    throws com.liferay.portal.NoSuchOrganizationException,
086                            com.liferay.portal.kernel.exception.SystemException;
087    
088            /**
089            * Finds the organization with the primary key or returns <code>null</code> if it could not be found.
090            *
091            * @param organizationId the primary key of the organization to find
092            * @return the organization, or <code>null</code> if a organization with the primary key could not be found
093            * @throws SystemException if a system exception occurred
094            */
095            public com.liferay.portal.model.Organization fetchByPrimaryKey(
096                    long organizationId)
097                    throws com.liferay.portal.kernel.exception.SystemException;
098    
099            /**
100            * Finds all the organizations where companyId = &#63;.
101            *
102            * @param companyId the company id to search with
103            * @return the matching organizations
104            * @throws SystemException if a system exception occurred
105            */
106            public java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
107                    long companyId)
108                    throws com.liferay.portal.kernel.exception.SystemException;
109    
110            /**
111            * Finds a range of all the organizations where companyId = &#63;.
112            *
113            * <p>
114            * 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.
115            * </p>
116            *
117            * @param companyId the company id to search with
118            * @param start the lower bound of the range of organizations to return
119            * @param end the upper bound of the range of organizations to return (not inclusive)
120            * @return the range of matching organizations
121            * @throws SystemException if a system exception occurred
122            */
123            public java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
124                    long companyId, int start, int end)
125                    throws com.liferay.portal.kernel.exception.SystemException;
126    
127            /**
128            * Finds an ordered range of all the organizations where companyId = &#63;.
129            *
130            * <p>
131            * 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.
132            * </p>
133            *
134            * @param companyId the company id to search with
135            * @param start the lower bound of the range of organizations to return
136            * @param end the upper bound of the range of organizations to return (not inclusive)
137            * @param orderByComparator the comparator to order the results by
138            * @return the ordered range of matching organizations
139            * @throws SystemException if a system exception occurred
140            */
141            public java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
142                    long companyId, int start, int end,
143                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
144                    throws com.liferay.portal.kernel.exception.SystemException;
145    
146            /**
147            * Finds the first organization in the ordered set where companyId = &#63;.
148            *
149            * <p>
150            * 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.
151            * </p>
152            *
153            * @param companyId the company id to search with
154            * @param orderByComparator the comparator to order the set by
155            * @return the first matching organization
156            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            public com.liferay.portal.model.Organization findByCompanyId_First(
160                    long companyId,
161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162                    throws com.liferay.portal.NoSuchOrganizationException,
163                            com.liferay.portal.kernel.exception.SystemException;
164    
165            /**
166            * Finds the last organization in the ordered set where companyId = &#63;.
167            *
168            * <p>
169            * 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.
170            * </p>
171            *
172            * @param companyId the company id to search with
173            * @param orderByComparator the comparator to order the set by
174            * @return the last matching organization
175            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public com.liferay.portal.model.Organization findByCompanyId_Last(
179                    long companyId,
180                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181                    throws com.liferay.portal.NoSuchOrganizationException,
182                            com.liferay.portal.kernel.exception.SystemException;
183    
184            /**
185            * Finds the organizations before and after the current organization in the ordered set where companyId = &#63;.
186            *
187            * <p>
188            * 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.
189            * </p>
190            *
191            * @param organizationId the primary key of the current organization
192            * @param companyId the company id to search with
193            * @param orderByComparator the comparator to order the set by
194            * @return the previous, current, and next organization
195            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
196            * @throws SystemException if a system exception occurred
197            */
198            public com.liferay.portal.model.Organization[] findByCompanyId_PrevAndNext(
199                    long organizationId, long companyId,
200                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201                    throws com.liferay.portal.NoSuchOrganizationException,
202                            com.liferay.portal.kernel.exception.SystemException;
203    
204            /**
205            * Filters by the user's permissions and finds all the organizations where companyId = &#63;.
206            *
207            * @param companyId the company id to search with
208            * @return the matching organizations that the user has permission to view
209            * @throws SystemException if a system exception occurred
210            */
211            public java.util.List<com.liferay.portal.model.Organization> filterFindByCompanyId(
212                    long companyId)
213                    throws com.liferay.portal.kernel.exception.SystemException;
214    
215            /**
216            * Filters by the user's permissions and finds a range of all the organizations where companyId = &#63;.
217            *
218            * <p>
219            * 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.
220            * </p>
221            *
222            * @param companyId the company id to search with
223            * @param start the lower bound of the range of organizations to return
224            * @param end the upper bound of the range of organizations to return (not inclusive)
225            * @return the range of matching organizations that the user has permission to view
226            * @throws SystemException if a system exception occurred
227            */
228            public java.util.List<com.liferay.portal.model.Organization> filterFindByCompanyId(
229                    long companyId, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException;
231    
232            /**
233            * Filters by the user's permissions and finds an ordered range of all the organizations where 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.
237            * </p>
238            *
239            * @param companyId the company id to search with
240            * @param start the lower bound of the range of organizations to return
241            * @param end the upper bound of the range of organizations to return (not inclusive)
242            * @param orderByComparator the comparator to order the results by
243            * @return the ordered range of matching organizations that the user has permission to view
244            * @throws SystemException if a system exception occurred
245            */
246            public java.util.List<com.liferay.portal.model.Organization> filterFindByCompanyId(
247                    long companyId, int start, int end,
248                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            /**
252            * Finds all the organizations where companyId = &#63;.
253            *
254            * @param companyId the company id to search with
255            * @return the matching organizations
256            * @throws SystemException if a system exception occurred
257            */
258            public java.util.List<com.liferay.portal.model.Organization> findByLocations(
259                    long companyId)
260                    throws com.liferay.portal.kernel.exception.SystemException;
261    
262            /**
263            * Finds a range of all the organizations where companyId = &#63;.
264            *
265            * <p>
266            * 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.
267            * </p>
268            *
269            * @param companyId the company id to search with
270            * @param start the lower bound of the range of organizations to return
271            * @param end the upper bound of the range of organizations to return (not inclusive)
272            * @return the range of matching organizations
273            * @throws SystemException if a system exception occurred
274            */
275            public java.util.List<com.liferay.portal.model.Organization> findByLocations(
276                    long companyId, int start, int end)
277                    throws com.liferay.portal.kernel.exception.SystemException;
278    
279            /**
280            * Finds an ordered range of all the organizations where companyId = &#63;.
281            *
282            * <p>
283            * 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.
284            * </p>
285            *
286            * @param companyId the company id to search with
287            * @param start the lower bound of the range of organizations to return
288            * @param end the upper bound of the range of organizations to return (not inclusive)
289            * @param orderByComparator the comparator to order the results by
290            * @return the ordered range of matching organizations
291            * @throws SystemException if a system exception occurred
292            */
293            public java.util.List<com.liferay.portal.model.Organization> findByLocations(
294                    long companyId, int start, int end,
295                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
296                    throws com.liferay.portal.kernel.exception.SystemException;
297    
298            /**
299            * Finds the first organization in the ordered set where companyId = &#63;.
300            *
301            * <p>
302            * 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.
303            * </p>
304            *
305            * @param companyId the company id to search with
306            * @param orderByComparator the comparator to order the set by
307            * @return the first matching organization
308            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
309            * @throws SystemException if a system exception occurred
310            */
311            public com.liferay.portal.model.Organization findByLocations_First(
312                    long companyId,
313                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
314                    throws com.liferay.portal.NoSuchOrganizationException,
315                            com.liferay.portal.kernel.exception.SystemException;
316    
317            /**
318            * Finds the last organization in the ordered set where companyId = &#63;.
319            *
320            * <p>
321            * 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.
322            * </p>
323            *
324            * @param companyId the company id to search with
325            * @param orderByComparator the comparator to order the set by
326            * @return the last matching organization
327            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
328            * @throws SystemException if a system exception occurred
329            */
330            public com.liferay.portal.model.Organization findByLocations_Last(
331                    long companyId,
332                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
333                    throws com.liferay.portal.NoSuchOrganizationException,
334                            com.liferay.portal.kernel.exception.SystemException;
335    
336            /**
337            * Finds the organizations before and after the current organization in the ordered set where companyId = &#63;.
338            *
339            * <p>
340            * 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.
341            * </p>
342            *
343            * @param organizationId the primary key of the current organization
344            * @param companyId the company id to search with
345            * @param orderByComparator the comparator to order the set by
346            * @return the previous, current, and next organization
347            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
348            * @throws SystemException if a system exception occurred
349            */
350            public com.liferay.portal.model.Organization[] findByLocations_PrevAndNext(
351                    long organizationId, long companyId,
352                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
353                    throws com.liferay.portal.NoSuchOrganizationException,
354                            com.liferay.portal.kernel.exception.SystemException;
355    
356            /**
357            * Filters by the user's permissions and finds all the organizations where companyId = &#63;.
358            *
359            * @param companyId the company id to search with
360            * @return the matching organizations that the user has permission to view
361            * @throws SystemException if a system exception occurred
362            */
363            public java.util.List<com.liferay.portal.model.Organization> filterFindByLocations(
364                    long companyId)
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * Filters by the user's permissions and finds a range of all the organizations where companyId = &#63;.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param companyId the company id to search with
375            * @param start the lower bound of the range of organizations to return
376            * @param end the upper bound of the range of organizations to return (not inclusive)
377            * @return the range of matching organizations that the user has permission to view
378            * @throws SystemException if a system exception occurred
379            */
380            public java.util.List<com.liferay.portal.model.Organization> filterFindByLocations(
381                    long companyId, int start, int end)
382                    throws com.liferay.portal.kernel.exception.SystemException;
383    
384            /**
385            * Filters by the user's permissions and finds an ordered range of all the organizations where companyId = &#63;.
386            *
387            * <p>
388            * 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.
389            * </p>
390            *
391            * @param companyId the company id to search with
392            * @param start the lower bound of the range of organizations to return
393            * @param end the upper bound of the range of organizations to return (not inclusive)
394            * @param orderByComparator the comparator to order the results by
395            * @return the ordered range of matching organizations that the user has permission to view
396            * @throws SystemException if a system exception occurred
397            */
398            public java.util.List<com.liferay.portal.model.Organization> filterFindByLocations(
399                    long companyId, int start, int end,
400                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
401                    throws com.liferay.portal.kernel.exception.SystemException;
402    
403            /**
404            * Finds all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
405            *
406            * @param companyId the company id to search with
407            * @param parentOrganizationId the parent organization id to search with
408            * @return the matching organizations
409            * @throws SystemException if a system exception occurred
410            */
411            public java.util.List<com.liferay.portal.model.Organization> findByC_P(
412                    long companyId, long parentOrganizationId)
413                    throws com.liferay.portal.kernel.exception.SystemException;
414    
415            /**
416            * Finds a range of all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
417            *
418            * <p>
419            * 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.
420            * </p>
421            *
422            * @param companyId the company id to search with
423            * @param parentOrganizationId the parent organization id to search with
424            * @param start the lower bound of the range of organizations to return
425            * @param end the upper bound of the range of organizations to return (not inclusive)
426            * @return the range of matching organizations
427            * @throws SystemException if a system exception occurred
428            */
429            public java.util.List<com.liferay.portal.model.Organization> findByC_P(
430                    long companyId, long parentOrganizationId, int start, int end)
431                    throws com.liferay.portal.kernel.exception.SystemException;
432    
433            /**
434            * Finds an ordered range of all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
435            *
436            * <p>
437            * 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.
438            * </p>
439            *
440            * @param companyId the company id to search with
441            * @param parentOrganizationId the parent organization id to search with
442            * @param start the lower bound of the range of organizations to return
443            * @param end the upper bound of the range of organizations to return (not inclusive)
444            * @param orderByComparator the comparator to order the results by
445            * @return the ordered range of matching organizations
446            * @throws SystemException if a system exception occurred
447            */
448            public java.util.List<com.liferay.portal.model.Organization> findByC_P(
449                    long companyId, long parentOrganizationId, int start, int end,
450                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
451                    throws com.liferay.portal.kernel.exception.SystemException;
452    
453            /**
454            * Finds the first organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
455            *
456            * <p>
457            * 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.
458            * </p>
459            *
460            * @param companyId the company id to search with
461            * @param parentOrganizationId the parent organization id to search with
462            * @param orderByComparator the comparator to order the set by
463            * @return the first matching organization
464            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
465            * @throws SystemException if a system exception occurred
466            */
467            public com.liferay.portal.model.Organization findByC_P_First(
468                    long companyId, long parentOrganizationId,
469                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
470                    throws com.liferay.portal.NoSuchOrganizationException,
471                            com.liferay.portal.kernel.exception.SystemException;
472    
473            /**
474            * Finds the last organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
475            *
476            * <p>
477            * 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.
478            * </p>
479            *
480            * @param companyId the company id to search with
481            * @param parentOrganizationId the parent organization id to search with
482            * @param orderByComparator the comparator to order the set by
483            * @return the last matching organization
484            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
485            * @throws SystemException if a system exception occurred
486            */
487            public com.liferay.portal.model.Organization findByC_P_Last(
488                    long companyId, long parentOrganizationId,
489                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
490                    throws com.liferay.portal.NoSuchOrganizationException,
491                            com.liferay.portal.kernel.exception.SystemException;
492    
493            /**
494            * Finds the organizations before and after the current organization in the ordered set where companyId = &#63; and parentOrganizationId = &#63;.
495            *
496            * <p>
497            * 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.
498            * </p>
499            *
500            * @param organizationId the primary key of the current organization
501            * @param companyId the company id to search with
502            * @param parentOrganizationId the parent organization id to search with
503            * @param orderByComparator the comparator to order the set by
504            * @return the previous, current, and next organization
505            * @throws com.liferay.portal.NoSuchOrganizationException if a organization with the primary key could not be found
506            * @throws SystemException if a system exception occurred
507            */
508            public com.liferay.portal.model.Organization[] findByC_P_PrevAndNext(
509                    long organizationId, long companyId, long parentOrganizationId,
510                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
511                    throws com.liferay.portal.NoSuchOrganizationException,
512                            com.liferay.portal.kernel.exception.SystemException;
513    
514            /**
515            * Filters by the user's permissions and finds all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
516            *
517            * @param companyId the company id to search with
518            * @param parentOrganizationId the parent organization id to search with
519            * @return the matching organizations that the user has permission to view
520            * @throws SystemException if a system exception occurred
521            */
522            public java.util.List<com.liferay.portal.model.Organization> filterFindByC_P(
523                    long companyId, long parentOrganizationId)
524                    throws com.liferay.portal.kernel.exception.SystemException;
525    
526            /**
527            * Filters by the user's permissions and finds a range of all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
528            *
529            * <p>
530            * 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.
531            * </p>
532            *
533            * @param companyId the company id to search with
534            * @param parentOrganizationId the parent organization id to search with
535            * @param start the lower bound of the range of organizations to return
536            * @param end the upper bound of the range of organizations to return (not inclusive)
537            * @return the range of matching organizations that the user has permission to view
538            * @throws SystemException if a system exception occurred
539            */
540            public java.util.List<com.liferay.portal.model.Organization> filterFindByC_P(
541                    long companyId, long parentOrganizationId, int start, int end)
542                    throws com.liferay.portal.kernel.exception.SystemException;
543    
544            /**
545            * Filters by the user's permissions and finds an ordered range of all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
546            *
547            * <p>
548            * 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.
549            * </p>
550            *
551            * @param companyId the company id to search with
552            * @param parentOrganizationId the parent organization id to search with
553            * @param start the lower bound of the range of organizations to return
554            * @param end the upper bound of the range of organizations to return (not inclusive)
555            * @param orderByComparator the comparator to order the results by
556            * @return the ordered range of matching organizations that the user has permission to view
557            * @throws SystemException if a system exception occurred
558            */
559            public java.util.List<com.liferay.portal.model.Organization> filterFindByC_P(
560                    long companyId, long parentOrganizationId, int start, int end,
561                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
562                    throws com.liferay.portal.kernel.exception.SystemException;
563    
564            /**
565            * Finds the organization where companyId = &#63; and name = &#63; or throws a {@link com.liferay.portal.NoSuchOrganizationException} if it could not be found.
566            *
567            * @param companyId the company id to search with
568            * @param name the name to search with
569            * @return the matching organization
570            * @throws com.liferay.portal.NoSuchOrganizationException if a matching organization could not be found
571            * @throws SystemException if a system exception occurred
572            */
573            public com.liferay.portal.model.Organization findByC_N(long companyId,
574                    java.lang.String name)
575                    throws com.liferay.portal.NoSuchOrganizationException,
576                            com.liferay.portal.kernel.exception.SystemException;
577    
578            /**
579            * Finds the organization where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
580            *
581            * @param companyId the company id to search with
582            * @param name the name to search with
583            * @return the matching organization, or <code>null</code> if a matching organization could not be found
584            * @throws SystemException if a system exception occurred
585            */
586            public com.liferay.portal.model.Organization fetchByC_N(long companyId,
587                    java.lang.String name)
588                    throws com.liferay.portal.kernel.exception.SystemException;
589    
590            /**
591            * Finds the organization where companyId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
592            *
593            * @param companyId the company id to search with
594            * @param name the name to search with
595            * @return the matching organization, or <code>null</code> if a matching organization could not be found
596            * @throws SystemException if a system exception occurred
597            */
598            public com.liferay.portal.model.Organization fetchByC_N(long companyId,
599                    java.lang.String name, boolean retrieveFromCache)
600                    throws com.liferay.portal.kernel.exception.SystemException;
601    
602            /**
603            * Finds all the organizations.
604            *
605            * @return the organizations
606            * @throws SystemException if a system exception occurred
607            */
608            public java.util.List<com.liferay.portal.model.Organization> findAll()
609                    throws com.liferay.portal.kernel.exception.SystemException;
610    
611            /**
612            * Finds a range of all the organizations.
613            *
614            * <p>
615            * 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.
616            * </p>
617            *
618            * @param start the lower bound of the range of organizations to return
619            * @param end the upper bound of the range of organizations to return (not inclusive)
620            * @return the range of organizations
621            * @throws SystemException if a system exception occurred
622            */
623            public java.util.List<com.liferay.portal.model.Organization> findAll(
624                    int start, int end)
625                    throws com.liferay.portal.kernel.exception.SystemException;
626    
627            /**
628            * Finds an ordered range of all the organizations.
629            *
630            * <p>
631            * 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.
632            * </p>
633            *
634            * @param start the lower bound of the range of organizations to return
635            * @param end the upper bound of the range of organizations to return (not inclusive)
636            * @param orderByComparator the comparator to order the results by
637            * @return the ordered range of organizations
638            * @throws SystemException if a system exception occurred
639            */
640            public java.util.List<com.liferay.portal.model.Organization> findAll(
641                    int start, int end,
642                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
643                    throws com.liferay.portal.kernel.exception.SystemException;
644    
645            /**
646            * Removes all the organizations where companyId = &#63; from the database.
647            *
648            * @param companyId the company id to search with
649            * @throws SystemException if a system exception occurred
650            */
651            public void removeByCompanyId(long companyId)
652                    throws com.liferay.portal.kernel.exception.SystemException;
653    
654            /**
655            * Removes all the organizations where companyId = &#63; from the database.
656            *
657            * @param companyId the company id to search with
658            * @throws SystemException if a system exception occurred
659            */
660            public void removeByLocations(long companyId)
661                    throws com.liferay.portal.kernel.exception.SystemException;
662    
663            /**
664            * Removes all the organizations where companyId = &#63; and parentOrganizationId = &#63; from the database.
665            *
666            * @param companyId the company id to search with
667            * @param parentOrganizationId the parent organization id to search with
668            * @throws SystemException if a system exception occurred
669            */
670            public void removeByC_P(long companyId, long parentOrganizationId)
671                    throws com.liferay.portal.kernel.exception.SystemException;
672    
673            /**
674            * Removes the organization where companyId = &#63; and name = &#63; from the database.
675            *
676            * @param companyId the company id to search with
677            * @param name the name to search with
678            * @throws SystemException if a system exception occurred
679            */
680            public void removeByC_N(long companyId, java.lang.String name)
681                    throws com.liferay.portal.NoSuchOrganizationException,
682                            com.liferay.portal.kernel.exception.SystemException;
683    
684            /**
685            * Removes all the organizations from the database.
686            *
687            * @throws SystemException if a system exception occurred
688            */
689            public void removeAll()
690                    throws com.liferay.portal.kernel.exception.SystemException;
691    
692            /**
693            * Counts all the organizations where companyId = &#63;.
694            *
695            * @param companyId the company id to search with
696            * @return the number of matching organizations
697            * @throws SystemException if a system exception occurred
698            */
699            public int countByCompanyId(long companyId)
700                    throws com.liferay.portal.kernel.exception.SystemException;
701    
702            /**
703            * Filters by the user's permissions and counts all the organizations where companyId = &#63;.
704            *
705            * @param companyId the company id to search with
706            * @return the number of matching organizations that the user has permission to view
707            * @throws SystemException if a system exception occurred
708            */
709            public int filterCountByCompanyId(long companyId)
710                    throws com.liferay.portal.kernel.exception.SystemException;
711    
712            /**
713            * Counts all the organizations where companyId = &#63;.
714            *
715            * @param companyId the company id to search with
716            * @return the number of matching organizations
717            * @throws SystemException if a system exception occurred
718            */
719            public int countByLocations(long companyId)
720                    throws com.liferay.portal.kernel.exception.SystemException;
721    
722            /**
723            * Filters by the user's permissions and counts all the organizations where companyId = &#63;.
724            *
725            * @param companyId the company id to search with
726            * @return the number of matching organizations that the user has permission to view
727            * @throws SystemException if a system exception occurred
728            */
729            public int filterCountByLocations(long companyId)
730                    throws com.liferay.portal.kernel.exception.SystemException;
731    
732            /**
733            * Counts all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
734            *
735            * @param companyId the company id to search with
736            * @param parentOrganizationId the parent organization id to search with
737            * @return the number of matching organizations
738            * @throws SystemException if a system exception occurred
739            */
740            public int countByC_P(long companyId, long parentOrganizationId)
741                    throws com.liferay.portal.kernel.exception.SystemException;
742    
743            /**
744            * Filters by the user's permissions and counts all the organizations where companyId = &#63; and parentOrganizationId = &#63;.
745            *
746            * @param companyId the company id to search with
747            * @param parentOrganizationId the parent organization id to search with
748            * @return the number of matching organizations that the user has permission to view
749            * @throws SystemException if a system exception occurred
750            */
751            public int filterCountByC_P(long companyId, long parentOrganizationId)
752                    throws com.liferay.portal.kernel.exception.SystemException;
753    
754            /**
755            * Counts all the organizations where companyId = &#63; and name = &#63;.
756            *
757            * @param companyId the company id to search with
758            * @param name the name to search with
759            * @return the number of matching organizations
760            * @throws SystemException if a system exception occurred
761            */
762            public int countByC_N(long companyId, java.lang.String name)
763                    throws com.liferay.portal.kernel.exception.SystemException;
764    
765            /**
766            * Counts all the organizations.
767            *
768            * @return the number of organizations
769            * @throws SystemException if a system exception occurred
770            */
771            public int countAll()
772                    throws com.liferay.portal.kernel.exception.SystemException;
773    
774            /**
775            * Gets all the groups associated with the organization.
776            *
777            * @param pk the primary key of the organization to get the associated groups for
778            * @return the groups associated with the organization
779            * @throws SystemException if a system exception occurred
780            */
781            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk)
782                    throws com.liferay.portal.kernel.exception.SystemException;
783    
784            /**
785            * Gets a range of all the groups associated with the organization.
786            *
787            * <p>
788            * 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.
789            * </p>
790            *
791            * @param pk the primary key of the organization to get the associated groups for
792            * @param start the lower bound of the range of organizations to return
793            * @param end the upper bound of the range of organizations to return (not inclusive)
794            * @return the range of groups associated with the organization
795            * @throws SystemException if a system exception occurred
796            */
797            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
798                    int start, int end)
799                    throws com.liferay.portal.kernel.exception.SystemException;
800    
801            /**
802            * Gets an ordered range of all the groups associated with the organization.
803            *
804            * <p>
805            * 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.
806            * </p>
807            *
808            * @param pk the primary key of the organization to get the associated groups for
809            * @param start the lower bound of the range of organizations to return
810            * @param end the upper bound of the range of organizations to return (not inclusive)
811            * @param orderByComparator the comparator to order the results by
812            * @return the ordered range of groups associated with the organization
813            * @throws SystemException if a system exception occurred
814            */
815            public java.util.List<com.liferay.portal.model.Group> getGroups(long pk,
816                    int start, int end,
817                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
818                    throws com.liferay.portal.kernel.exception.SystemException;
819    
820            /**
821            * Gets the number of groups associated with the organization.
822            *
823            * @param pk the primary key of the organization to get the number of associated groups for
824            * @return the number of groups associated with the organization
825            * @throws SystemException if a system exception occurred
826            */
827            public int getGroupsSize(long pk)
828                    throws com.liferay.portal.kernel.exception.SystemException;
829    
830            /**
831            * Determines if the group is associated with the organization.
832            *
833            * @param pk the primary key of the organization
834            * @param groupPK the primary key of the group
835            * @return <code>true</code> if the group is associated with the organization; <code>false</code> otherwise
836            * @throws SystemException if a system exception occurred
837            */
838            public boolean containsGroup(long pk, long groupPK)
839                    throws com.liferay.portal.kernel.exception.SystemException;
840    
841            /**
842            * Determines if the organization has any groups associated with it.
843            *
844            * @param pk the primary key of the organization to check for associations with groups
845            * @return <code>true</code> if the organization has any groups associated with it; <code>false</code> otherwise
846            * @throws SystemException if a system exception occurred
847            */
848            public boolean containsGroups(long pk)
849                    throws com.liferay.portal.kernel.exception.SystemException;
850    
851            /**
852            * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
853            *
854            * @param pk the primary key of the organization
855            * @param groupPK the primary key of the group
856            * @throws SystemException if a system exception occurred
857            */
858            public void addGroup(long pk, long groupPK)
859                    throws com.liferay.portal.kernel.exception.SystemException;
860    
861            /**
862            * Adds an association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
863            *
864            * @param pk the primary key of the organization
865            * @param group the group
866            * @throws SystemException if a system exception occurred
867            */
868            public void addGroup(long pk, com.liferay.portal.model.Group group)
869                    throws com.liferay.portal.kernel.exception.SystemException;
870    
871            /**
872            * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
873            *
874            * @param pk the primary key of the organization
875            * @param groupPKs the primary keys of the groups
876            * @throws SystemException if a system exception occurred
877            */
878            public void addGroups(long pk, long[] groupPKs)
879                    throws com.liferay.portal.kernel.exception.SystemException;
880    
881            /**
882            * Adds an association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
883            *
884            * @param pk the primary key of the organization
885            * @param groups the groups
886            * @throws SystemException if a system exception occurred
887            */
888            public void addGroups(long pk,
889                    java.util.List<com.liferay.portal.model.Group> groups)
890                    throws com.liferay.portal.kernel.exception.SystemException;
891    
892            /**
893            * Clears all associations between the organization and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
894            *
895            * @param pk the primary key of the organization to clear the associated groups from
896            * @throws SystemException if a system exception occurred
897            */
898            public void clearGroups(long pk)
899                    throws com.liferay.portal.kernel.exception.SystemException;
900    
901            /**
902            * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
903            *
904            * @param pk the primary key of the organization
905            * @param groupPK the primary key of the group
906            * @throws SystemException if a system exception occurred
907            */
908            public void removeGroup(long pk, long groupPK)
909                    throws com.liferay.portal.kernel.exception.SystemException;
910    
911            /**
912            * Removes the association between the organization and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.
913            *
914            * @param pk the primary key of the organization
915            * @param group the group
916            * @throws SystemException if a system exception occurred
917            */
918            public void removeGroup(long pk, com.liferay.portal.model.Group group)
919                    throws com.liferay.portal.kernel.exception.SystemException;
920    
921            /**
922            * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
923            *
924            * @param pk the primary key of the organization
925            * @param groupPKs the primary keys of the groups
926            * @throws SystemException if a system exception occurred
927            */
928            public void removeGroups(long pk, long[] groupPKs)
929                    throws com.liferay.portal.kernel.exception.SystemException;
930    
931            /**
932            * Removes the association between the organization and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.
933            *
934            * @param pk the primary key of the organization
935            * @param groups the groups
936            * @throws SystemException if a system exception occurred
937            */
938            public void removeGroups(long pk,
939                    java.util.List<com.liferay.portal.model.Group> groups)
940                    throws com.liferay.portal.kernel.exception.SystemException;
941    
942            /**
943            * 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.
944            *
945            * @param pk the primary key of the organization to set the associations for
946            * @param groupPKs the primary keys of the groups to be associated with the organization
947            * @throws SystemException if a system exception occurred
948            */
949            public void setGroups(long pk, long[] groupPKs)
950                    throws com.liferay.portal.kernel.exception.SystemException;
951    
952            /**
953            * 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.
954            *
955            * @param pk the primary key of the organization to set the associations for
956            * @param groups the groups to be associated with the organization
957            * @throws SystemException if a system exception occurred
958            */
959            public void setGroups(long pk,
960                    java.util.List<com.liferay.portal.model.Group> groups)
961                    throws com.liferay.portal.kernel.exception.SystemException;
962    
963            /**
964            * Gets all the users associated with the organization.
965            *
966            * @param pk the primary key of the organization to get the associated users for
967            * @return the users associated with the organization
968            * @throws SystemException if a system exception occurred
969            */
970            public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
971                    throws com.liferay.portal.kernel.exception.SystemException;
972    
973            /**
974            * Gets a range of all the users associated with the organization.
975            *
976            * <p>
977            * 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.
978            * </p>
979            *
980            * @param pk the primary key of the organization to get the associated users for
981            * @param start the lower bound of the range of organizations to return
982            * @param end the upper bound of the range of organizations to return (not inclusive)
983            * @return the range of users associated with the organization
984            * @throws SystemException if a system exception occurred
985            */
986            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
987                    int start, int end)
988                    throws com.liferay.portal.kernel.exception.SystemException;
989    
990            /**
991            * Gets an ordered range of all the users associated with the organization.
992            *
993            * <p>
994            * 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.
995            * </p>
996            *
997            * @param pk the primary key of the organization to get the associated users for
998            * @param start the lower bound of the range of organizations to return
999            * @param end the upper bound of the range of organizations to return (not inclusive)
1000            * @param orderByComparator the comparator to order the results by
1001            * @return the ordered range of users associated with the organization
1002            * @throws SystemException if a system exception occurred
1003            */
1004            public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
1005                    int start, int end,
1006                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1007                    throws com.liferay.portal.kernel.exception.SystemException;
1008    
1009            /**
1010            * Gets the number of users associated with the organization.
1011            *
1012            * @param pk the primary key of the organization to get the number of associated users for
1013            * @return the number of users associated with the organization
1014            * @throws SystemException if a system exception occurred
1015            */
1016            public int getUsersSize(long pk)
1017                    throws com.liferay.portal.kernel.exception.SystemException;
1018    
1019            /**
1020            * Determines if the user is associated with the organization.
1021            *
1022            * @param pk the primary key of the organization
1023            * @param userPK the primary key of the user
1024            * @return <code>true</code> if the user is associated with the organization; <code>false</code> otherwise
1025            * @throws SystemException if a system exception occurred
1026            */
1027            public boolean containsUser(long pk, long userPK)
1028                    throws com.liferay.portal.kernel.exception.SystemException;
1029    
1030            /**
1031            * Determines if the organization has any users associated with it.
1032            *
1033            * @param pk the primary key of the organization to check for associations with users
1034            * @return <code>true</code> if the organization has any users associated with it; <code>false</code> otherwise
1035            * @throws SystemException if a system exception occurred
1036            */
1037            public boolean containsUsers(long pk)
1038                    throws com.liferay.portal.kernel.exception.SystemException;
1039    
1040            /**
1041            * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1042            *
1043            * @param pk the primary key of the organization
1044            * @param userPK the primary key of the user
1045            * @throws SystemException if a system exception occurred
1046            */
1047            public void addUser(long pk, long userPK)
1048                    throws com.liferay.portal.kernel.exception.SystemException;
1049    
1050            /**
1051            * Adds an association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1052            *
1053            * @param pk the primary key of the organization
1054            * @param user the user
1055            * @throws SystemException if a system exception occurred
1056            */
1057            public void addUser(long pk, com.liferay.portal.model.User user)
1058                    throws com.liferay.portal.kernel.exception.SystemException;
1059    
1060            /**
1061            * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1062            *
1063            * @param pk the primary key of the organization
1064            * @param userPKs the primary keys of the users
1065            * @throws SystemException if a system exception occurred
1066            */
1067            public void addUsers(long pk, long[] userPKs)
1068                    throws com.liferay.portal.kernel.exception.SystemException;
1069    
1070            /**
1071            * Adds an association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1072            *
1073            * @param pk the primary key of the organization
1074            * @param users the users
1075            * @throws SystemException if a system exception occurred
1076            */
1077            public void addUsers(long pk,
1078                    java.util.List<com.liferay.portal.model.User> users)
1079                    throws com.liferay.portal.kernel.exception.SystemException;
1080    
1081            /**
1082            * Clears all associations between the organization and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1083            *
1084            * @param pk the primary key of the organization to clear the associated users from
1085            * @throws SystemException if a system exception occurred
1086            */
1087            public void clearUsers(long pk)
1088                    throws com.liferay.portal.kernel.exception.SystemException;
1089    
1090            /**
1091            * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1092            *
1093            * @param pk the primary key of the organization
1094            * @param userPK the primary key of the user
1095            * @throws SystemException if a system exception occurred
1096            */
1097            public void removeUser(long pk, long userPK)
1098                    throws com.liferay.portal.kernel.exception.SystemException;
1099    
1100            /**
1101            * Removes the association between the organization and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1102            *
1103            * @param pk the primary key of the organization
1104            * @param user the user
1105            * @throws SystemException if a system exception occurred
1106            */
1107            public void removeUser(long pk, com.liferay.portal.model.User user)
1108                    throws com.liferay.portal.kernel.exception.SystemException;
1109    
1110            /**
1111            * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1112            *
1113            * @param pk the primary key of the organization
1114            * @param userPKs the primary keys of the users
1115            * @throws SystemException if a system exception occurred
1116            */
1117            public void removeUsers(long pk, long[] userPKs)
1118                    throws com.liferay.portal.kernel.exception.SystemException;
1119    
1120            /**
1121            * Removes the association between the organization and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache.
1122            *
1123            * @param pk the primary key of the organization
1124            * @param users the users
1125            * @throws SystemException if a system exception occurred
1126            */
1127            public void removeUsers(long pk,
1128                    java.util.List<com.liferay.portal.model.User> users)
1129                    throws com.liferay.portal.kernel.exception.SystemException;
1130    
1131            /**
1132            * 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.
1133            *
1134            * @param pk the primary key of the organization to set the associations for
1135            * @param userPKs the primary keys of the users to be associated with the organization
1136            * @throws SystemException if a system exception occurred
1137            */
1138            public void setUsers(long pk, long[] userPKs)
1139                    throws com.liferay.portal.kernel.exception.SystemException;
1140    
1141            /**
1142            * 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.
1143            *
1144            * @param pk the primary key of the organization to set the associations for
1145            * @param users the users to be associated with the organization
1146            * @throws SystemException if a system exception occurred
1147            */
1148            public void setUsers(long pk,
1149                    java.util.List<com.liferay.portal.model.User> users)
1150                    throws com.liferay.portal.kernel.exception.SystemException;
1151    
1152            /**
1153            * Rebuilds the organizations tree for the scope using the modified pre-order tree traversal algorithm.
1154            *
1155            * <p>
1156            * Only call this method if the tree has become stale through operations other than normal CRUD. Under normal circumstances the tree is automatically rebuilt whenver necessary.
1157            * </p>
1158            *
1159            * @param companyId the id of the scope to rebuild the tree for
1160            * @param force whether to force the rebuild even if the tree is not stale
1161            */
1162            public void rebuildTree(long companyId, boolean force)
1163                    throws com.liferay.portal.kernel.exception.SystemException;
1164    }