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