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