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