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