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 PortalException;
060    
061            /**
062            * @throws PortalException
063            */
064            public void addGroupOrganizations(long groupId, long[] organizationIds)
065                    throws 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 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, long statusId, java.lang.String comments, boolean site,
142                    com.liferay.portal.service.ServiceContext serviceContext)
143                    throws 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, long statusId,
177                    java.lang.String comments, boolean site,
178                    com.liferay.portal.service.ServiceContext serviceContext)
179                    throws 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 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) throws PortalException;
245    
246            /**
247            * Deletes the organization from the database. Also notifies the appropriate model listeners.
248            *
249            * @param organization the organization
250            * @return the organization that was removed
251            * @throws PortalException
252            */
253            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
254            @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE)
255            public com.liferay.portal.model.Organization deleteOrganization(
256                    com.liferay.portal.model.Organization organization)
257                    throws PortalException;
258    
259            /**
260            * Deletes the organization with the primary key from the database. Also notifies the appropriate model listeners.
261            *
262            * @param organizationId the primary key of the organization
263            * @return the organization that was removed
264            * @throws PortalException if a organization with the primary key could not be found
265            */
266            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
267            public com.liferay.portal.model.Organization deleteOrganization(
268                    long organizationId) throws PortalException;
269    
270            /**
271            * @throws PortalException
272            */
273            @Override
274            public com.liferay.portal.model.PersistedModel deletePersistedModel(
275                    com.liferay.portal.model.PersistedModel persistedModel)
276                    throws PortalException;
277    
278            public void deleteUserOrganization(long userId,
279                    com.liferay.portal.model.Organization organization);
280    
281            public void deleteUserOrganization(long userId, long organizationId);
282    
283            public void deleteUserOrganizations(long userId,
284                    java.util.List<com.liferay.portal.model.Organization> Organizations);
285    
286            public void deleteUserOrganizations(long userId, long[] organizationIds);
287    
288            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
289    
290            /**
291            * Performs a dynamic query on the database and returns the matching rows.
292            *
293            * @param dynamicQuery the dynamic query
294            * @return the matching rows
295            */
296            public <T> java.util.List<T> dynamicQuery(
297                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
298    
299            /**
300            * Performs a dynamic query on the database and returns a range of the matching rows.
301            *
302            * <p>
303            * 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.
304            * </p>
305            *
306            * @param dynamicQuery the dynamic query
307            * @param start the lower bound of the range of model instances
308            * @param end the upper bound of the range of model instances (not inclusive)
309            * @return the range of matching rows
310            */
311            public <T> java.util.List<T> dynamicQuery(
312                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
313                    int end);
314    
315            /**
316            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
317            *
318            * <p>
319            * 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.
320            * </p>
321            *
322            * @param dynamicQuery the dynamic query
323            * @param start the lower bound of the range of model instances
324            * @param end the upper bound of the range of model instances (not inclusive)
325            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
326            * @return the ordered range of matching rows
327            */
328            public <T> java.util.List<T> dynamicQuery(
329                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
330                    int end,
331                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
332    
333            /**
334            * Returns the number of rows matching the dynamic query.
335            *
336            * @param dynamicQuery the dynamic query
337            * @return the number of rows matching the dynamic query
338            */
339            public long dynamicQueryCount(
340                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
341    
342            /**
343            * Returns the number of rows matching the dynamic query.
344            *
345            * @param dynamicQuery the dynamic query
346            * @param projection the projection to apply to the query
347            * @return the number of rows matching the dynamic query
348            */
349            public long dynamicQueryCount(
350                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
351                    com.liferay.portal.kernel.dao.orm.Projection projection);
352    
353            /**
354            * Returns the organization with the name.
355            *
356            * @param companyId the primary key of the organization's company
357            * @param name the organization's name
358            * @return the organization with the name, or <code>null</code> if no
359            organization could be found
360            */
361            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
362            public com.liferay.portal.model.Organization fetchOrganization(
363                    long companyId, java.lang.String name);
364    
365            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
366            public com.liferay.portal.model.Organization fetchOrganization(
367                    long organizationId);
368    
369            /**
370            * Returns the organization with the matching UUID and company.
371            *
372            * @param uuid the organization's UUID
373            * @param companyId the primary key of the company
374            * @return the matching organization, or <code>null</code> if a matching organization could not be found
375            */
376            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
377            public com.liferay.portal.model.Organization fetchOrganizationByUuidAndCompanyId(
378                    java.lang.String uuid, long companyId);
379    
380            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
381            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
382    
383            /**
384            * Returns the Spring bean ID for this bean.
385            *
386            * @return the Spring bean ID for this bean
387            */
388            public java.lang.String getBeanIdentifier();
389    
390            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
392                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
393    
394            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
395            public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
396                    long groupId);
397    
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
400                    long groupId, int start, int end);
401    
402            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
403            public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
404                    long groupId, int start, int end,
405                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> orderByComparator);
406    
407            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
408            public int getGroupOrganizationsCount(long groupId);
409    
410            /**
411            * Returns the groupIds of the groups associated with the organization.
412            *
413            * @param organizationId the organizationId of the organization
414            * @return long[] the groupIds of groups associated with the organization
415            */
416            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
417            public long[] getGroupPrimaryKeys(long organizationId);
418    
419            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
420            public java.util.List<com.liferay.portal.model.Organization> getGroupUserOrganizations(
421                    long groupId, long userId) throws PortalException;
422    
423            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
424            public java.util.List<com.liferay.portal.model.Organization> getNoAssetOrganizations();
425    
426            /**
427            * Returns the organization with the name.
428            *
429            * @param companyId the primary key of the organization's company
430            * @param name the organization's name
431            * @return the organization with the name
432            * @throws PortalException if the organization with the name could not be
433            found
434            */
435            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
436            public com.liferay.portal.model.Organization getOrganization(
437                    long companyId, java.lang.String name) throws PortalException;
438    
439            /**
440            * Returns the organization with the primary key.
441            *
442            * @param organizationId the primary key of the organization
443            * @return the organization
444            * @throws PortalException if a organization with the primary key could not be found
445            */
446            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
447            public com.liferay.portal.model.Organization getOrganization(
448                    long organizationId) throws PortalException;
449    
450            /**
451            * Returns the organization with the matching UUID and company.
452            *
453            * @param uuid the organization's UUID
454            * @param companyId the primary key of the company
455            * @return the matching organization
456            * @throws PortalException if a matching organization could not be found
457            */
458            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
459            public com.liferay.portal.model.Organization getOrganizationByUuidAndCompanyId(
460                    java.lang.String uuid, long companyId) throws PortalException;
461    
462            /**
463            * Returns the primary key of the organization with the name.
464            *
465            * @param companyId the primary key of the organization's company
466            * @param name the organization's name
467            * @return the primary key of the organization with the name, or
468            <code>0</code> if the organization could not be found
469            */
470            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
471            public long getOrganizationId(long companyId, java.lang.String name);
472    
473            /**
474            * Returns all the organizations belonging to the parent organization.
475            *
476            * @param companyId the primary key of the organization's company
477            * @param parentOrganizationId the primary key of the organization's parent
478            organization
479            * @return the organizations belonging to the parent organization
480            */
481            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
482            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
483                    long companyId, long parentOrganizationId);
484    
485            /**
486            * Returns a range of all the organizations belonging to the parent
487            * organization.
488            *
489            * <p>
490            * Useful when paginating results. Returns a maximum of <code>end -
491            * start</code> instances. <code>start</code> and <code>end</code> are not
492            * primary keys, they are indexes in the result set. Thus, <code>0</code>
493            * refers to the first result in the set. Setting both <code>start</code>
494            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
495            * result set.
496            * </p>
497            *
498            * @param companyId the primary key of the organization's company
499            * @param parentOrganizationId the primary key of the organization's parent
500            organization
501            * @param start the lower bound of the range of organizations to return
502            * @param end the upper bound of the range of organizations to return (not
503            inclusive)
504            * @return the range of organizations belonging to the parent organization
505            * @see com.liferay.portal.service.persistence.OrganizationPersistence#findByC_P(
506            long, long, int, int)
507            */
508            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
509            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
510                    long companyId, long parentOrganizationId, int start, int end);
511    
512            /**
513            * Returns the organizations with the primary keys.
514            *
515            * @param organizationIds the primary keys of the organizations
516            * @return the organizations with the primary keys
517            * @throws PortalException if any one of the organizations could not be
518            found
519            */
520            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
521            public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
522                    long[] organizationIds) throws 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 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) throws PortalException;
576    
577            @Override
578            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
579            public com.liferay.portal.model.PersistedModel getPersistedModel(
580                    java.io.Serializable primaryKeyObj) throws PortalException;
581    
582            /**
583            * Returns the suborganizations of the organization.
584            *
585            * @param companyId the primary key of the organization's company
586            * @param organizationId the primary key of the organization
587            * @return the suborganizations of the organization
588            */
589            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
590            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
591                    long companyId, long organizationId);
592    
593            /**
594            * Returns the suborganizations of the organizations.
595            *
596            * @param organizations the organizations from which to get
597            suborganizations
598            * @return the suborganizations of the organizations
599            */
600            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
601            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
602                    java.util.List<com.liferay.portal.model.Organization> organizations);
603    
604            /**
605            * Returns the count of suborganizations of the organization.
606            *
607            * @param companyId the primary key of the organization's company
608            * @param organizationId the primary key of the organization
609            * @return the count of suborganizations of the organization
610            */
611            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
612            public int getSuborganizationsCount(long companyId, long organizationId);
613    
614            /**
615            * Returns the intersection of <code>allOrganizations</code> and
616            * <code>availableOrganizations</code>.
617            *
618            * @param allOrganizations the organizations to check for availability
619            * @param availableOrganizations the available organizations
620            * @return the intersection of <code>allOrganizations</code> and
621            <code>availableOrganizations</code>
622            */
623            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
624            public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
625                    java.util.List<com.liferay.portal.model.Organization> allOrganizations,
626                    java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
627    
628            /**
629            * Returns all the IDs of organizations with which the user is explicitly
630            * associated, optionally including the IDs of organizations that the user
631            * administers or owns.
632            *
633            * <p>
634            * A user is considered to be <i>explicitly</i> associated with an
635            * organization if his account is individually created within the
636            * organization or if the user is later added to it.
637            * </p>
638            *
639            * @param userId the primary key of the user
640            * @param includeAdministrative whether to include the IDs of organizations
641            that the user administers or owns, even if he's not a member of
642            the organizations
643            * @return the IDs of organizations with which the user is explicitly
644            associated, optionally including the IDs of organizations that
645            the user administers or owns
646            * @throws PortalException if a user with the primary key could not be found
647            or if a portal exception occurred
648            */
649            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
650            public long[] getUserOrganizationIds(long userId,
651                    boolean includeAdministrative) throws PortalException;
652    
653            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
654            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
655                    long userId);
656    
657            /**
658            * Returns all the organizations with which the user is explicitly
659            * associated, optionally including the organizations that the user
660            * administers or owns.
661            *
662            * <p>
663            * A user is considered to be <i>explicitly</i> associated with an
664            * organization if his account is individually created within the
665            * organization or if the user is later added as a member.
666            * </p>
667            *
668            * @param userId the primary key of the user
669            * @param includeAdministrative whether to include the IDs of organizations
670            that the user administers or owns, even if he's not a member of
671            the organizations
672            * @return the organizations with which the user is explicitly associated,
673            optionally including the organizations that the user administers
674            or owns
675            * @throws PortalException if a user with the primary key could not be found
676            */
677            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
678            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
679                    long userId, boolean includeAdministrative) throws PortalException;
680    
681            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
682            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
683                    long userId, int start, int end);
684    
685            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
686            public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
687                    long userId, int start, int end,
688                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> orderByComparator);
689    
690            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
691            public int getUserOrganizationsCount(long userId);
692    
693            /**
694            * Returns the userIds of the users associated with the organization.
695            *
696            * @param organizationId the organizationId of the organization
697            * @return long[] the userIds of users associated with the organization
698            */
699            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
700            public long[] getUserPrimaryKeys(long organizationId);
701    
702            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
703            public boolean hasGroupOrganization(long groupId, long organizationId);
704    
705            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
706            public boolean hasGroupOrganizations(long groupId);
707    
708            /**
709            * Returns <code>true</code> if the password policy has been assigned to the
710            * organization.
711            *
712            * @param passwordPolicyId the primary key of the password policy
713            * @param organizationId the primary key of the organization
714            * @return <code>true</code> if the password policy has been assigned to the
715            organization; <code>false</code> otherwise
716            */
717            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
718            public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
719                    long organizationId);
720    
721            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
722            public boolean hasUserOrganization(long userId, long organizationId);
723    
724            /**
725            * Returns <code>true</code> if the user is a member of the organization,
726            * optionally focusing on suborganizations or the specified organization.
727            * This method is usually called to determine if the user has view access to
728            * a resource belonging to the organization.
729            *
730            * <ol>
731            * <li>
732            * If <code>inheritSuborganizations=<code>false</code></code>:
733            * the method checks whether the user belongs to the organization specified
734            * by <code>organizationId</code>. The parameter
735            * <code>includeSpecifiedOrganization</code> is ignored.
736            * </li>
737            * <li>
738            * The parameter <code>includeSpecifiedOrganization</code> is
739            * ignored unless <code>inheritSuborganizations</code> is also
740            * <code>true</code>.
741            * </li>
742            * <li>
743            * If <code>inheritSuborganizations=<code>true</code></code> and
744            * <code>includeSpecifiedOrganization=<code>false</code></code>: the method
745            * checks
746            * whether the user belongs to one of the child organizations of the one
747            * specified by <code>organizationId</code>.
748            * </li>
749            * <li>
750            * If <code>inheritSuborganizations=<code>true</code></code> and
751            * <code>includeSpecifiedOrganization=<code>true</code></code>: the method
752            * checks whether
753            * the user belongs to the organization specified by
754            * <code>organizationId</code> or any of
755            * its child organizations.
756            * </li>
757            * </ol>
758            *
759            * @param userId the primary key of the organization's user
760            * @param organizationId the primary key of the organization
761            * @param inheritSuborganizations if <code>true</code> suborganizations are
762            considered in the determination
763            * @param includeSpecifiedOrganization if <code>true</code> the
764            organization specified by <code>organizationId</code> is
765            considered in the determination
766            * @return <code>true</code> if the user has access to the organization;
767            <code>false</code> otherwise
768            * @throws PortalException if an organization with the primary key could not
769            be found
770            * @see com.liferay.portal.service.persistence.OrganizationFinder
771            */
772            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
773            public boolean hasUserOrganization(long userId, long organizationId,
774                    boolean inheritSuborganizations, boolean includeSpecifiedOrganization)
775                    throws PortalException;
776    
777            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
778            public boolean hasUserOrganizations(long userId);
779    
780            /**
781            * Rebuilds the organization's tree.
782            *
783            * <p>
784            * Only call this method if the tree has become stale through operations
785            * other than normal CRUD. Under normal circumstances the tree is
786            * automatically rebuilt whenever necessary.
787            * </p>
788            *
789            * @param companyId the primary key of the organization's company
790            * @throws PortalException if an organization with the primary key could not
791            be found
792            */
793            public void rebuildTree(long companyId) throws PortalException;
794    
795            /**
796            * Returns an ordered range of all the organizations that match the
797            * keywords, using the indexer. It is preferable to use this method instead
798            * of the non-indexed version whenever possible for performance reasons.
799            *
800            * <p>
801            * Useful when paginating results. Returns a maximum of <code>end -
802            * start</code> instances. <code>start</code> and <code>end</code> are not
803            * primary keys, they are indexes in the result set. Thus, <code>0</code>
804            * refers to the first result in the set. Setting both <code>start</code>
805            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
806            * result set.
807            * </p>
808            *
809            * @param companyId the primary key of the organization's company
810            * @param parentOrganizationId the primary key of the organization's parent
811            organization
812            * @param keywords the keywords (space separated), which may occur in the
813            organization's name, street, city, zipcode, type, region or
814            country (optionally <code>null</code>)
815            * @param params the finder parameters (optionally <code>null</code>). For
816            more information see {@link
817            com.liferay.portlet.usersadmin.util.OrganizationIndexer}
818            * @param start the lower bound of the range of organizations to return
819            * @param end the upper bound of the range of organizations to return (not
820            inclusive)
821            * @param sort the field and direction by which to sort (optionally
822            <code>null</code>)
823            * @return the matching organizations ordered by name
824            * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer
825            */
826            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
827            public com.liferay.portal.kernel.search.Hits search(long companyId,
828                    long parentOrganizationId, java.lang.String keywords,
829                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
830                    int start, int end, com.liferay.portal.kernel.search.Sort sort);
831    
832            /**
833            * Returns a name ordered range of all the organizations that match the
834            * keywords, type, region, and country, without using the indexer. It is
835            * preferable to use the indexed version {@link #search(long, long, String,
836            * LinkedHashMap, int, int, Sort)} instead of this method wherever possible
837            * for performance reasons.
838            *
839            * <p>
840            * Useful when paginating results. Returns a maximum of <code>end -
841            * start</code> instances. <code>start</code> and <code>end</code> are not
842            * primary keys, they are indexes in the result set. Thus, <code>0</code>
843            * refers to the first result in the set. Setting both <code>start</code>
844            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
845            * result set.
846            * </p>
847            *
848            * @param companyId the primary key of the organization's company
849            * @param parentOrganizationId the primary key of the organization's parent
850            organization
851            * @param keywords the keywords (space separated), which may occur in the
852            organization's name, street, city, or zipcode (optionally
853            <code>null</code>)
854            * @param type the organization's type (optionally <code>null</code>)
855            * @param regionId the primary key of the organization's region (optionally
856            <code>null</code>)
857            * @param countryId the primary key of the organization's country
858            (optionally <code>null</code>)
859            * @param params the finder params. For more information see {@link
860            com.liferay.portal.service.persistence.OrganizationFinder}
861            * @param start the lower bound of the range of organizations to return
862            * @param end the upper bound of the range of organizations to return (not
863            inclusive)
864            * @return the matching organizations ordered by name
865            * @see com.liferay.portal.service.persistence.OrganizationFinder
866            */
867            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
868            public java.util.List<com.liferay.portal.model.Organization> search(
869                    long companyId, long parentOrganizationId, java.lang.String keywords,
870                    java.lang.String type, java.lang.Long regionId,
871                    java.lang.Long countryId,
872                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
873                    int start, int end);
874    
875            /**
876            * Returns an ordered range of all the organizations that match the
877            * keywords, type, region, and country, without using the indexer. It is
878            * preferable to use the indexed version {@link #search(long, long, String,
879            * String, String, String, String, String, String, LinkedHashMap, boolean,
880            * int, int, Sort)} instead of this method wherever possible for performance
881            * reasons.
882            *
883            * <p>
884            * Useful when paginating results. Returns a maximum of <code>end -
885            * start</code> instances. <code>start</code> and <code>end</code> are not
886            * primary keys, they are indexes in the result set. Thus, <code>0</code>
887            * refers to the first result in the set. Setting both <code>start</code>
888            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
889            * result set.
890            * </p>
891            *
892            * @param companyId the primary key of the organization's company
893            * @param parentOrganizationId the primary key of the organization's parent
894            organization
895            * @param keywords the keywords (space separated), which may occur in the
896            organization's name, street, city, or zipcode (optionally
897            <code>null</code>)
898            * @param type the organization's type (optionally <code>null</code>)
899            * @param regionId the primary key of the organization's region (optionally
900            <code>null</code>)
901            * @param countryId the primary key of the organization's country
902            (optionally <code>null</code>)
903            * @param params the finder params. For more information see {@link
904            com.liferay.portal.service.persistence.OrganizationFinder}
905            * @param start the lower bound of the range of organizations to return
906            * @param end the upper bound of the range of organizations to return (not
907            inclusive)
908            * @param obc the comparator to order the organizations (optionally
909            <code>null</code>)
910            * @return the matching organizations ordered by comparator <code>obc</code>
911            * @see com.liferay.portal.service.persistence.OrganizationFinder
912            */
913            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
914            public java.util.List<com.liferay.portal.model.Organization> search(
915                    long companyId, long parentOrganizationId, java.lang.String keywords,
916                    java.lang.String type, java.lang.Long regionId,
917                    java.lang.Long countryId,
918                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
919                    int start, int end,
920                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc);
921    
922            /**
923            * Returns an ordered range of all the organizations whose name, type, or
924            * location fields match the keywords specified for them, using the indexer.
925            * It is preferable to use this method instead of the non-indexed version
926            * whenever possible for performance reasons.
927            *
928            * <p>
929            * Useful when paginating results. Returns a maximum of <code>end -
930            * start</code> instances. <code>start</code> and <code>end</code> are not
931            * primary keys, they are indexes in the result set. Thus, <code>0</code>
932            * refers to the first result in the set. Setting both <code>start</code>
933            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
934            * result set.
935            * </p>
936            *
937            * @param companyId the primary key of the organization's company
938            * @param parentOrganizationId the primary key of the organization's parent
939            organization
940            * @param name the name keywords (space separated, optionally
941            <code>null</code>)
942            * @param type the type keywords (optionally <code>null</code>)
943            * @param street the street keywords (optionally <code>null</code>)
944            * @param city the city keywords (optionally <code>null</code>)
945            * @param zip the zipcode keywords (optionally <code>null</code>)
946            * @param region the region keywords (optionally <code>null</code>)
947            * @param country the country keywords (optionally <code>null</code>)
948            * @param params the finder parameters (optionally <code>null</code>). For
949            more information see {@link
950            com.liferay.portlet.usersadmin.util.OrganizationIndexer}.
951            * @param andSearch whether every field must match its keywords or just one
952            field
953            * @param start the lower bound of the range of organizations to return
954            * @param end the upper bound of the range of organizations to return (not
955            inclusive)
956            * @param sort the field and direction by which to sort (optionally
957            <code>null</code>)
958            * @return the matching organizations ordered by <code>sort</code>
959            * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer
960            */
961            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
962            public com.liferay.portal.kernel.search.Hits search(long companyId,
963                    long parentOrganizationId, java.lang.String name,
964                    java.lang.String type, java.lang.String street, java.lang.String city,
965                    java.lang.String zip, java.lang.String region,
966                    java.lang.String country,
967                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
968                    boolean andSearch, int start, int end,
969                    com.liferay.portal.kernel.search.Sort sort);
970    
971            /**
972            * Returns a name ordered range of all the organizations with the type,
973            * region, and country, and whose name, street, city, and zipcode match the
974            * keywords specified for them, without using the indexer. It is preferable
975            * to use the indexed version {@link #search(long, long, String, String,
976            * String, String, String, String, String, LinkedHashMap, boolean, int, int,
977            * Sort)} instead of this method wherever possible for performance reasons.
978            *
979            * <p>
980            * Useful when paginating results. Returns a maximum of <code>end -
981            * start</code> instances. <code>start</code> and <code>end</code> are not
982            * primary keys, they are indexes in the result set. Thus, <code>0</code>
983            * refers to the first result in the set. Setting both <code>start</code>
984            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
985            * result set.
986            * </p>
987            *
988            * @param companyId the primary key of the organization's company
989            * @param parentOrganizationId the primary key of the organization's parent
990            * @param name the name keywords (space separated, optionally
991            <code>null</code>)
992            * @param type the organization's type (optionally <code>null</code>)
993            * @param street the street keywords (optionally <code>null</code>)
994            * @param city the city keywords (optionally <code>null</code>)
995            * @param zip the zipcode keywords (optionally <code>null</code>)
996            * @param regionId the primary key of the organization's region (optionally
997            <code>null</code>)
998            * @param countryId the primary key of the organization's country
999            (optionally <code>null</code>)
1000            * @param params the finder parameters (optionally <code>null</code>). For
1001            more information see {@link
1002            com.liferay.portal.service.persistence.OrganizationFinder}
1003            * @param andOperator whether every field must match its keywords, or just
1004            one field. For example, &quot;organizations with the name
1005            'Employees' and city 'Chicago'&quot; vs &quot;organizations with
1006            the name 'Employees' or the city 'Chicago'&quot;.
1007            * @param start the lower bound of the range of organizations to return
1008            * @param end the upper bound of the range of organizations to return (not
1009            inclusive)
1010            * @return the matching organizations ordered by name
1011            * @see com.liferay.portal.service.persistence.OrganizationFinder
1012            */
1013            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1014            public java.util.List<com.liferay.portal.model.Organization> search(
1015                    long companyId, long parentOrganizationId, java.lang.String name,
1016                    java.lang.String type, java.lang.String street, java.lang.String city,
1017                    java.lang.String zip, java.lang.Long regionId,
1018                    java.lang.Long countryId,
1019                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1020                    boolean andOperator, int start, int end);
1021    
1022            /**
1023            * Returns an ordered range of all the organizations with the type, region,
1024            * and country, and whose name, street, city, and zipcode match the keywords
1025            * specified for them, without using the indexer. It is preferable to use
1026            * the indexed version {@link #search(long, long, String, String, String,
1027            * String, String, String, String, LinkedHashMap, boolean, int, int, Sort)}
1028            * instead of this method wherever possible for performance reasons.
1029            *
1030            * <p>
1031            * Useful when paginating results. Returns a maximum of <code>end -
1032            * start</code> instances. <code>start</code> and <code>end</code> are not
1033            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1034            * refers to the first result in the set. Setting both <code>start</code>
1035            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
1036            * result set.
1037            * </p>
1038            *
1039            * @param companyId the primary key of the organization's company
1040            * @param parentOrganizationId the primary key of the organization's parent
1041            organization
1042            * @param name the name keywords (space separated, optionally
1043            <code>null</code>)
1044            * @param type the organization's type (optionally <code>null</code>)
1045            * @param street the street keywords (optionally <code>null</code>)
1046            * @param city the city keywords (optionally <code>null</code>)
1047            * @param zip the zipcode keywords (optionally <code>null</code>)
1048            * @param regionId the primary key of the organization's region (optionally
1049            <code>null</code>)
1050            * @param countryId the primary key of the organization's country
1051            (optionally <code>null</code>)
1052            * @param params the finder parameters (optionally <code>null</code>). For
1053            more information see {@link
1054            com.liferay.portal.service.persistence.OrganizationFinder}
1055            * @param andOperator whether every field must match its keywords, or just
1056            one field. For example, &quot;organizations with the name
1057            'Employees' and city 'Chicago'&quot; vs &quot;organizations with
1058            the name 'Employees' or the city 'Chicago'&quot;.
1059            * @param start the lower bound of the range of organizations to return
1060            * @param end the upper bound of the range of organizations to return (not
1061            inclusive)
1062            * @param obc the comparator to order the organizations (optionally
1063            <code>null</code>)
1064            * @return the matching organizations ordered by comparator <code>obc</code>
1065            * @see com.liferay.portal.service.persistence.OrganizationFinder
1066            */
1067            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1068            public java.util.List<com.liferay.portal.model.Organization> search(
1069                    long companyId, long parentOrganizationId, java.lang.String name,
1070                    java.lang.String type, java.lang.String street, java.lang.String city,
1071                    java.lang.String zip, java.lang.Long regionId,
1072                    java.lang.Long countryId,
1073                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1074                    boolean andOperator, int start, int end,
1075                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc);
1076    
1077            /**
1078            * Returns the number of organizations that match the keywords, type,
1079            * region, and country.
1080            *
1081            * @param companyId the primary key of the organization's company
1082            * @param parentOrganizationId the primary key of the organization's parent
1083            organization
1084            * @param keywords the keywords (space separated), which may occur in the
1085            organization's name, street, city, or zipcode (optionally
1086            <code>null</code>)
1087            * @param type the organization's type (optionally <code>null</code>)
1088            * @param regionId the primary key of the organization's region (optionally
1089            <code>null</code>)
1090            * @param countryId the primary key of the organization's country
1091            (optionally <code>null</code>)
1092            * @param params the finder parameters (optionally <code>null</code>). For
1093            more information see {@link
1094            com.liferay.portal.service.persistence.OrganizationFinder}
1095            * @return the number of matching organizations
1096            * @see com.liferay.portal.service.persistence.OrganizationFinder
1097            */
1098            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1099            public int searchCount(long companyId, long parentOrganizationId,
1100                    java.lang.String keywords, java.lang.String type,
1101                    java.lang.Long regionId, java.lang.Long countryId,
1102                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
1103    
1104            /**
1105            * Returns the number of organizations with the type, region, and country,
1106            * and whose name, street, city, and zipcode match the keywords specified
1107            * for them.
1108            *
1109            * @param companyId the primary key of the organization's company
1110            * @param parentOrganizationId the primary key of the organization's parent
1111            organization
1112            * @param name the name keywords (space separated, optionally
1113            <code>null</code>)
1114            * @param type the organization's type (optionally <code>null</code>)
1115            * @param street the street keywords (optionally <code>null</code>)
1116            * @param city the city keywords (optionally <code>null</code>)
1117            * @param zip the zipcode keywords (optionally <code>null</code>)
1118            * @param regionId the primary key of the organization's region (optionally
1119            <code>null</code>)
1120            * @param countryId the primary key of the organization's country
1121            (optionally <code>null</code>)
1122            * @param params the finder parameters (optionally <code>null</code>). For
1123            more information see {@link
1124            com.liferay.portal.service.persistence.OrganizationFinder}
1125            * @param andOperator whether every field must match its keywords, or just
1126            one field. For example, &quot;organizations with the name
1127            'Employees' and city 'Chicago'&quot; vs &quot;organizations with
1128            the name 'Employees' or the city 'Chicago'&quot;.
1129            * @return the number of matching organizations
1130            * @see com.liferay.portal.service.persistence.OrganizationFinder
1131            */
1132            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1133            public int searchCount(long companyId, long parentOrganizationId,
1134                    java.lang.String name, java.lang.String type, java.lang.String street,
1135                    java.lang.String city, java.lang.String zip, java.lang.Long regionId,
1136                    java.lang.Long countryId,
1137                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1138                    boolean andOperator);
1139    
1140            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1141            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations(
1142                    long companyId, long parentOrganizationId, java.lang.String keywords,
1143                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1144                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
1145                    throws PortalException;
1146    
1147            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1148            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations(
1149                    long companyId, long parentOrganizationId, java.lang.String name,
1150                    java.lang.String type, java.lang.String street, java.lang.String city,
1151                    java.lang.String zip, java.lang.String region,
1152                    java.lang.String country,
1153                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1154                    boolean andSearch, int start, int end,
1155                    com.liferay.portal.kernel.search.Sort sort) throws PortalException;
1156    
1157            /**
1158            * Sets the Spring bean ID for this bean.
1159            *
1160            * @param beanIdentifier the Spring bean ID for this bean
1161            */
1162            public void setBeanIdentifier(java.lang.String beanIdentifier);
1163    
1164            /**
1165            * @throws PortalException
1166            */
1167            public void setGroupOrganizations(long groupId, long[] organizationIds)
1168                    throws PortalException;
1169    
1170            public void setUserOrganizations(long userId, long[] organizationIds);
1171    
1172            /**
1173            * Removes the organizations from the group.
1174            *
1175            * @param groupId the primary key of the group
1176            * @param organizationIds the primary keys of the organizations
1177            * @throws PortalException if a portal exception occurred
1178            */
1179            public void unsetGroupOrganizations(long groupId, long[] organizationIds)
1180                    throws PortalException;
1181    
1182            /**
1183            * Removes the organizations from the password policy.
1184            *
1185            * @param passwordPolicyId the primary key of the password policy
1186            * @param organizationIds the primary keys of the organizations
1187            */
1188            public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
1189                    long[] organizationIds);
1190    
1191            /**
1192            * Updates the organization's asset with the new asset categories and tag
1193            * names, removing and adding asset categories and tag names as necessary.
1194            *
1195            * @param userId the primary key of the user
1196            * @param organization the organization
1197            * @param assetCategoryIds the primary keys of the asset categories
1198            * @param assetTagNames the asset tag names
1199            * @throws PortalException if a user with the primary key could not be found
1200            */
1201            public void updateAsset(long userId,
1202                    com.liferay.portal.model.Organization organization,
1203                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
1204                    throws PortalException;
1205    
1206            /**
1207            * Updates the organization.
1208            *
1209            * @param companyId the primary key of the organization's company
1210            * @param organizationId the primary key of the organization
1211            * @param parentOrganizationId the primary key of organization's parent
1212            organization
1213            * @param name the organization's name
1214            * @param type the organization's type
1215            * @param recursable whether permissions of the organization are to be
1216            inherited by its suborganizations
1217            * @param regionId the primary key of the organization's region
1218            * @param countryId the primary key of the organization's country
1219            * @param statusId the organization's workflow status
1220            * @param comments the comments about the organization
1221            * @param site whether the organization is to be associated with a main
1222            site
1223            * @param serviceContext the service context to be applied (optionally
1224            <code>null</code>). Can set asset category IDs and asset tag
1225            names for the organization, and merge expando bridge
1226            attributes for the organization.
1227            * @return the organization
1228            * @throws PortalException if an organization or parent organization
1229            with the primary key could not be found or if the new
1230            information was invalid
1231            * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long,
1232            long, long, String, String, long, long, int, String, boolean,
1233            byte[], boolean, ServiceContext)}
1234            */
1235            @java.lang.Deprecated
1236            public com.liferay.portal.model.Organization updateOrganization(
1237                    long companyId, long organizationId, long parentOrganizationId,
1238                    java.lang.String name, java.lang.String type, boolean recursable,
1239                    long regionId, long countryId, long statusId,
1240                    java.lang.String comments, boolean site,
1241                    com.liferay.portal.service.ServiceContext serviceContext)
1242                    throws PortalException;
1243    
1244            /**
1245            * Updates the organization.
1246            *
1247            * @param companyId the primary key of the organization's company
1248            * @param organizationId the primary key of the organization
1249            * @param parentOrganizationId the primary key of organization's parent
1250            organization
1251            * @param name the organization's name
1252            * @param type the organization's type
1253            * @param regionId the primary key of the organization's region
1254            * @param countryId the primary key of the organization's country
1255            * @param statusId the organization's workflow status
1256            * @param comments the comments about the organization
1257            * @param logo whether to update the ogranization's logo
1258            * @param logoBytes the new logo image data
1259            * @param site whether the organization is to be associated with a main
1260            site
1261            * @param serviceContext the service context to be applied (optionally
1262            <code>null</code>). Can set asset category IDs and asset tag
1263            names for the organization, and merge expando bridge attributes
1264            for the organization.
1265            * @return the organization
1266            * @throws PortalException if an organization or parent organization with
1267            the primary key could not be found or if the new information was
1268            invalid
1269            */
1270            public com.liferay.portal.model.Organization updateOrganization(
1271                    long companyId, long organizationId, long parentOrganizationId,
1272                    java.lang.String name, java.lang.String type, long regionId,
1273                    long countryId, long statusId, java.lang.String comments, boolean logo,
1274                    byte[] logoBytes, boolean site,
1275                    com.liferay.portal.service.ServiceContext serviceContext)
1276                    throws PortalException;
1277    
1278            /**
1279            * Updates the organization.
1280            *
1281            * @param companyId the primary key of the organization's company
1282            * @param organizationId the primary key of the organization
1283            * @param parentOrganizationId the primary key of organization's parent
1284            organization
1285            * @param name the organization's name
1286            * @param type the organization's type
1287            * @param regionId the primary key of the organization's region
1288            * @param countryId the primary key of the organization's country
1289            * @param statusId the organization's workflow status
1290            * @param comments the comments about the organization
1291            * @param site whether the organization is to be associated with a main
1292            site
1293            * @param serviceContext the service context to be applied (optionally
1294            <code>null</code>). Can set asset category IDs and asset tag
1295            names for the organization, and merge expando bridge
1296            attributes for the organization.
1297            * @return the organization
1298            * @throws PortalException if an organization or parent organization
1299            with the primary key could not be found or if the new
1300            information was invalid
1301            * @deprecated As of 7.0.0, replaced by {@link #updateOrganization(long,
1302            long, long, String, String, long, long, int, String, boolean,
1303            byte[], boolean, ServiceContext)}
1304            */
1305            @java.lang.Deprecated
1306            public com.liferay.portal.model.Organization updateOrganization(
1307                    long companyId, long organizationId, long parentOrganizationId,
1308                    java.lang.String name, java.lang.String type, long regionId,
1309                    long countryId, long statusId, java.lang.String comments, boolean site,
1310                    com.liferay.portal.service.ServiceContext serviceContext)
1311                    throws PortalException;
1312    
1313            /**
1314            * Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
1315            *
1316            * @param organization the organization
1317            * @return the organization that was updated
1318            */
1319            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
1320            public com.liferay.portal.model.Organization updateOrganization(
1321                    com.liferay.portal.model.Organization organization);
1322    }