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