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, long 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, long 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.portlet.exportimport.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 QueryUtil#ALL_POS} will return the full 641 * result set. 642 * </p> 643 * 644 * @param companyId the primary key of the organization's company 645 * @param parentOrganizationId the primary key of the organization's parent 646 organization 647 * @param start the lower bound of the range of organizations to return 648 * @param end the upper bound of the range of organizations to return (not 649 inclusive) 650 * @return the range of organizations belonging to the parent organization 651 * @see com.liferay.portal.service.persistence.OrganizationPersistence#findByC_P( 652 long, long, int, int) 653 */ 654 @Override 655 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 656 long companyId, long parentOrganizationId, int start, int end) { 657 return _organizationLocalService.getOrganizations(companyId, 658 parentOrganizationId, start, end); 659 } 660 661 /** 662 * Returns the organizations with the primary keys. 663 * 664 * @param organizationIds the primary keys of the organizations 665 * @return the organizations with the primary keys 666 * @throws PortalException if any one of the organizations could not be 667 found 668 */ 669 @Override 670 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 671 long[] organizationIds) 672 throws com.liferay.portal.kernel.exception.PortalException { 673 return _organizationLocalService.getOrganizations(organizationIds); 674 } 675 676 /** 677 * Returns a range of all the organizations. 678 * 679 * <p> 680 * 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. 681 * </p> 682 * 683 * @param start the lower bound of the range of organizations 684 * @param end the upper bound of the range of organizations (not inclusive) 685 * @return the range of organizations 686 */ 687 @Override 688 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 689 int start, int end) { 690 return _organizationLocalService.getOrganizations(start, end); 691 } 692 693 @Override 694 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 695 long userId, int start, int end, 696 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc) 697 throws com.liferay.portal.kernel.exception.PortalException { 698 return _organizationLocalService.getOrganizations(userId, start, end, 699 obc); 700 } 701 702 /** 703 * Returns the number of organizations. 704 * 705 * @return the number of organizations 706 */ 707 @Override 708 public int getOrganizationsCount() { 709 return _organizationLocalService.getOrganizationsCount(); 710 } 711 712 /** 713 * Returns the number of organizations belonging to the parent organization. 714 * 715 * @param companyId the primary key of the organization's company 716 * @param parentOrganizationId the primary key of the organization's parent 717 organization 718 * @return the number of organizations belonging to the parent organization 719 */ 720 @Override 721 public int getOrganizationsCount(long companyId, long parentOrganizationId) { 722 return _organizationLocalService.getOrganizationsCount(companyId, 723 parentOrganizationId); 724 } 725 726 /** 727 * Returns the parent organizations in order by closest ancestor. The list 728 * starts with the organization itself. 729 * 730 * @param organizationId the primary key of the organization 731 * @return the parent organizations in order by closest ancestor 732 * @throws PortalException if an organization with the primary key could not 733 be found 734 */ 735 @Override 736 public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations( 737 long organizationId) 738 throws com.liferay.portal.kernel.exception.PortalException { 739 return _organizationLocalService.getParentOrganizations(organizationId); 740 } 741 742 @Override 743 public com.liferay.portal.model.PersistedModel getPersistedModel( 744 java.io.Serializable primaryKeyObj) 745 throws com.liferay.portal.kernel.exception.PortalException { 746 return _organizationLocalService.getPersistedModel(primaryKeyObj); 747 } 748 749 /** 750 * Returns the suborganizations of the organization. 751 * 752 * @param companyId the primary key of the organization's company 753 * @param organizationId the primary key of the organization 754 * @return the suborganizations of the organization 755 */ 756 @Override 757 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 758 long companyId, long organizationId) { 759 return _organizationLocalService.getSuborganizations(companyId, 760 organizationId); 761 } 762 763 /** 764 * Returns the suborganizations of the organizations. 765 * 766 * @param organizations the organizations from which to get 767 suborganizations 768 * @return the suborganizations of the organizations 769 */ 770 @Override 771 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 772 java.util.List<com.liferay.portal.model.Organization> organizations) { 773 return _organizationLocalService.getSuborganizations(organizations); 774 } 775 776 /** 777 * Returns the count of suborganizations of the organization. 778 * 779 * @param companyId the primary key of the organization's company 780 * @param organizationId the primary key of the organization 781 * @return the count of suborganizations of the organization 782 */ 783 @Override 784 public int getSuborganizationsCount(long companyId, long organizationId) { 785 return _organizationLocalService.getSuborganizationsCount(companyId, 786 organizationId); 787 } 788 789 /** 790 * Returns the intersection of <code>allOrganizations</code> and 791 * <code>availableOrganizations</code>. 792 * 793 * @param allOrganizations the organizations to check for availability 794 * @param availableOrganizations the available organizations 795 * @return the intersection of <code>allOrganizations</code> and 796 <code>availableOrganizations</code> 797 */ 798 @Override 799 public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations( 800 java.util.List<com.liferay.portal.model.Organization> allOrganizations, 801 java.util.List<com.liferay.portal.model.Organization> availableOrganizations) { 802 return _organizationLocalService.getSubsetOrganizations(allOrganizations, 803 availableOrganizations); 804 } 805 806 /** 807 * Returns all the IDs of organizations with which the user is explicitly 808 * associated, optionally including the IDs of organizations that the user 809 * administers or owns. 810 * 811 * <p> 812 * A user is considered to be <i>explicitly</i> associated with an 813 * organization if his account is individually created within the 814 * organization or if the user is later added to it. 815 * </p> 816 * 817 * @param userId the primary key of the user 818 * @param includeAdministrative whether to include the IDs of organizations 819 that the user administers or owns, even if he's not a member of 820 the organizations 821 * @return the IDs of organizations with which the user is explicitly 822 associated, optionally including the IDs of organizations that 823 the user administers or owns 824 * @throws PortalException if a user with the primary key could not be found 825 or if a portal exception occurred 826 */ 827 @Override 828 public long[] getUserOrganizationIds(long userId, 829 boolean includeAdministrative) 830 throws com.liferay.portal.kernel.exception.PortalException { 831 return _organizationLocalService.getUserOrganizationIds(userId, 832 includeAdministrative); 833 } 834 835 @Override 836 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 837 long userId) { 838 return _organizationLocalService.getUserOrganizations(userId); 839 } 840 841 /** 842 * Returns all the organizations with which the user is explicitly 843 * associated, optionally including the organizations that the user 844 * administers or owns. 845 * 846 * <p> 847 * A user is considered to be <i>explicitly</i> associated with an 848 * organization if his account is individually created within the 849 * organization or if the user is later added as a member. 850 * </p> 851 * 852 * @param userId the primary key of the user 853 * @param includeAdministrative whether to include the IDs of organizations 854 that the user administers or owns, even if he's not a member of 855 the organizations 856 * @return the organizations with which the user is explicitly associated, 857 optionally including the organizations that the user administers 858 or owns 859 * @throws PortalException if a user with the primary key could not be found 860 */ 861 @Override 862 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 863 long userId, boolean includeAdministrative) 864 throws com.liferay.portal.kernel.exception.PortalException { 865 return _organizationLocalService.getUserOrganizations(userId, 866 includeAdministrative); 867 } 868 869 @Override 870 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 871 long userId, int start, int end) { 872 return _organizationLocalService.getUserOrganizations(userId, start, end); 873 } 874 875 @Override 876 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 877 long userId, int start, int end, 878 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> orderByComparator) { 879 return _organizationLocalService.getUserOrganizations(userId, start, 880 end, orderByComparator); 881 } 882 883 @Override 884 public int getUserOrganizationsCount(long userId) { 885 return _organizationLocalService.getUserOrganizationsCount(userId); 886 } 887 888 /** 889 * Returns the userIds of the users associated with the organization. 890 * 891 * @param organizationId the organizationId of the organization 892 * @return long[] the userIds of users associated with the organization 893 */ 894 @Override 895 public long[] getUserPrimaryKeys(long organizationId) { 896 return _organizationLocalService.getUserPrimaryKeys(organizationId); 897 } 898 899 @Override 900 public boolean hasGroupOrganization(long groupId, long organizationId) { 901 return _organizationLocalService.hasGroupOrganization(groupId, 902 organizationId); 903 } 904 905 @Override 906 public boolean hasGroupOrganizations(long groupId) { 907 return _organizationLocalService.hasGroupOrganizations(groupId); 908 } 909 910 /** 911 * Returns <code>true</code> if the password policy has been assigned to the 912 * organization. 913 * 914 * @param passwordPolicyId the primary key of the password policy 915 * @param organizationId the primary key of the organization 916 * @return <code>true</code> if the password policy has been assigned to the 917 organization; <code>false</code> otherwise 918 */ 919 @Override 920 public boolean hasPasswordPolicyOrganization(long passwordPolicyId, 921 long organizationId) { 922 return _organizationLocalService.hasPasswordPolicyOrganization(passwordPolicyId, 923 organizationId); 924 } 925 926 @Override 927 public boolean hasUserOrganization(long userId, long organizationId) { 928 return _organizationLocalService.hasUserOrganization(userId, 929 organizationId); 930 } 931 932 /** 933 * Returns <code>true</code> if the user is a member of the organization, 934 * optionally focusing on suborganizations or the specified organization. 935 * This method is usually called to determine if the user has view access to 936 * a resource belonging to the organization. 937 * 938 * <ol> 939 * <li> 940 * If <code>inheritSuborganizations=<code>false</code></code>: 941 * the method checks whether the user belongs to the organization specified 942 * by <code>organizationId</code>. The parameter 943 * <code>includeSpecifiedOrganization</code> is ignored. 944 * </li> 945 * <li> 946 * The parameter <code>includeSpecifiedOrganization</code> is 947 * ignored unless <code>inheritSuborganizations</code> is also 948 * <code>true</code>. 949 * </li> 950 * <li> 951 * If <code>inheritSuborganizations=<code>true</code></code> and 952 * <code>includeSpecifiedOrganization=<code>false</code></code>: the method 953 * checks 954 * whether the user belongs to one of the child organizations of the one 955 * specified by <code>organizationId</code>. 956 * </li> 957 * <li> 958 * If <code>inheritSuborganizations=<code>true</code></code> and 959 * <code>includeSpecifiedOrganization=<code>true</code></code>: the method 960 * checks whether 961 * the user belongs to the organization specified by 962 * <code>organizationId</code> or any of 963 * its child organizations. 964 * </li> 965 * </ol> 966 * 967 * @param userId the primary key of the organization's user 968 * @param organizationId the primary key of the organization 969 * @param inheritSuborganizations if <code>true</code> suborganizations are 970 considered in the determination 971 * @param includeSpecifiedOrganization if <code>true</code> the 972 organization specified by <code>organizationId</code> is 973 considered in the determination 974 * @return <code>true</code> if the user has access to the organization; 975 <code>false</code> otherwise 976 * @throws PortalException if an organization with the primary key could not 977 be found 978 * @see com.liferay.portal.service.persistence.OrganizationFinder 979 */ 980 @Override 981 public boolean hasUserOrganization(long userId, long organizationId, 982 boolean inheritSuborganizations, boolean includeSpecifiedOrganization) 983 throws com.liferay.portal.kernel.exception.PortalException { 984 return _organizationLocalService.hasUserOrganization(userId, 985 organizationId, inheritSuborganizations, 986 includeSpecifiedOrganization); 987 } 988 989 @Override 990 public boolean hasUserOrganizations(long userId) { 991 return _organizationLocalService.hasUserOrganizations(userId); 992 } 993 994 /** 995 * Rebuilds the organization's tree. 996 * 997 * <p> 998 * Only call this method if the tree has become stale through operations 999 * other than normal CRUD. Under normal circumstances the tree is 1000 * automatically rebuilt whenever necessary. 1001 * </p> 1002 * 1003 * @param companyId the primary key of the organization's company 1004 * @throws PortalException if an organization with the primary key could not 1005 be found 1006 */ 1007 @Override 1008 public void rebuildTree(long companyId) 1009 throws com.liferay.portal.kernel.exception.PortalException { 1010 _organizationLocalService.rebuildTree(companyId); 1011 } 1012 1013 /** 1014 * Returns an ordered range of all the organizations that match the 1015 * keywords, using the indexer. It is preferable to use this method instead 1016 * of the non-indexed version whenever possible for performance reasons. 1017 * 1018 * <p> 1019 * Useful when paginating results. Returns a maximum of <code>end - 1020 * start</code> instances. <code>start</code> and <code>end</code> are not 1021 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1022 * refers to the first result in the set. Setting both <code>start</code> 1023 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1024 * result set. 1025 * </p> 1026 * 1027 * @param companyId the primary key of the organization's company 1028 * @param parentOrganizationId the primary key of the organization's parent 1029 organization 1030 * @param keywords the keywords (space separated), which may occur in the 1031 organization's name, street, city, zipcode, type, region or 1032 country (optionally <code>null</code>) 1033 * @param params the finder parameters (optionally <code>null</code>). For 1034 more information see {@link 1035 com.liferay.portlet.usersadmin.util.OrganizationIndexer} 1036 * @param start the lower bound of the range of organizations to return 1037 * @param end the upper bound of the range of organizations to return (not 1038 inclusive) 1039 * @param sort the field and direction by which to sort (optionally 1040 <code>null</code>) 1041 * @return the matching organizations ordered by name 1042 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 1043 */ 1044 @Override 1045 public com.liferay.portal.kernel.search.Hits search(long companyId, 1046 long parentOrganizationId, java.lang.String keywords, 1047 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1048 int start, int end, com.liferay.portal.kernel.search.Sort sort) { 1049 return _organizationLocalService.search(companyId, 1050 parentOrganizationId, keywords, params, start, end, sort); 1051 } 1052 1053 /** 1054 * Returns a name ordered range of all the organizations that match the 1055 * keywords, type, region, and country, without using the indexer. It is 1056 * preferable to use the indexed version {@link #search(long, long, String, 1057 * LinkedHashMap, int, int, Sort)} instead of this method wherever possible 1058 * for performance reasons. 1059 * 1060 * <p> 1061 * Useful when paginating results. Returns a maximum of <code>end - 1062 * start</code> instances. <code>start</code> and <code>end</code> are not 1063 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1064 * refers to the first result in the set. Setting both <code>start</code> 1065 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1066 * result set. 1067 * </p> 1068 * 1069 * @param companyId the primary key of the organization's company 1070 * @param parentOrganizationId the primary key of the organization's parent 1071 organization 1072 * @param keywords the keywords (space separated), which may occur in the 1073 organization's name, street, city, or zipcode (optionally 1074 <code>null</code>) 1075 * @param type the organization's type (optionally <code>null</code>) 1076 * @param regionId the primary key of the organization's region (optionally 1077 <code>null</code>) 1078 * @param countryId the primary key of the organization's country 1079 (optionally <code>null</code>) 1080 * @param params the finder params. For more information see {@link 1081 com.liferay.portal.service.persistence.OrganizationFinder} 1082 * @param start the lower bound of the range of organizations to return 1083 * @param end the upper bound of the range of organizations to return (not 1084 inclusive) 1085 * @return the matching organizations ordered by name 1086 * @see com.liferay.portal.service.persistence.OrganizationFinder 1087 */ 1088 @Override 1089 public java.util.List<com.liferay.portal.model.Organization> search( 1090 long companyId, long parentOrganizationId, java.lang.String keywords, 1091 java.lang.String type, java.lang.Long regionId, 1092 java.lang.Long countryId, 1093 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1094 int start, int end) { 1095 return _organizationLocalService.search(companyId, 1096 parentOrganizationId, keywords, type, regionId, countryId, params, 1097 start, end); 1098 } 1099 1100 /** 1101 * Returns an ordered range of all the organizations that match the 1102 * keywords, type, region, and country, without using the indexer. It is 1103 * preferable to use the indexed version {@link #search(long, long, String, 1104 * String, String, String, String, String, String, LinkedHashMap, boolean, 1105 * int, int, Sort)} instead of this method wherever possible for performance 1106 * reasons. 1107 * 1108 * <p> 1109 * Useful when paginating results. Returns a maximum of <code>end - 1110 * start</code> instances. <code>start</code> and <code>end</code> are not 1111 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1112 * refers to the first result in the set. Setting both <code>start</code> 1113 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1114 * result set. 1115 * </p> 1116 * 1117 * @param companyId the primary key of the organization's company 1118 * @param parentOrganizationId the primary key of the organization's parent 1119 organization 1120 * @param keywords the keywords (space separated), which may occur in the 1121 organization's name, street, city, or zipcode (optionally 1122 <code>null</code>) 1123 * @param type the organization's type (optionally <code>null</code>) 1124 * @param regionId the primary key of the organization's region (optionally 1125 <code>null</code>) 1126 * @param countryId the primary key of the organization's country 1127 (optionally <code>null</code>) 1128 * @param params the finder params. For more information see {@link 1129 com.liferay.portal.service.persistence.OrganizationFinder} 1130 * @param start the lower bound of the range of organizations to return 1131 * @param end the upper bound of the range of organizations to return (not 1132 inclusive) 1133 * @param obc the comparator to order the organizations (optionally 1134 <code>null</code>) 1135 * @return the matching organizations ordered by comparator <code>obc</code> 1136 * @see com.liferay.portal.service.persistence.OrganizationFinder 1137 */ 1138 @Override 1139 public java.util.List<com.liferay.portal.model.Organization> search( 1140 long companyId, long parentOrganizationId, java.lang.String keywords, 1141 java.lang.String type, java.lang.Long regionId, 1142 java.lang.Long countryId, 1143 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1144 int start, int end, 1145 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc) { 1146 return _organizationLocalService.search(companyId, 1147 parentOrganizationId, keywords, type, regionId, countryId, params, 1148 start, end, obc); 1149 } 1150 1151 /** 1152 * Returns an ordered range of all the organizations whose name, type, or 1153 * location fields match the keywords specified for them, using the indexer. 1154 * It is preferable to use this method instead of the non-indexed version 1155 * whenever possible for performance reasons. 1156 * 1157 * <p> 1158 * Useful when paginating results. Returns a maximum of <code>end - 1159 * start</code> instances. <code>start</code> and <code>end</code> are not 1160 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1161 * refers to the first result in the set. Setting both <code>start</code> 1162 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1163 * result set. 1164 * </p> 1165 * 1166 * @param companyId the primary key of the organization's company 1167 * @param parentOrganizationId the primary key of the organization's parent 1168 organization 1169 * @param name the name keywords (space separated, optionally 1170 <code>null</code>) 1171 * @param type the type keywords (optionally <code>null</code>) 1172 * @param street the street keywords (optionally <code>null</code>) 1173 * @param city the city keywords (optionally <code>null</code>) 1174 * @param zip the zipcode keywords (optionally <code>null</code>) 1175 * @param region the region keywords (optionally <code>null</code>) 1176 * @param country the country keywords (optionally <code>null</code>) 1177 * @param params the finder parameters (optionally <code>null</code>). For 1178 more information see {@link 1179 com.liferay.portlet.usersadmin.util.OrganizationIndexer}. 1180 * @param andSearch whether every field must match its keywords or just one 1181 field 1182 * @param start the lower bound of the range of organizations to return 1183 * @param end the upper bound of the range of organizations to return (not 1184 inclusive) 1185 * @param sort the field and direction by which to sort (optionally 1186 <code>null</code>) 1187 * @return the matching organizations ordered by <code>sort</code> 1188 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 1189 */ 1190 @Override 1191 public com.liferay.portal.kernel.search.Hits search(long companyId, 1192 long parentOrganizationId, java.lang.String name, 1193 java.lang.String type, java.lang.String street, java.lang.String city, 1194 java.lang.String zip, java.lang.String region, 1195 java.lang.String country, 1196 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1197 boolean andSearch, int start, int end, 1198 com.liferay.portal.kernel.search.Sort sort) { 1199 return _organizationLocalService.search(companyId, 1200 parentOrganizationId, name, type, street, city, zip, region, 1201 country, params, andSearch, start, end, sort); 1202 } 1203 1204 /** 1205 * Returns a name ordered range of all the organizations with the type, 1206 * region, and country, and whose name, street, city, and zipcode match the 1207 * keywords specified for them, without using the indexer. It is preferable 1208 * to use the indexed version {@link #search(long, long, String, String, 1209 * String, String, String, String, String, LinkedHashMap, boolean, int, int, 1210 * Sort)} instead of this method wherever possible for performance reasons. 1211 * 1212 * <p> 1213 * Useful when paginating results. Returns a maximum of <code>end - 1214 * start</code> instances. <code>start</code> and <code>end</code> are not 1215 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1216 * refers to the first result in the set. Setting both <code>start</code> 1217 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1218 * result set. 1219 * </p> 1220 * 1221 * @param companyId the primary key of the organization's company 1222 * @param parentOrganizationId the primary key of the organization's parent 1223 * @param name the name keywords (space separated, optionally 1224 <code>null</code>) 1225 * @param type the organization's type (optionally <code>null</code>) 1226 * @param street the street keywords (optionally <code>null</code>) 1227 * @param city the city keywords (optionally <code>null</code>) 1228 * @param zip the zipcode keywords (optionally <code>null</code>) 1229 * @param regionId the primary key of the organization's region (optionally 1230 <code>null</code>) 1231 * @param countryId the primary key of the organization's country 1232 (optionally <code>null</code>) 1233 * @param params the finder parameters (optionally <code>null</code>). For 1234 more information see {@link 1235 com.liferay.portal.service.persistence.OrganizationFinder} 1236 * @param andOperator whether every field must match its keywords, or just 1237 one field. For example, "organizations with the name 1238 'Employees' and city 'Chicago'" vs "organizations with 1239 the name 'Employees' or the city 'Chicago'". 1240 * @param start the lower bound of the range of organizations to return 1241 * @param end the upper bound of the range of organizations to return (not 1242 inclusive) 1243 * @return the matching organizations ordered by name 1244 * @see com.liferay.portal.service.persistence.OrganizationFinder 1245 */ 1246 @Override 1247 public java.util.List<com.liferay.portal.model.Organization> search( 1248 long companyId, long parentOrganizationId, java.lang.String name, 1249 java.lang.String type, java.lang.String street, java.lang.String city, 1250 java.lang.String zip, java.lang.Long regionId, 1251 java.lang.Long countryId, 1252 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1253 boolean andOperator, int start, int end) { 1254 return _organizationLocalService.search(companyId, 1255 parentOrganizationId, name, type, street, city, zip, regionId, 1256 countryId, params, andOperator, start, end); 1257 } 1258 1259 /** 1260 * Returns an ordered range of all the organizations with the type, region, 1261 * and country, and whose name, street, city, and zipcode match the keywords 1262 * specified for them, without using the indexer. It is preferable to use 1263 * the indexed version {@link #search(long, long, String, String, String, 1264 * String, String, String, String, LinkedHashMap, boolean, int, int, Sort)} 1265 * instead of this method wherever possible for performance reasons. 1266 * 1267 * <p> 1268 * Useful when paginating results. Returns a maximum of <code>end - 1269 * start</code> instances. <code>start</code> and <code>end</code> are not 1270 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1271 * refers to the first result in the set. Setting both <code>start</code> 1272 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1273 * result set. 1274 * </p> 1275 * 1276 * @param companyId the primary key of the organization's company 1277 * @param parentOrganizationId the primary key of the organization's parent 1278 organization 1279 * @param name the name keywords (space separated, optionally 1280 <code>null</code>) 1281 * @param type the organization's type (optionally <code>null</code>) 1282 * @param street the street keywords (optionally <code>null</code>) 1283 * @param city the city keywords (optionally <code>null</code>) 1284 * @param zip the zipcode keywords (optionally <code>null</code>) 1285 * @param regionId the primary key of the organization's region (optionally 1286 <code>null</code>) 1287 * @param countryId the primary key of the organization's country 1288 (optionally <code>null</code>) 1289 * @param params the finder parameters (optionally <code>null</code>). For 1290 more information see {@link 1291 com.liferay.portal.service.persistence.OrganizationFinder} 1292 * @param andOperator whether every field must match its keywords, or just 1293 one field. For example, "organizations with the name 1294 'Employees' and city 'Chicago'" vs "organizations with 1295 the name 'Employees' or the city 'Chicago'". 1296 * @param start the lower bound of the range of organizations to return 1297 * @param end the upper bound of the range of organizations to return (not 1298 inclusive) 1299 * @param obc the comparator to order the organizations (optionally 1300 <code>null</code>) 1301 * @return the matching organizations ordered by comparator <code>obc</code> 1302 * @see com.liferay.portal.service.persistence.OrganizationFinder 1303 */ 1304 @Override 1305 public java.util.List<com.liferay.portal.model.Organization> search( 1306 long companyId, long parentOrganizationId, java.lang.String name, 1307 java.lang.String type, java.lang.String street, java.lang.String city, 1308 java.lang.String zip, java.lang.Long regionId, 1309 java.lang.Long countryId, 1310 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1311 boolean andOperator, int start, int end, 1312 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc) { 1313 return _organizationLocalService.search(companyId, 1314 parentOrganizationId, name, type, street, city, zip, regionId, 1315 countryId, params, andOperator, start, end, obc); 1316 } 1317 1318 /** 1319 * Returns the number of organizations that match the keywords, type, 1320 * region, and country. 1321 * 1322 * @param companyId the primary key of the organization's company 1323 * @param parentOrganizationId the primary key of the organization's parent 1324 organization 1325 * @param keywords the keywords (space separated), which may occur in the 1326 organization's name, street, city, or zipcode (optionally 1327 <code>null</code>) 1328 * @param type the organization's type (optionally <code>null</code>) 1329 * @param regionId the primary key of the organization's region (optionally 1330 <code>null</code>) 1331 * @param countryId the primary key of the organization's country 1332 (optionally <code>null</code>) 1333 * @param params the finder parameters (optionally <code>null</code>). For 1334 more information see {@link 1335 com.liferay.portal.service.persistence.OrganizationFinder} 1336 * @return the number of matching organizations 1337 * @see com.liferay.portal.service.persistence.OrganizationFinder 1338 */ 1339 @Override 1340 public int searchCount(long companyId, long parentOrganizationId, 1341 java.lang.String keywords, java.lang.String type, 1342 java.lang.Long regionId, java.lang.Long countryId, 1343 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) { 1344 return _organizationLocalService.searchCount(companyId, 1345 parentOrganizationId, keywords, type, regionId, countryId, params); 1346 } 1347 1348 /** 1349 * Returns the number of organizations with the type, region, and country, 1350 * and whose name, street, city, and zipcode match the keywords specified 1351 * for them. 1352 * 1353 * @param companyId the primary key of the organization's company 1354 * @param parentOrganizationId the primary key of the organization's parent 1355 organization 1356 * @param name the name keywords (space separated, optionally 1357 <code>null</code>) 1358 * @param type the organization's type (optionally <code>null</code>) 1359 * @param street the street keywords (optionally <code>null</code>) 1360 * @param city the city keywords (optionally <code>null</code>) 1361 * @param zip the zipcode keywords (optionally <code>null</code>) 1362 * @param regionId the primary key of the organization's region (optionally 1363 <code>null</code>) 1364 * @param countryId the primary key of the organization's country 1365 (optionally <code>null</code>) 1366 * @param params the finder parameters (optionally <code>null</code>). For 1367 more information see {@link 1368 com.liferay.portal.service.persistence.OrganizationFinder} 1369 * @param andOperator whether every field must match its keywords, or just 1370 one field. For example, "organizations with the name 1371 'Employees' and city 'Chicago'" vs "organizations with 1372 the name 'Employees' or the city 'Chicago'". 1373 * @return the number of matching organizations 1374 * @see com.liferay.portal.service.persistence.OrganizationFinder 1375 */ 1376 @Override 1377 public int searchCount(long companyId, long parentOrganizationId, 1378 java.lang.String name, java.lang.String type, java.lang.String street, 1379 java.lang.String city, java.lang.String zip, java.lang.Long regionId, 1380 java.lang.Long countryId, 1381 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1382 boolean andOperator) { 1383 return _organizationLocalService.searchCount(companyId, 1384 parentOrganizationId, name, type, street, city, zip, regionId, 1385 countryId, params, andOperator); 1386 } 1387 1388 @Override 1389 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations( 1390 long companyId, long parentOrganizationId, java.lang.String keywords, 1391 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1392 int start, int end, com.liferay.portal.kernel.search.Sort sort) 1393 throws com.liferay.portal.kernel.exception.PortalException { 1394 return _organizationLocalService.searchOrganizations(companyId, 1395 parentOrganizationId, keywords, params, start, end, sort); 1396 } 1397 1398 @Override 1399 public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.Organization> searchOrganizations( 1400 long companyId, long parentOrganizationId, java.lang.String name, 1401 java.lang.String type, java.lang.String street, java.lang.String city, 1402 java.lang.String zip, java.lang.String region, 1403 java.lang.String country, 1404 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1405 boolean andSearch, int start, int end, 1406 com.liferay.portal.kernel.search.Sort sort) 1407 throws com.liferay.portal.kernel.exception.PortalException { 1408 return _organizationLocalService.searchOrganizations(companyId, 1409 parentOrganizationId, name, type, street, city, zip, region, 1410 country, params, andSearch, start, end, sort); 1411 } 1412 1413 /** 1414 * Sets the Spring bean ID for this bean. 1415 * 1416 * @param beanIdentifier the Spring bean ID for this bean 1417 */ 1418 @Override 1419 public void setBeanIdentifier(java.lang.String beanIdentifier) { 1420 _organizationLocalService.setBeanIdentifier(beanIdentifier); 1421 } 1422 1423 /** 1424 * @throws PortalException 1425 */ 1426 @Override 1427 public void setGroupOrganizations(long groupId, long[] organizationIds) 1428 throws com.liferay.portal.kernel.exception.PortalException { 1429 _organizationLocalService.setGroupOrganizations(groupId, organizationIds); 1430 } 1431 1432 @Override 1433 public void setUserOrganizations(long userId, long[] organizationIds) { 1434 _organizationLocalService.setUserOrganizations(userId, organizationIds); 1435 } 1436 1437 /** 1438 * Removes the organizations from the group. 1439 * 1440 * @param groupId the primary key of the group 1441 * @param organizationIds the primary keys of the organizations 1442 * @throws PortalException if a portal exception occurred 1443 */ 1444 @Override 1445 public void unsetGroupOrganizations(long groupId, long[] organizationIds) 1446 throws com.liferay.portal.kernel.exception.PortalException { 1447 _organizationLocalService.unsetGroupOrganizations(groupId, 1448 organizationIds); 1449 } 1450 1451 /** 1452 * Removes the organizations from the password policy. 1453 * 1454 * @param passwordPolicyId the primary key of the password policy 1455 * @param organizationIds the primary keys of the organizations 1456 */ 1457 @Override 1458 public void unsetPasswordPolicyOrganizations(long passwordPolicyId, 1459 long[] organizationIds) { 1460 _organizationLocalService.unsetPasswordPolicyOrganizations(passwordPolicyId, 1461 organizationIds); 1462 } 1463 1464 /** 1465 * Updates the organization's asset with the new asset categories and tag 1466 * names, removing and adding asset categories and tag names as necessary. 1467 * 1468 * @param userId the primary key of the user 1469 * @param organization the organization 1470 * @param assetCategoryIds the primary keys of the asset categories 1471 * @param assetTagNames the asset tag names 1472 * @throws PortalException if a user with the primary key could not be found 1473 */ 1474 @Override 1475 public void updateAsset(long userId, 1476 com.liferay.portal.model.Organization organization, 1477 long[] assetCategoryIds, java.lang.String[] assetTagNames) 1478 throws com.liferay.portal.kernel.exception.PortalException { 1479 _organizationLocalService.updateAsset(userId, organization, 1480 assetCategoryIds, assetTagNames); 1481 } 1482 1483 /** 1484 * Updates the organization. 1485 * 1486 * @param companyId the primary key of the organization's company 1487 * @param organizationId the primary key of the organization 1488 * @param parentOrganizationId the primary key of organization's parent 1489 organization 1490 * @param name the organization's name 1491 * @param type the organization's type 1492 * @param recursable whether permissions of the organization are to be 1493 inherited by its suborganizations 1494 * @param regionId the primary key of the organization's region 1495 * @param countryId the primary key of the organization's country 1496 * @param statusId the organization's workflow status 1497 * @param comments the comments about the organization 1498 * @param site whether the organization is to be associated with a main 1499 site 1500 * @param serviceContext the service context to be applied (optionally 1501 <code>null</code>). Can set asset category IDs and asset tag 1502 names for the organization, and merge expando bridge 1503 attributes for the organization. 1504 * @return the organization 1505 * @throws PortalException if an organization or parent organization 1506 with the primary key could not be found or if the new 1507 information was invalid 1508 * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long, 1509 long, long, String, String, long, long, int, String, boolean, 1510 byte[], boolean, ServiceContext)} 1511 */ 1512 @Deprecated 1513 @Override 1514 public com.liferay.portal.model.Organization updateOrganization( 1515 long companyId, long organizationId, long parentOrganizationId, 1516 java.lang.String name, java.lang.String type, boolean recursable, 1517 long regionId, long countryId, long statusId, 1518 java.lang.String comments, boolean site, 1519 com.liferay.portal.service.ServiceContext serviceContext) 1520 throws com.liferay.portal.kernel.exception.PortalException { 1521 return _organizationLocalService.updateOrganization(companyId, 1522 organizationId, parentOrganizationId, name, type, recursable, 1523 regionId, countryId, statusId, comments, site, serviceContext); 1524 } 1525 1526 /** 1527 * Updates the organization. 1528 * 1529 * @param companyId the primary key of the organization's company 1530 * @param organizationId the primary key of the organization 1531 * @param parentOrganizationId the primary key of organization's parent 1532 organization 1533 * @param name the organization's name 1534 * @param type the organization's type 1535 * @param regionId the primary key of the organization's region 1536 * @param countryId the primary key of the organization's country 1537 * @param statusId the organization's workflow status 1538 * @param comments the comments about the organization 1539 * @param logo whether to update the ogranization's logo 1540 * @param logoBytes the new logo image data 1541 * @param site whether the organization is to be associated with a main 1542 site 1543 * @param serviceContext the service context to be applied (optionally 1544 <code>null</code>). Can set asset category IDs and asset tag 1545 names for the organization, and merge expando bridge attributes 1546 for the organization. 1547 * @return the organization 1548 * @throws PortalException if an organization or parent organization with 1549 the primary key could not be found or if the new information was 1550 invalid 1551 */ 1552 @Override 1553 public com.liferay.portal.model.Organization updateOrganization( 1554 long companyId, long organizationId, long parentOrganizationId, 1555 java.lang.String name, java.lang.String type, long regionId, 1556 long countryId, long statusId, java.lang.String comments, boolean logo, 1557 byte[] logoBytes, boolean site, 1558 com.liferay.portal.service.ServiceContext serviceContext) 1559 throws com.liferay.portal.kernel.exception.PortalException { 1560 return _organizationLocalService.updateOrganization(companyId, 1561 organizationId, parentOrganizationId, name, type, regionId, 1562 countryId, statusId, comments, logo, logoBytes, site, serviceContext); 1563 } 1564 1565 /** 1566 * Updates the organization. 1567 * 1568 * @param companyId the primary key of the organization's company 1569 * @param organizationId the primary key of the organization 1570 * @param parentOrganizationId the primary key of organization's parent 1571 organization 1572 * @param name the organization's name 1573 * @param type the organization's type 1574 * @param regionId the primary key of the organization's region 1575 * @param countryId the primary key of the organization's country 1576 * @param statusId the organization's workflow status 1577 * @param comments the comments about the organization 1578 * @param site whether the organization is to be associated with a main 1579 site 1580 * @param serviceContext the service context to be applied (optionally 1581 <code>null</code>). Can set asset category IDs and asset tag 1582 names for the organization, and merge expando bridge 1583 attributes for the organization. 1584 * @return the organization 1585 * @throws PortalException if an organization or parent organization 1586 with the primary key could not be found or if the new 1587 information was invalid 1588 * @deprecated As of 7.0.0, replaced by {@link #updateOrganization(long, 1589 long, long, String, String, long, long, int, String, boolean, 1590 byte[], boolean, ServiceContext)} 1591 */ 1592 @Deprecated 1593 @Override 1594 public com.liferay.portal.model.Organization updateOrganization( 1595 long companyId, long organizationId, long parentOrganizationId, 1596 java.lang.String name, java.lang.String type, long regionId, 1597 long countryId, long statusId, java.lang.String comments, boolean site, 1598 com.liferay.portal.service.ServiceContext serviceContext) 1599 throws com.liferay.portal.kernel.exception.PortalException { 1600 return _organizationLocalService.updateOrganization(companyId, 1601 organizationId, parentOrganizationId, name, type, regionId, 1602 countryId, statusId, comments, site, serviceContext); 1603 } 1604 1605 /** 1606 * Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 1607 * 1608 * @param organization the organization 1609 * @return the organization that was updated 1610 */ 1611 @Override 1612 public com.liferay.portal.model.Organization updateOrganization( 1613 com.liferay.portal.model.Organization organization) { 1614 return _organizationLocalService.updateOrganization(organization); 1615 } 1616 1617 /** 1618 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 1619 */ 1620 @Deprecated 1621 public OrganizationLocalService getWrappedOrganizationLocalService() { 1622 return _organizationLocalService; 1623 } 1624 1625 /** 1626 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 1627 */ 1628 @Deprecated 1629 public void setWrappedOrganizationLocalService( 1630 OrganizationLocalService organizationLocalService) { 1631 _organizationLocalService = organizationLocalService; 1632 } 1633 1634 @Override 1635 public OrganizationLocalService getWrappedService() { 1636 return _organizationLocalService; 1637 } 1638 1639 @Override 1640 public void setWrappedService( 1641 OrganizationLocalService organizationLocalService) { 1642 _organizationLocalService = organizationLocalService; 1643 } 1644 1645 private OrganizationLocalService _organizationLocalService; 1646 }