001    /**
002     * Copyright (c) 2000-2013 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;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * The interface for the organization local service.
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see OrganizationLocalServiceUtil
032     * @see com.liferay.portal.service.base.OrganizationLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.OrganizationLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface OrganizationLocalService extends BaseLocalService,
039            PersistedModelLocalService {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify or reference this interface directly. Always use {@link OrganizationLocalServiceUtil} to access the organization local service. Add custom service methods to {@link com.liferay.portal.service.impl.OrganizationLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
044             */
045    
046            /**
047            * Adds the organization to the database. Also notifies the appropriate model listeners.
048            *
049            * @param organization the organization
050            * @return the organization that was added
051            * @throws SystemException if a system exception occurred
052            */
053            public com.liferay.portal.model.Organization addOrganization(
054                    com.liferay.portal.model.Organization organization)
055                    throws com.liferay.portal.kernel.exception.SystemException;
056    
057            /**
058            * Creates a new organization with the primary key. Does not add the organization to the database.
059            *
060            * @param organizationId the primary key for the new organization
061            * @return the new organization
062            */
063            public com.liferay.portal.model.Organization createOrganization(
064                    long organizationId);
065    
066            /**
067            * Deletes the organization with the primary key from the database. Also notifies the appropriate model listeners.
068            *
069            * @param organizationId the primary key of the organization
070            * @return the organization that was removed
071            * @throws PortalException if a organization with the primary key could not be found
072            * @throws SystemException if a system exception occurred
073            */
074            public com.liferay.portal.model.Organization deleteOrganization(
075                    long organizationId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException;
078    
079            /**
080            * Deletes the organization from the database. Also notifies the appropriate model listeners.
081            *
082            * @param organization the organization
083            * @return the organization that was removed
084            * @throws PortalException
085            * @throws SystemException if a system exception occurred
086            */
087            public com.liferay.portal.model.Organization deleteOrganization(
088                    com.liferay.portal.model.Organization organization)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException;
091    
092            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
093    
094            /**
095            * Performs a dynamic query on the database and returns the matching rows.
096            *
097            * @param dynamicQuery the dynamic query
098            * @return the matching rows
099            * @throws SystemException if a system exception occurred
100            */
101            @SuppressWarnings("rawtypes")
102            public java.util.List dynamicQuery(
103                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Performs a dynamic query on the database and returns a range of the matching rows.
108            *
109            * <p>
110            * 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.
111            * </p>
112            *
113            * @param dynamicQuery the dynamic query
114            * @param start the lower bound of the range of model instances
115            * @param end the upper bound of the range of model instances (not inclusive)
116            * @return the range of matching rows
117            * @throws SystemException if a system exception occurred
118            */
119            @SuppressWarnings("rawtypes")
120            public java.util.List dynamicQuery(
121                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
122                    int end) throws com.liferay.portal.kernel.exception.SystemException;
123    
124            /**
125            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
126            *
127            * <p>
128            * 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.
129            * </p>
130            *
131            * @param dynamicQuery the dynamic query
132            * @param start the lower bound of the range of model instances
133            * @param end the upper bound of the range of model instances (not inclusive)
134            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
135            * @return the ordered range of matching rows
136            * @throws SystemException if a system exception occurred
137            */
138            @SuppressWarnings("rawtypes")
139            public java.util.List dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141                    int end,
142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143                    throws com.liferay.portal.kernel.exception.SystemException;
144    
145            /**
146            * Returns the number of rows that match the dynamic query.
147            *
148            * @param dynamicQuery the dynamic query
149            * @return the number of rows that match the dynamic query
150            * @throws SystemException if a system exception occurred
151            */
152            public long dynamicQueryCount(
153                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
154                    throws com.liferay.portal.kernel.exception.SystemException;
155    
156            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157            public com.liferay.portal.model.Organization fetchOrganization(
158                    long organizationId)
159                    throws com.liferay.portal.kernel.exception.SystemException;
160    
161            /**
162            * Returns the organization with the primary key.
163            *
164            * @param organizationId the primary key of the organization
165            * @return the organization
166            * @throws PortalException if a organization with the primary key could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170            public com.liferay.portal.model.Organization getOrganization(
171                    long organizationId)
172                    throws com.liferay.portal.kernel.exception.PortalException,
173                            com.liferay.portal.kernel.exception.SystemException;
174    
175            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176            public com.liferay.portal.model.PersistedModel getPersistedModel(
177                    java.io.Serializable primaryKeyObj)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException;
180    
181            /**
182            * Returns a range of all the organizations.
183            *
184            * <p>
185            * 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.
186            * </p>
187            *
188            * @param start the lower bound of the range of organizations
189            * @param end the upper bound of the range of organizations (not inclusive)
190            * @return the range of organizations
191            * @throws SystemException if a system exception occurred
192            */
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
195                    int start, int end)
196                    throws com.liferay.portal.kernel.exception.SystemException;
197    
198            /**
199            * Returns the number of organizations.
200            *
201            * @return the number of organizations
202            * @throws SystemException if a system exception occurred
203            */
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public int getOrganizationsCount()
206                    throws com.liferay.portal.kernel.exception.SystemException;
207    
208            /**
209            * Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
210            *
211            * @param organization the organization
212            * @return the organization that was updated
213            * @throws SystemException if a system exception occurred
214            */
215            public com.liferay.portal.model.Organization updateOrganization(
216                    com.liferay.portal.model.Organization organization)
217                    throws com.liferay.portal.kernel.exception.SystemException;
218    
219            /**
220            * @throws SystemException if a system exception occurred
221            */
222            public void addGroupOrganization(long groupId, long organizationId)
223                    throws com.liferay.portal.kernel.exception.SystemException;
224    
225            /**
226            * @throws SystemException if a system exception occurred
227            */
228            public void addGroupOrganization(long groupId,
229                    com.liferay.portal.model.Organization organization)
230                    throws com.liferay.portal.kernel.exception.SystemException;
231    
232            /**
233            * @throws PortalException
234            * @throws SystemException if a system exception occurred
235            */
236            public void addGroupOrganizations(long groupId, long[] organizationIds)
237                    throws com.liferay.portal.kernel.exception.PortalException,
238                            com.liferay.portal.kernel.exception.SystemException;
239    
240            /**
241            * @throws PortalException
242            * @throws SystemException if a system exception occurred
243            */
244            public void addGroupOrganizations(long groupId,
245                    java.util.List<com.liferay.portal.model.Organization> Organizations)
246                    throws com.liferay.portal.kernel.exception.PortalException,
247                            com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * @throws SystemException if a system exception occurred
251            */
252            public void clearGroupOrganizations(long groupId)
253                    throws com.liferay.portal.kernel.exception.SystemException;
254    
255            /**
256            * @throws SystemException if a system exception occurred
257            */
258            public void deleteGroupOrganization(long groupId, long organizationId)
259                    throws com.liferay.portal.kernel.exception.SystemException;
260    
261            /**
262            * @throws SystemException if a system exception occurred
263            */
264            public void deleteGroupOrganization(long groupId,
265                    com.liferay.portal.model.Organization organization)
266                    throws com.liferay.portal.kernel.exception.SystemException;
267    
268            /**
269            * @throws SystemException if a system exception occurred
270            */
271            public void deleteGroupOrganizations(long groupId, long[] organizationIds)
272                    throws com.liferay.portal.kernel.exception.SystemException;
273    
274            /**
275            * @throws SystemException if a system exception occurred
276            */
277            public void deleteGroupOrganizations(long groupId,
278                    java.util.List<com.liferay.portal.model.Organization> Organizations)
279                    throws com.liferay.portal.kernel.exception.SystemException;
280    
281            /**
282            * @throws SystemException if a system exception occurred
283            */
284            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285            public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
286                    long groupId)
287                    throws com.liferay.portal.kernel.exception.SystemException;
288    
289            /**
290            * @throws SystemException if a system exception occurred
291            */
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
294                    long groupId, int start, int end)
295                    throws com.liferay.portal.kernel.exception.SystemException;
296    
297            /**
298            * @throws SystemException if a system exception occurred
299            */
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
302                    long groupId, int start, int end,
303                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
304                    throws com.liferay.portal.kernel.exception.SystemException;
305    
306            /**
307            * @throws SystemException if a system exception occurred
308            */
309            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310            public int getGroupOrganizationsCount(long groupId)
311                    throws com.liferay.portal.kernel.exception.SystemException;
312    
313            /**
314            * @throws SystemException if a system exception occurred
315            */
316            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317            public boolean hasGroupOrganization(long groupId, long organizationId)
318                    throws com.liferay.portal.kernel.exception.SystemException;
319    
320            /**
321            * @throws SystemException if a system exception occurred
322            */
323            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324            public boolean hasGroupOrganizations(long groupId)
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            /**
328            * @throws PortalException
329            * @throws SystemException if a system exception occurred
330            */
331            public void setGroupOrganizations(long groupId, long[] organizationIds)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException;
334    
335            /**
336            * @throws SystemException if a system exception occurred
337            */
338            public void addUserOrganization(long userId, long organizationId)
339                    throws com.liferay.portal.kernel.exception.SystemException;
340    
341            /**
342            * @throws SystemException if a system exception occurred
343            */
344            public void addUserOrganization(long userId,
345                    com.liferay.portal.model.Organization organization)
346                    throws com.liferay.portal.kernel.exception.SystemException;
347    
348            /**
349            * @throws SystemException if a system exception occurred
350            */
351            public void addUserOrganizations(long userId, long[] organizationIds)
352                    throws com.liferay.portal.kernel.exception.SystemException;
353    
354            /**
355            * @throws SystemException if a system exception occurred
356            */
357            public void addUserOrganizations(long userId,
358                    java.util.List<com.liferay.portal.model.Organization> Organizations)
359                    throws com.liferay.portal.kernel.exception.SystemException;
360    
361            /**
362            * @throws SystemException if a system exception occurred
363            */
364            public void clearUserOrganizations(long userId)
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * @throws SystemException if a system exception occurred
369            */
370            public void deleteUserOrganization(long userId, long organizationId)
371                    throws com.liferay.portal.kernel.exception.SystemException;
372    
373            /**
374            * @throws SystemException if a system exception occurred
375            */
376            public void deleteUserOrganization(long userId,
377                    com.liferay.portal.model.Organization organization)
378                    throws com.liferay.portal.kernel.exception.SystemException;
379    
380            /**
381            * @throws SystemException if a system exception occurred
382            */
383            public void deleteUserOrganizations(long userId, long[] organizationIds)
384                    throws com.liferay.portal.kernel.exception.SystemException;
385    
386            /**
387            * @throws SystemException if a system exception occurred
388            */
389            public void deleteUserOrganizations(long userId,
390                    java.util.List<com.liferay.portal.model.Organization> Organizations)
391                    throws com.liferay.portal.kernel.exception.SystemException;
392    
393            /**
394            * @throws SystemException if a system exception occurred
395            */
396            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
397            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
398                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
399    
400            /**
401            * @throws SystemException if a system exception occurred
402            */
403            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
404            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
405                    long userId, int start, int end)
406                    throws com.liferay.portal.kernel.exception.SystemException;
407    
408            /**
409            * @throws SystemException if a system exception occurred
410            */
411            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
412            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
413                    long userId, int start, int end,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException;
416    
417            /**
418            * @throws SystemException if a system exception occurred
419            */
420            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
421            public int getUserOrganizationsCount(long userId)
422                    throws com.liferay.portal.kernel.exception.SystemException;
423    
424            /**
425            * @throws SystemException if a system exception occurred
426            */
427            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
428            public boolean hasUserOrganization(long userId, long organizationId)
429                    throws com.liferay.portal.kernel.exception.SystemException;
430    
431            /**
432            * @throws SystemException if a system exception occurred
433            */
434            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
435            public boolean hasUserOrganizations(long userId)
436                    throws com.liferay.portal.kernel.exception.SystemException;
437    
438            /**
439            * @throws SystemException if a system exception occurred
440            */
441            public void setUserOrganizations(long userId, long[] organizationIds)
442                    throws com.liferay.portal.kernel.exception.SystemException;
443    
444            /**
445            * Returns the Spring bean ID for this bean.
446            *
447            * @return the Spring bean ID for this bean
448            */
449            public java.lang.String getBeanIdentifier();
450    
451            /**
452            * Sets the Spring bean ID for this bean.
453            *
454            * @param beanIdentifier the Spring bean ID for this bean
455            */
456            public void setBeanIdentifier(java.lang.String beanIdentifier);
457    
458            /**
459            * Adds an organization.
460            *
461            * <p>
462            * This method handles the creation and bookkeeping of the organization
463            * including its resources, metadata, and internal data structures. It is
464            * not necessary to make a subsequent call to {@link
465            * #addOrganizationResources(long, Organization)}.
466            * </p>
467            *
468            * @param userId the primary key of the creator/owner of the organization
469            * @param parentOrganizationId the primary key of the organization's parent
470            organization
471            * @param name the organization's name
472            * @param site whether the organization is to be associated with a main
473            site
474            * @return the organization
475            * @throws PortalException if a creator or parent organization with the
476            primary key could not be found or if the organization's
477            information was invalid
478            * @throws SystemException if a system exception occurred
479            */
480            public com.liferay.portal.model.Organization addOrganization(long userId,
481                    long parentOrganizationId, java.lang.String name, boolean site)
482                    throws com.liferay.portal.kernel.exception.PortalException,
483                            com.liferay.portal.kernel.exception.SystemException;
484    
485            /**
486            * Adds an organization.
487            *
488            * <p>
489            * This method handles the creation and bookkeeping of the organization
490            * including its resources, metadata, and internal data structures. It is
491            * not necessary to make a subsequent call to {@link
492            * #addOrganizationResources(long, Organization)}.
493            * </p>
494            *
495            * @param userId the primary key of the creator/owner of the
496            organization
497            * @param parentOrganizationId the primary key of the organization's
498            parent organization
499            * @param name the organization's name
500            * @param type the organization's type
501            * @param recursable whether the permissions of the organization are to
502            be inherited by its suborganizations
503            * @param regionId the primary key of the organization's region
504            * @param countryId the primary key of the organization's country
505            * @param statusId the organization's workflow status
506            * @param comments the comments about the organization
507            * @param site whether the organization is to be associated with a main
508            site
509            * @param serviceContext the service context to be applied (optionally
510            <code>null</code>). Can set asset category IDs, asset tag
511            names, and expando bridge attributes for the organization.
512            * @return the organization
513            * @throws PortalException if a creator or parent organization with the
514            primary key could not be found or if the organization's
515            information was invalid
516            * @throws SystemException if a system exception occurred
517            * @deprecated As of 6.2.0, replaced by {@link #addOrganization(long, long,
518            String, String, long, long, int, String, boolean,
519            ServiceContext)}
520            */
521            public com.liferay.portal.model.Organization addOrganization(long userId,
522                    long parentOrganizationId, java.lang.String name,
523                    java.lang.String type, boolean recursable, long regionId,
524                    long countryId, int statusId, java.lang.String comments, boolean site,
525                    com.liferay.portal.service.ServiceContext serviceContext)
526                    throws com.liferay.portal.kernel.exception.PortalException,
527                            com.liferay.portal.kernel.exception.SystemException;
528    
529            /**
530            * Adds an organization.
531            *
532            * <p>
533            * This method handles the creation and bookkeeping of the organization
534            * including its resources, metadata, and internal data structures. It is
535            * not necessary to make a subsequent call to {@link
536            * #addOrganizationResources(long, Organization)}.
537            * </p>
538            *
539            * @param userId the primary key of the creator/owner of the organization
540            * @param parentOrganizationId the primary key of the organization's parent
541            organization
542            * @param name the organization's name
543            * @param type the organization's type
544            * @param regionId the primary key of the organization's region
545            * @param countryId the primary key of the organization's country
546            * @param statusId the organization's workflow status
547            * @param comments the comments about the organization
548            * @param site whether the organization is to be associated with a main
549            site
550            * @param serviceContext the service context to be applied (optionally
551            <code>null</code>). Can set asset category IDs, asset tag names,
552            and expando bridge attributes for the organization.
553            * @return the organization
554            * @throws PortalException if a creator or parent organization with the
555            primary key could not be found or if the organization's
556            information was invalid
557            * @throws SystemException if a system exception occurred
558            */
559            public com.liferay.portal.model.Organization addOrganization(long userId,
560                    long parentOrganizationId, java.lang.String name,
561                    java.lang.String type, long regionId, long countryId, int statusId,
562                    java.lang.String comments, boolean site,
563                    com.liferay.portal.service.ServiceContext serviceContext)
564                    throws com.liferay.portal.kernel.exception.PortalException,
565                            com.liferay.portal.kernel.exception.SystemException;
566    
567            /**
568            * Adds a resource for each type of permission available on the
569            * organization.
570            *
571            * @param userId the primary key of the creator/owner of the organization
572            * @param organization the organization
573            * @throws PortalException if a portal exception occurred
574            * @throws SystemException if a system exception occurred
575            */
576            public void addOrganizationResources(long userId,
577                    com.liferay.portal.model.Organization organization)
578                    throws com.liferay.portal.kernel.exception.PortalException,
579                            com.liferay.portal.kernel.exception.SystemException;
580    
581            /**
582            * Assigns the password policy to the organizations, removing any other
583            * currently assigned password policies.
584            *
585            * @param passwordPolicyId the primary key of the password policy
586            * @param organizationIds the primary keys of the organizations
587            * @throws SystemException if a system exception occurred
588            */
589            public void addPasswordPolicyOrganizations(long passwordPolicyId,
590                    long[] organizationIds)
591                    throws com.liferay.portal.kernel.exception.SystemException;
592    
593            /**
594            * Deletes the logo of the organization.
595            *
596            * @param organizationId the primary key of the organization
597            * @throws PortalException if an organization or parent organization with
598            the primary key could not be found or if the organization's logo
599            could not be found
600            * @throws SystemException if a system exception occurred
601            */
602            public void deleteLogo(long organizationId)
603                    throws com.liferay.portal.kernel.exception.PortalException,
604                            com.liferay.portal.kernel.exception.SystemException;
605    
606            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
607            public com.liferay.portal.model.Organization fetchOrganization(
608                    long companyId, java.lang.String name)
609                    throws com.liferay.portal.kernel.exception.SystemException;
610    
611            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
612            public com.liferay.portal.model.Organization fetchOrganizationByUuidAndCompanyId(
613                    java.lang.String uuid, long companyId)
614                    throws com.liferay.portal.kernel.exception.SystemException;
615    
616            /**
617            * Returns the organization with the name.
618            *
619            * @param companyId the primary key of the organization's company
620            * @param name the organization's name
621            * @return the organization with the name
622            * @throws PortalException if the organization with the name could not be
623            found
624            * @throws SystemException if a system exception occurred
625            */
626            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
627            public com.liferay.portal.model.Organization getOrganization(
628                    long companyId, java.lang.String name)
629                    throws com.liferay.portal.kernel.exception.PortalException,
630                            com.liferay.portal.kernel.exception.SystemException;
631    
632            /**
633            * Returns the primary key of the organization with the name.
634            *
635            * @param companyId the primary key of the organization's company
636            * @param name the organization's name
637            * @return the primary key of the organization with the name, or
638            <code>0</code> if the organization could not be found
639            * @throws SystemException if a system exception occurred
640            */
641            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
642            public long getOrganizationId(long companyId, java.lang.String name)
643                    throws com.liferay.portal.kernel.exception.SystemException;
644    
645            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
646            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
647                    long userId, int start, int end,
648                    com.liferay.portal.kernel.util.OrderByComparator obc)
649                    throws com.liferay.portal.kernel.exception.PortalException,
650                            com.liferay.portal.kernel.exception.SystemException;
651    
652            /**
653            * Returns all the organizations belonging to the parent organization.
654            *
655            * @param companyId the primary key of the organization's company
656            * @param parentOrganizationId the primary key of the organization's parent
657            organization
658            * @return the organizations belonging to the parent organization
659            * @throws SystemException if a system exception occurred
660            */
661            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
662            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
663                    long companyId, long parentOrganizationId)
664                    throws com.liferay.portal.kernel.exception.SystemException;
665    
666            /**
667            * Returns a range of all the organizations belonging to the parent
668            * organization.
669            *
670            * <p>
671            * Useful when paginating results. Returns a maximum of <code>end -
672            * start</code> instances. <code>start</code> and <code>end</code> are not
673            * primary keys, they are indexes in the result set. Thus, <code>0</code>
674            * refers to the first result in the set. Setting both <code>start</code>
675            * and <code>end</code> to {@link
676            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
677            * result set.
678            * </p>
679            *
680            * @param companyId the primary key of the organization's company
681            * @param parentOrganizationId the primary key of the organization's parent
682            organization
683            * @param start the lower bound of the range of organizations to return
684            * @param end the upper bound of the range of organizations to return (not
685            inclusive)
686            * @return the range of organizations belonging to the parent organization
687            * @throws SystemException if a system exception occurred
688            * @see com.liferay.portal.service.persistence.OrganizationPersistence#findByC_P(
689            long, long, int, int)
690            */
691            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
692            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
693                    long companyId, long parentOrganizationId, int start, int end)
694                    throws com.liferay.portal.kernel.exception.SystemException;
695    
696            /**
697            * Returns the organizations with the primary keys.
698            *
699            * @param organizationIds the primary keys of the organizations
700            * @return the organizations with the primary keys
701            * @throws PortalException if any one of the organizations could not be
702            found
703            * @throws SystemException if a system exception occurred
704            */
705            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
706            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
707                    long[] organizationIds)
708                    throws com.liferay.portal.kernel.exception.PortalException,
709                            com.liferay.portal.kernel.exception.SystemException;
710    
711            /**
712            * Returns the number of organizations belonging to the parent organization.
713            *
714            * @param companyId the primary key of the organization's company
715            * @param parentOrganizationId the primary key of the organization's parent
716            organization
717            * @return the number of organizations belonging to the parent organization
718            * @throws SystemException if a system exception occurred
719            */
720            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
721            public int getOrganizationsCount(long companyId, long parentOrganizationId)
722                    throws com.liferay.portal.kernel.exception.SystemException;
723    
724            /**
725            * Returns the parent organizations in order by closest ancestor. The list
726            * starts with the organization itself.
727            *
728            * @param organizationId the primary key of the organization
729            * @return the parent organizations in order by closest ancestor
730            * @throws PortalException if an organization with the primary key could not
731            be found
732            * @throws SystemException if a system exception occurred
733            */
734            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
735            public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
736                    long organizationId)
737                    throws com.liferay.portal.kernel.exception.PortalException,
738                            com.liferay.portal.kernel.exception.SystemException;
739    
740            /**
741            * Returns the suborganizations of the organizations.
742            *
743            * @param organizations the organizations from which to get
744            suborganizations
745            * @return the suborganizations of the organizations
746            * @throws SystemException if a system exception occurred
747            */
748            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
749            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
750                    java.util.List<com.liferay.portal.model.Organization> organizations)
751                    throws com.liferay.portal.kernel.exception.SystemException;
752    
753            /**
754            * Returns the suborganizations of the organization.
755            *
756            * @param companyId the primary key of the organization's company
757            * @param organizationId the primary key of the organization
758            * @return the suborganizations of the organization
759            * @throws SystemException if a system exception occurred
760            */
761            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
762            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
763                    long companyId, long organizationId)
764                    throws com.liferay.portal.kernel.exception.SystemException;
765    
766            /**
767            * Returns the count of suborganizations of the organization.
768            *
769            * @param companyId the primary key of the organization's company
770            * @param organizationId the primary key of the organization
771            * @return the count of suborganizations of the organization
772            * @throws SystemException if a system exception occurred
773            */
774            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
775            public int getSuborganizationsCount(long companyId, long organizationId)
776                    throws com.liferay.portal.kernel.exception.SystemException;
777    
778            /**
779            * Returns the intersection of <code>allOrganizations</code> and
780            * <code>availableOrganizations</code>.
781            *
782            * @param allOrganizations the organizations to check for availability
783            * @param availableOrganizations the available organizations
784            * @return the intersection of <code>allOrganizations</code> and
785            <code>availableOrganizations</code>
786            */
787            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
788            public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
789                    java.util.List<com.liferay.portal.model.Organization> allOrganizations,
790                    java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
791    
792            /**
793            * Returns all the organizations associated with the user. If
794            * includeAdministrative is <code>true</code>, the result includes those
795            * organizations that are not directly associated to the user but he is an
796            * administrator or an owner of the organization.
797            *
798            * @param userId the primary key of the user
799            * @param includeAdministrative whether to includes organizations that are
800            indirectly associated to the user because he is an administrator
801            or an owner of the organization
802            * @return the organizations associated with the user
803            * @throws PortalException if a user with the primary key could not be found
804            * @throws SystemException if a system exception occurred
805            */
806            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
807            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
808                    long userId, boolean includeAdministrative)
809                    throws com.liferay.portal.kernel.exception.PortalException,
810                            com.liferay.portal.kernel.exception.SystemException;
811    
812            /**
813            * Returns <code>true</code> if the password policy has been assigned to the
814            * organization.
815            *
816            * @param passwordPolicyId the primary key of the password policy
817            * @param organizationId the primary key of the organization
818            * @return <code>true</code> if the password policy has been assigned to the
819            organization; <code>false</code> otherwise
820            * @throws SystemException if a system exception occurred
821            */
822            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
823            public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
824                    long organizationId)
825                    throws com.liferay.portal.kernel.exception.SystemException;
826    
827            /**
828            * Returns <code>true</code> if the user is a member of the organization,
829            * optionally focusing on suborganizations or the specified organization.
830            * This method is usually called to determine if the user has view access to
831            * a resource belonging to the organization.
832            *
833            * <ol>
834            * <li>
835            * If <code>inheritSuborganizations=<code>false</code></code>:
836            * the method checks whether the user belongs to the organization specified
837            * by <code>organizationId</code>. The parameter
838            * <code>includeSpecifiedOrganization</code> is ignored.
839            * </li>
840            * <li>
841            * The parameter <code>includeSpecifiedOrganization</code> is
842            * ignored unless <code>inheritSuborganizations</code> is also
843            * <code>true</code>.
844            * </li>
845            * <li>
846            * If <code>inheritSuborganizations=<code>true</code></code> and
847            * <code>includeSpecifiedOrganization=<code>false</code></code>: the method
848            * checks
849            * whether the user belongs to one of the child organizations of the one
850            * specified by <code>organizationId</code>.
851            * </li>
852            * <li>
853            * If <code>inheritSuborganizations=<code>true</code></code> and
854            * <code>includeSpecifiedOrganization=<code>true</code></code>: the method
855            * checks whether
856            * the user belongs to the organization specified by
857            * <code>organizationId</code> or any of
858            * its child organizations.
859            * </li>
860            * </ol>
861            *
862            * @param userId the primary key of the organization's user
863            * @param organizationId the primary key of the organization
864            * @param inheritSuborganizations if <code>true</code> suborganizations are
865            considered in the determination
866            * @param includeSpecifiedOrganization if <code>true</code> the
867            organization specified by <code>organizationId</code> is
868            considered in the determination
869            * @return <code>true</code> if the user has access to the organization;
870            <code>false</code> otherwise
871            * @throws PortalException if an organization with the primary key could not
872            be found
873            * @throws SystemException if a system exception occurred
874            * @see com.liferay.portal.service.persistence.OrganizationFinder
875            */
876            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
877            public boolean hasUserOrganization(long userId, long organizationId,
878                    boolean inheritSuborganizations, boolean includeSpecifiedOrganization)
879                    throws com.liferay.portal.kernel.exception.PortalException,
880                            com.liferay.portal.kernel.exception.SystemException;
881    
882            /**
883            * Rebuilds the organizations tree.
884            *
885            * <p>
886            * Only call this method if the tree has become stale through operations
887            * other than normal CRUD. Under normal circumstances the tree is
888            * automatically rebuilt whenever necessary.
889            * </p>
890            *
891            * @param companyId the primary key of the organization's company
892            * @throws PortalException if an organization with the primary key could not
893            be found
894            * @throws SystemException if a system exception occurred
895            */
896            public void rebuildTree(long companyId)
897                    throws com.liferay.portal.kernel.exception.PortalException,
898                            com.liferay.portal.kernel.exception.SystemException;
899    
900            /**
901            * Returns a range of all the organizations of the company.
902            *
903            * <p>
904            * Useful when paginating results. Returns a maximum of <code>end -
905            * start</code> instances. <code>start</code> and <code>end</code> are not
906            * primary keys, they are indexes in the result set. Thus, <code>0</code>
907            * refers to the first result in the set. Setting both <code>start</code>
908            * and <code>end</code> to {@link
909            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
910            * result set.
911            * </p>
912            *
913            * @param companyId the primary key of the company
914            * @param params the finder parameters (optionally <code>null</code>). For
915            more information see {@link
916            com.liferay.portlet.usersadmin.util.OrganizationIndexer}
917            * @param start the lower bound of the range of organizations to return
918            * @param end the upper bound of the range of organizations to return (not
919            inclusive)
920            * @return the range of all the organizations of the company
921            * @throws SystemException if a system exception occurred
922            */
923            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
924            public java.util.List<com.liferay.portal.model.Organization> search(
925                    long companyId,
926                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
927                    int start, int end)
928                    throws com.liferay.portal.kernel.exception.SystemException;
929    
930            /**
931            * Returns an ordered range of all the organizations that match the
932            * keywords, using the indexer. It is preferable to use this method instead
933            * of the non-indexed version whenever possible for performance reasons.
934            *
935            * <p>
936            * Useful when paginating results. Returns a maximum of <code>end -
937            * start</code> instances. <code>start</code> and <code>end</code> are not
938            * primary keys, they are indexes in the result set. Thus, <code>0</code>
939            * refers to the first result in the set. Setting both <code>start</code>
940            * and <code>end</code> to {@link
941            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
942            * result set.
943            * </p>
944            *
945            * @param companyId the primary key of the organization's company
946            * @param parentOrganizationId the primary key of the organization's parent
947            organization
948            * @param keywords the keywords (space separated), which may occur in the
949            organization's name, street, city, zipcode, type, region or
950            country (optionally <code>null</code>)
951            * @param params the finder parameters (optionally <code>null</code>). For
952            more information see {@link
953            com.liferay.portlet.usersadmin.util.OrganizationIndexer}
954            * @param start the lower bound of the range of organizations to return
955            * @param end the upper bound of the range of organizations to return (not
956            inclusive)
957            * @param sort the field and direction by which to sort (optionally
958            <code>null</code>)
959            * @return the matching organizations ordered by name
960            * @throws SystemException if a system exception occurred
961            * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer
962            */
963            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
964            public com.liferay.portal.kernel.search.Hits search(long companyId,
965                    long parentOrganizationId, java.lang.String keywords,
966                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
967                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
968                    throws com.liferay.portal.kernel.exception.SystemException;
969    
970            /**
971            * Returns a name ordered range of all the organizations that match the
972            * keywords, type, region, and country, without using the indexer. It is
973            * preferable to use the indexed version {@link #search(long, long, String,
974            * LinkedHashMap, int, int, Sort)} instead of this method wherever possible
975            * for performance reasons.
976            *
977            * <p>
978            * Useful when paginating results. Returns a maximum of <code>end -
979            * start</code> instances. <code>start</code> and <code>end</code> are not
980            * primary keys, they are indexes in the result set. Thus, <code>0</code>
981            * refers to the first result in the set. Setting both <code>start</code>
982            * and <code>end</code> to {@link
983            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
984            * result set.
985            * </p>
986            *
987            * @param companyId the primary key of the organization's company
988            * @param parentOrganizationId the primary key of the organization's parent
989            organization
990            * @param keywords the keywords (space separated), which may occur in the
991            organization's name, street, city, or zipcode (optionally
992            <code>null</code>)
993            * @param type the organization's type (optionally <code>null</code>)
994            * @param regionId the primary key of the organization's region (optionally
995            <code>null</code>)
996            * @param countryId the primary key of the organization's country
997            (optionally <code>null</code>)
998            * @param params the finder params. For more information see {@link
999            com.liferay.portal.service.persistence.OrganizationFinder}
1000            * @param start the lower bound of the range of organizations to return
1001            * @param end the upper bound of the range of organizations to return (not
1002            inclusive)
1003            * @return the matching organizations ordered by name
1004            * @throws SystemException if a system exception occurred
1005            * @see com.liferay.portal.service.persistence.OrganizationFinder
1006            */
1007            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1008            public java.util.List<com.liferay.portal.model.Organization> search(
1009                    long companyId, long parentOrganizationId, java.lang.String keywords,
1010                    java.lang.String type, java.lang.Long regionId,
1011                    java.lang.Long countryId,
1012                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1013                    int start, int end)
1014                    throws com.liferay.portal.kernel.exception.SystemException;
1015    
1016            /**
1017            * Returns an ordered range of all the organizations that match the
1018            * keywords, type, region, and country, without using the indexer. It is
1019            * preferable to use the indexed version {@link #search(long, long, String,
1020            * String, String, String, String, String, String, LinkedHashMap, boolean,
1021            * int, int, Sort)} instead of this method wherever possible for performance
1022            * reasons.
1023            *
1024            * <p>
1025            * Useful when paginating results. Returns a maximum of <code>end -
1026            * start</code> instances. <code>start</code> and <code>end</code> are not
1027            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1028            * refers to the first result in the set. Setting both <code>start</code>
1029            * and <code>end</code> to {@link
1030            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1031            * result set.
1032            * </p>
1033            *
1034            * @param companyId the primary key of the organization's company
1035            * @param parentOrganizationId the primary key of the organization's parent
1036            organization
1037            * @param keywords the keywords (space separated), which may occur in the
1038            organization's name, street, city, or zipcode (optionally
1039            <code>null</code>)
1040            * @param type the organization's type (optionally <code>null</code>)
1041            * @param regionId the primary key of the organization's region (optionally
1042            <code>null</code>)
1043            * @param countryId the primary key of the organization's country
1044            (optionally <code>null</code>)
1045            * @param params the finder params. For more information see {@link
1046            com.liferay.portal.service.persistence.OrganizationFinder}
1047            * @param start the lower bound of the range of organizations to return
1048            * @param end the upper bound of the range of organizations to return (not
1049            inclusive)
1050            * @param obc the comparator to order the organizations (optionally
1051            <code>null</code>)
1052            * @return the matching organizations ordered by comparator <code>obc</code>
1053            * @throws SystemException if a system exception occurred
1054            * @see com.liferay.portal.service.persistence.OrganizationFinder
1055            */
1056            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1057            public java.util.List<com.liferay.portal.model.Organization> search(
1058                    long companyId, long parentOrganizationId, java.lang.String keywords,
1059                    java.lang.String type, java.lang.Long regionId,
1060                    java.lang.Long countryId,
1061                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1062                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
1063                    throws com.liferay.portal.kernel.exception.SystemException;
1064    
1065            /**
1066            * Returns a name ordered range of all the organizations with the type,
1067            * region, and country, and whose name, street, city, and zipcode match the
1068            * keywords specified for them, without using the indexer. It is preferable
1069            * to use the indexed version {@link #search(long, long, String, String,
1070            * String, String, String, String, String, LinkedHashMap, boolean, int, int,
1071            * Sort)} instead of this method wherever possible for performance reasons.
1072            *
1073            * <p>
1074            * Useful when paginating results. Returns a maximum of <code>end -
1075            * start</code> instances. <code>start</code> and <code>end</code> are not
1076            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1077            * refers to the first result in the set. Setting both <code>start</code>
1078            * and <code>end</code> to {@link
1079            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1080            * result set.
1081            * </p>
1082            *
1083            * @param companyId the primary key of the organization's company
1084            * @param parentOrganizationId the primary key of the organization's parent
1085            * @param name the name keywords (space separated, optionally
1086            <code>null</code>)
1087            * @param type the organization's type (optionally <code>null</code>)
1088            * @param street the street keywords (optionally <code>null</code>)
1089            * @param city the city keywords (optionally <code>null</code>)
1090            * @param zip the zipcode keywords (optionally <code>null</code>)
1091            * @param regionId the primary key of the organization's region (optionally
1092            <code>null</code>)
1093            * @param countryId the primary key of the organization's country
1094            (optionally <code>null</code>)
1095            * @param params the finder parameters (optionally <code>null</code>). For
1096            more information see {@link
1097            com.liferay.portal.service.persistence.OrganizationFinder}
1098            * @param andOperator whether every field must match its keywords, or just
1099            one field. For example, &quot;organizations with the name
1100            'Employees' and city 'Chicago'&quot; vs &quot;organizations with
1101            the name 'Employees' or the city 'Chicago'&quot;.
1102            * @param start the lower bound of the range of organizations to return
1103            * @param end the upper bound of the range of organizations to return (not
1104            inclusive)
1105            * @return the matching organizations ordered by name
1106            * @throws SystemException if a system exception occurred
1107            * @see com.liferay.portal.service.persistence.OrganizationFinder
1108            */
1109            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1110            public java.util.List<com.liferay.portal.model.Organization> search(
1111                    long companyId, long parentOrganizationId, java.lang.String name,
1112                    java.lang.String type, java.lang.String street, java.lang.String city,
1113                    java.lang.String zip, java.lang.Long regionId,
1114                    java.lang.Long countryId,
1115                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1116                    boolean andOperator, int start, int end)
1117                    throws com.liferay.portal.kernel.exception.SystemException;
1118    
1119            /**
1120            * Returns an ordered range of all the organizations with the type, region,
1121            * and country, and whose name, street, city, and zipcode match the keywords
1122            * specified for them, without using the indexer. It is preferable to use
1123            * the indexed version {@link #search(long, long, String, String, String,
1124            * String, String, String, String, LinkedHashMap, boolean, int, int, Sort)}
1125            * instead of this method wherever possible for performance reasons.
1126            *
1127            * <p>
1128            * Useful when paginating results. Returns a maximum of <code>end -
1129            * start</code> instances. <code>start</code> and <code>end</code> are not
1130            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1131            * refers to the first result in the set. Setting both <code>start</code>
1132            * and <code>end</code> to {@link
1133            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1134            * result set.
1135            * </p>
1136            *
1137            * @param companyId the primary key of the organization's company
1138            * @param parentOrganizationId the primary key of the organization's parent
1139            organization
1140            * @param name the name keywords (space separated, optionally
1141            <code>null</code>)
1142            * @param type the organization's type (optionally <code>null</code>)
1143            * @param street the street keywords (optionally <code>null</code>)
1144            * @param city the city keywords (optionally <code>null</code>)
1145            * @param zip the zipcode keywords (optionally <code>null</code>)
1146            * @param regionId the primary key of the organization's region (optionally
1147            <code>null</code>)
1148            * @param countryId the primary key of the organization's country
1149            (optionally <code>null</code>)
1150            * @param params the finder parameters (optionally <code>null</code>). For
1151            more information see {@link
1152            com.liferay.portal.service.persistence.OrganizationFinder}
1153            * @param andOperator whether every field must match its keywords, or just
1154            one field. For example, &quot;organizations with the name
1155            'Employees' and city 'Chicago'&quot; vs &quot;organizations with
1156            the name 'Employees' or the city 'Chicago'&quot;.
1157            * @param start the lower bound of the range of organizations to return
1158            * @param end the upper bound of the range of organizations to return (not
1159            inclusive)
1160            * @param obc the comparator to order the organizations (optionally
1161            <code>null</code>)
1162            * @return the matching organizations ordered by comparator <code>obc</code>
1163            * @throws SystemException if a system exception occurred
1164            * @see com.liferay.portal.service.persistence.OrganizationFinder
1165            */
1166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1167            public java.util.List<com.liferay.portal.model.Organization> search(
1168                    long companyId, long parentOrganizationId, java.lang.String name,
1169                    java.lang.String type, java.lang.String street, java.lang.String city,
1170                    java.lang.String zip, java.lang.Long regionId,
1171                    java.lang.Long countryId,
1172                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1173                    boolean andOperator, int start, int end,
1174                    com.liferay.portal.kernel.util.OrderByComparator obc)
1175                    throws com.liferay.portal.kernel.exception.SystemException;
1176    
1177            /**
1178            * Returns an ordered range of all the organizations whose name, type, or
1179            * location fields match the keywords specified for them, using the indexer.
1180            * It is preferable to use this method instead of the non-indexed version
1181            * whenever possible for performance reasons.
1182            *
1183            * <p>
1184            * Useful when paginating results. Returns a maximum of <code>end -
1185            * start</code> instances. <code>start</code> and <code>end</code> are not
1186            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1187            * refers to the first result in the set. Setting both <code>start</code>
1188            * and <code>end</code> to {@link
1189            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1190            * result set.
1191            * </p>
1192            *
1193            * @param companyId the primary key of the organization's company
1194            * @param parentOrganizationId the primary key of the organization's parent
1195            organization
1196            * @param name the name keywords (space separated, optionally
1197            <code>null</code>)
1198            * @param type the type keywords (optionally <code>null</code>)
1199            * @param street the street keywords (optionally <code>null</code>)
1200            * @param city the city keywords (optionally <code>null</code>)
1201            * @param zip the zipcode keywords (optionally <code>null</code>)
1202            * @param region the region keywords (optionally <code>null</code>)
1203            * @param country the country keywords (optionally <code>null</code>)
1204            * @param params the finder parameters (optionally <code>null</code>). For
1205            more information see {@link
1206            com.liferay.portlet.usersadmin.util.OrganizationIndexer}.
1207            * @param andSearch whether every field must match its keywords or just one
1208            field
1209            * @param start the lower bound of the range of organizations to return
1210            * @param end the upper bound of the range of organizations to return (not
1211            inclusive)
1212            * @param sort the field and direction by which to sort (optionally
1213            <code>null</code>)
1214            * @return the matching organizations ordered by <code>sort</code>
1215            * @throws SystemException if a system exception occurred
1216            * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer
1217            */
1218            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1219            public com.liferay.portal.kernel.search.Hits search(long companyId,
1220                    long parentOrganizationId, java.lang.String name,
1221                    java.lang.String type, java.lang.String street, java.lang.String city,
1222                    java.lang.String zip, java.lang.String region,
1223                    java.lang.String country,
1224                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1225                    boolean andSearch, int start, int end,
1226                    com.liferay.portal.kernel.search.Sort sort)
1227                    throws com.liferay.portal.kernel.exception.SystemException;
1228    
1229            /**
1230            * Returns the number of organizations that match the keywords, type,
1231            * region, and country.
1232            *
1233            * @param companyId the primary key of the organization's company
1234            * @param parentOrganizationId the primary key of the organization's parent
1235            organization
1236            * @param keywords the keywords (space separated), which may occur in the
1237            organization's name, street, city, or zipcode (optionally
1238            <code>null</code>)
1239            * @param type the organization's type (optionally <code>null</code>)
1240            * @param regionId the primary key of the organization's region (optionally
1241            <code>null</code>)
1242            * @param countryId the primary key of the organization's country
1243            (optionally <code>null</code>)
1244            * @param params the finder parameters (optionally <code>null</code>). For
1245            more information see {@link
1246            com.liferay.portal.service.persistence.OrganizationFinder}
1247            * @return the number of matching organizations
1248            * @throws SystemException if a system exception occurred
1249            * @see com.liferay.portal.service.persistence.OrganizationFinder
1250            */
1251            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1252            public int searchCount(long companyId, long parentOrganizationId,
1253                    java.lang.String keywords, java.lang.String type,
1254                    java.lang.Long regionId, java.lang.Long countryId,
1255                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
1256                    throws com.liferay.portal.kernel.exception.SystemException;
1257    
1258            /**
1259            * Returns the number of organizations with the type, region, and country,
1260            * and whose name, street, city, and zipcode match the keywords specified
1261            * for them.
1262            *
1263            * @param companyId the primary key of the organization's company
1264            * @param parentOrganizationId the primary key of the organization's parent
1265            organization
1266            * @param name the name keywords (space separated, optionally
1267            <code>null</code>)
1268            * @param type the organization's type (optionally <code>null</code>)
1269            * @param street the street keywords (optionally <code>null</code>)
1270            * @param city the city keywords (optionally <code>null</code>)
1271            * @param zip the zipcode keywords (optionally <code>null</code>)
1272            * @param regionId the primary key of the organization's region (optionally
1273            <code>null</code>)
1274            * @param countryId the primary key of the organization's country
1275            (optionally <code>null</code>)
1276            * @param params the finder parameters (optionally <code>null</code>). For
1277            more information see {@link
1278            com.liferay.portal.service.persistence.OrganizationFinder}
1279            * @param andOperator whether every field must match its keywords, or just
1280            one field. For example, &quot;organizations with the name
1281            'Employees' and city 'Chicago'&quot; vs &quot;organizations with
1282            the name 'Employees' or the city 'Chicago'&quot;.
1283            * @return the number of matching organizations
1284            * @throws SystemException if a system exception occurred
1285            * @see com.liferay.portal.service.persistence.OrganizationFinder
1286            */
1287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1288            public int searchCount(long companyId, long parentOrganizationId,
1289                    java.lang.String name, java.lang.String type, java.lang.String street,
1290                    java.lang.String city, java.lang.String zip, java.lang.Long regionId,
1291                    java.lang.Long countryId,
1292                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1293                    boolean andOperator)
1294                    throws com.liferay.portal.kernel.exception.SystemException;
1295    
1296            /**
1297            * Removes the organizations from the group.
1298            *
1299            * @param groupId the primary key of the group
1300            * @param organizationIds the primary keys of the organizations
1301            * @throws PortalException if a portal exception occurred
1302            * @throws SystemException if a system exception occurred
1303            */
1304            public void unsetGroupOrganizations(long groupId, long[] organizationIds)
1305                    throws com.liferay.portal.kernel.exception.PortalException,
1306                            com.liferay.portal.kernel.exception.SystemException;
1307    
1308            /**
1309            * Removes the organizations from the password policy.
1310            *
1311            * @param passwordPolicyId the primary key of the password policy
1312            * @param organizationIds the primary keys of the organizations
1313            * @throws SystemException if a system exception occurred
1314            */
1315            public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
1316                    long[] organizationIds)
1317                    throws com.liferay.portal.kernel.exception.SystemException;
1318    
1319            /**
1320            * Updates the organization's asset with the new asset categories and tag
1321            * names, removing and adding asset categories and tag names as necessary.
1322            *
1323            * @param userId the primary key of the user
1324            * @param organization the organization
1325            * @param assetCategoryIds the primary keys of the asset categories
1326            * @param assetTagNames the asset tag names
1327            * @throws PortalException if a user with the primary key could not be found
1328            * @throws SystemException if a system exception occurred
1329            */
1330            public void updateAsset(long userId,
1331                    com.liferay.portal.model.Organization organization,
1332                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
1333                    throws com.liferay.portal.kernel.exception.PortalException,
1334                            com.liferay.portal.kernel.exception.SystemException;
1335    
1336            /**
1337            * Updates the organization.
1338            *
1339            * @param companyId the primary key of the organization's company
1340            * @param organizationId the primary key of the organization
1341            * @param parentOrganizationId the primary key of organization's parent
1342            organization
1343            * @param name the organization's name
1344            * @param type the organization's type
1345            * @param recursable whether permissions of the organization are to be
1346            inherited by its suborganizations
1347            * @param regionId the primary key of the organization's region
1348            * @param countryId the primary key of the organization's country
1349            * @param statusId the organization's workflow status
1350            * @param comments the comments about the organization
1351            * @param site whether the organization is to be associated with a main
1352            site
1353            * @param serviceContext the service context to be applied (optionally
1354            <code>null</code>). Can set asset category IDs and asset tag
1355            names for the organization, and merge expando bridge
1356            attributes for the organization.
1357            * @return the organization
1358            * @throws PortalException if an organization or parent organization
1359            with the primary key could not be found or if the new
1360            information was invalid
1361            * @throws SystemException if a system exception occurred
1362            * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long,
1363            long, long, String, String, long, long, int, String, boolean,
1364            ServiceContext)}
1365            */
1366            public com.liferay.portal.model.Organization updateOrganization(
1367                    long companyId, long organizationId, long parentOrganizationId,
1368                    java.lang.String name, java.lang.String type, boolean recursable,
1369                    long regionId, long countryId, int statusId, java.lang.String comments,
1370                    boolean site, com.liferay.portal.service.ServiceContext serviceContext)
1371                    throws com.liferay.portal.kernel.exception.PortalException,
1372                            com.liferay.portal.kernel.exception.SystemException;
1373    
1374            /**
1375            * Updates the organization.
1376            *
1377            * @param companyId the primary key of the organization's company
1378            * @param organizationId the primary key of the organization
1379            * @param parentOrganizationId the primary key of organization's parent
1380            organization
1381            * @param name the organization's name
1382            * @param type the organization's type
1383            * @param regionId the primary key of the organization's region
1384            * @param countryId the primary key of the organization's country
1385            * @param statusId the organization's workflow status
1386            * @param comments the comments about the organization
1387            * @param site whether the organization is to be associated with a main
1388            site
1389            * @param serviceContext the service context to be applied (optionally
1390            <code>null</code>). Can set asset category IDs and asset tag
1391            names for the organization, and merge expando bridge attributes
1392            for the organization.
1393            * @return the organization
1394            * @throws PortalException if an organization or parent organization with
1395            the primary key could not be found or if the new information was
1396            invalid
1397            * @throws SystemException if a system exception occurred
1398            */
1399            public com.liferay.portal.model.Organization updateOrganization(
1400                    long companyId, long organizationId, long parentOrganizationId,
1401                    java.lang.String name, java.lang.String type, long regionId,
1402                    long countryId, int statusId, java.lang.String comments, boolean site,
1403                    com.liferay.portal.service.ServiceContext serviceContext)
1404                    throws com.liferay.portal.kernel.exception.PortalException,
1405                            com.liferay.portal.kernel.exception.SystemException;
1406    }