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