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