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 /** 814 * Returns the organization with the name. 815 * 816 * @param companyId the primary key of the organization's company 817 * @param name the organization's name 818 * @return the organization with the name 819 * @throws PortalException if the organization with the name could not be 820 found 821 * @throws SystemException if a system exception occurred 822 */ 823 @Override 824 public com.liferay.portal.model.Organization getOrganization( 825 long companyId, java.lang.String name) 826 throws com.liferay.portal.kernel.exception.PortalException, 827 com.liferay.portal.kernel.exception.SystemException { 828 return _organizationLocalService.getOrganization(companyId, name); 829 } 830 831 /** 832 * Returns the primary key of the organization with the name. 833 * 834 * @param companyId the primary key of the organization's company 835 * @param name the organization's name 836 * @return the primary key of the organization with the name, or 837 <code>0</code> if the organization could not be found 838 * @throws SystemException if a system exception occurred 839 */ 840 @Override 841 public long getOrganizationId(long companyId, java.lang.String name) 842 throws com.liferay.portal.kernel.exception.SystemException { 843 return _organizationLocalService.getOrganizationId(companyId, name); 844 } 845 846 @Override 847 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 848 long userId, int start, int end, 849 com.liferay.portal.kernel.util.OrderByComparator obc) 850 throws com.liferay.portal.kernel.exception.PortalException, 851 com.liferay.portal.kernel.exception.SystemException { 852 return _organizationLocalService.getOrganizations(userId, start, end, 853 obc); 854 } 855 856 /** 857 * Returns all the organizations belonging to the parent organization. 858 * 859 * @param companyId the primary key of the organization's company 860 * @param parentOrganizationId the primary key of the organization's parent 861 organization 862 * @return the organizations belonging to the parent organization 863 * @throws SystemException if a system exception occurred 864 */ 865 @Override 866 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 867 long companyId, long parentOrganizationId) 868 throws com.liferay.portal.kernel.exception.SystemException { 869 return _organizationLocalService.getOrganizations(companyId, 870 parentOrganizationId); 871 } 872 873 /** 874 * Returns a range of all the organizations belonging to the parent 875 * organization. 876 * 877 * <p> 878 * Useful when paginating results. Returns a maximum of <code>end - 879 * start</code> instances. <code>start</code> and <code>end</code> are not 880 * primary keys, they are indexes in the result set. Thus, <code>0</code> 881 * refers to the first result in the set. Setting both <code>start</code> 882 * and <code>end</code> to {@link 883 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 884 * result set. 885 * </p> 886 * 887 * @param companyId the primary key of the organization's company 888 * @param parentOrganizationId the primary key of the organization's parent 889 organization 890 * @param start the lower bound of the range of organizations to return 891 * @param end the upper bound of the range of organizations to return (not 892 inclusive) 893 * @return the range of organizations belonging to the parent organization 894 * @throws SystemException if a system exception occurred 895 * @see com.liferay.portal.service.persistence.OrganizationPersistence#findByC_P( 896 long, long, int, int) 897 */ 898 @Override 899 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 900 long companyId, long parentOrganizationId, int start, int end) 901 throws com.liferay.portal.kernel.exception.SystemException { 902 return _organizationLocalService.getOrganizations(companyId, 903 parentOrganizationId, start, end); 904 } 905 906 /** 907 * Returns the organizations with the primary keys. 908 * 909 * @param organizationIds the primary keys of the organizations 910 * @return the organizations with the primary keys 911 * @throws PortalException if any one of the organizations could not be 912 found 913 * @throws SystemException if a system exception occurred 914 */ 915 @Override 916 public java.util.List<com.liferay.portal.model.Organization> getOrganizations( 917 long[] organizationIds) 918 throws com.liferay.portal.kernel.exception.PortalException, 919 com.liferay.portal.kernel.exception.SystemException { 920 return _organizationLocalService.getOrganizations(organizationIds); 921 } 922 923 /** 924 * Returns the number of organizations belonging to the parent organization. 925 * 926 * @param companyId the primary key of the organization's company 927 * @param parentOrganizationId the primary key of the organization's parent 928 organization 929 * @return the number of organizations belonging to the parent organization 930 * @throws SystemException if a system exception occurred 931 */ 932 @Override 933 public int getOrganizationsCount(long companyId, long parentOrganizationId) 934 throws com.liferay.portal.kernel.exception.SystemException { 935 return _organizationLocalService.getOrganizationsCount(companyId, 936 parentOrganizationId); 937 } 938 939 /** 940 * Returns the parent organizations in order by closest ancestor. The list 941 * starts with the organization itself. 942 * 943 * @param organizationId the primary key of the organization 944 * @return the parent organizations in order by closest ancestor 945 * @throws PortalException if an organization with the primary key could not 946 be found 947 * @throws SystemException if a system exception occurred 948 */ 949 @Override 950 public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations( 951 long organizationId) 952 throws com.liferay.portal.kernel.exception.PortalException, 953 com.liferay.portal.kernel.exception.SystemException { 954 return _organizationLocalService.getParentOrganizations(organizationId); 955 } 956 957 /** 958 * Returns the suborganizations of the organizations. 959 * 960 * @param organizations the organizations from which to get 961 suborganizations 962 * @return the suborganizations of the organizations 963 * @throws SystemException if a system exception occurred 964 */ 965 @Override 966 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 967 java.util.List<com.liferay.portal.model.Organization> organizations) 968 throws com.liferay.portal.kernel.exception.SystemException { 969 return _organizationLocalService.getSuborganizations(organizations); 970 } 971 972 /** 973 * Returns the suborganizations of the organization. 974 * 975 * @param companyId the primary key of the organization's company 976 * @param organizationId the primary key of the organization 977 * @return the suborganizations of the organization 978 * @throws SystemException if a system exception occurred 979 */ 980 @Override 981 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations( 982 long companyId, long organizationId) 983 throws com.liferay.portal.kernel.exception.SystemException { 984 return _organizationLocalService.getSuborganizations(companyId, 985 organizationId); 986 } 987 988 /** 989 * Returns the count of suborganizations of the organization. 990 * 991 * @param companyId the primary key of the organization's company 992 * @param organizationId the primary key of the organization 993 * @return the count of suborganizations of the organization 994 * @throws SystemException if a system exception occurred 995 */ 996 @Override 997 public int getSuborganizationsCount(long companyId, long organizationId) 998 throws com.liferay.portal.kernel.exception.SystemException { 999 return _organizationLocalService.getSuborganizationsCount(companyId, 1000 organizationId); 1001 } 1002 1003 /** 1004 * Returns the intersection of <code>allOrganizations</code> and 1005 * <code>availableOrganizations</code>. 1006 * 1007 * @param allOrganizations the organizations to check for availability 1008 * @param availableOrganizations the available organizations 1009 * @return the intersection of <code>allOrganizations</code> and 1010 <code>availableOrganizations</code> 1011 */ 1012 @Override 1013 public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations( 1014 java.util.List<com.liferay.portal.model.Organization> allOrganizations, 1015 java.util.List<com.liferay.portal.model.Organization> availableOrganizations) { 1016 return _organizationLocalService.getSubsetOrganizations(allOrganizations, 1017 availableOrganizations); 1018 } 1019 1020 /** 1021 * Returns all the organizations associated with the user. If 1022 * includeAdministrative is <code>true</code>, the result includes those 1023 * organizations that are not directly associated to the user but he is an 1024 * administrator or an owner of the organization. 1025 * 1026 * @param userId the primary key of the user 1027 * @param includeAdministrative whether to includes organizations that are 1028 indirectly associated to the user because he is an administrator 1029 or an owner of the organization 1030 * @return the organizations associated with the user 1031 * @throws PortalException if a user with the primary key could not be found 1032 * @throws SystemException if a system exception occurred 1033 */ 1034 @Override 1035 public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations( 1036 long userId, boolean includeAdministrative) 1037 throws com.liferay.portal.kernel.exception.PortalException, 1038 com.liferay.portal.kernel.exception.SystemException { 1039 return _organizationLocalService.getUserOrganizations(userId, 1040 includeAdministrative); 1041 } 1042 1043 /** 1044 * Returns <code>true</code> if the password policy has been assigned to the 1045 * organization. 1046 * 1047 * @param passwordPolicyId the primary key of the password policy 1048 * @param organizationId the primary key of the organization 1049 * @return <code>true</code> if the password policy has been assigned to the 1050 organization; <code>false</code> otherwise 1051 * @throws SystemException if a system exception occurred 1052 */ 1053 @Override 1054 public boolean hasPasswordPolicyOrganization(long passwordPolicyId, 1055 long organizationId) 1056 throws com.liferay.portal.kernel.exception.SystemException { 1057 return _organizationLocalService.hasPasswordPolicyOrganization(passwordPolicyId, 1058 organizationId); 1059 } 1060 1061 /** 1062 * Returns <code>true</code> if the user is a member of the organization, 1063 * optionally focusing on suborganizations or the specified organization. 1064 * This method is usually called to determine if the user has view access to 1065 * a resource belonging to the organization. 1066 * 1067 * <ol> 1068 * <li> 1069 * If <code>inheritSuborganizations=<code>false</code></code>: 1070 * the method checks whether the user belongs to the organization specified 1071 * by <code>organizationId</code>. The parameter 1072 * <code>includeSpecifiedOrganization</code> is ignored. 1073 * </li> 1074 * <li> 1075 * The parameter <code>includeSpecifiedOrganization</code> is 1076 * ignored unless <code>inheritSuborganizations</code> is also 1077 * <code>true</code>. 1078 * </li> 1079 * <li> 1080 * If <code>inheritSuborganizations=<code>true</code></code> and 1081 * <code>includeSpecifiedOrganization=<code>false</code></code>: the method 1082 * checks 1083 * whether the user belongs to one of the child organizations of the one 1084 * specified by <code>organizationId</code>. 1085 * </li> 1086 * <li> 1087 * If <code>inheritSuborganizations=<code>true</code></code> and 1088 * <code>includeSpecifiedOrganization=<code>true</code></code>: the method 1089 * checks whether 1090 * the user belongs to the organization specified by 1091 * <code>organizationId</code> or any of 1092 * its child organizations. 1093 * </li> 1094 * </ol> 1095 * 1096 * @param userId the primary key of the organization's user 1097 * @param organizationId the primary key of the organization 1098 * @param inheritSuborganizations if <code>true</code> suborganizations are 1099 considered in the determination 1100 * @param includeSpecifiedOrganization if <code>true</code> the 1101 organization specified by <code>organizationId</code> is 1102 considered in the determination 1103 * @return <code>true</code> if the user has access to the organization; 1104 <code>false</code> otherwise 1105 * @throws PortalException if an organization with the primary key could not 1106 be found 1107 * @throws SystemException if a system exception occurred 1108 * @see com.liferay.portal.service.persistence.OrganizationFinder 1109 */ 1110 @Override 1111 public boolean hasUserOrganization(long userId, long organizationId, 1112 boolean inheritSuborganizations, boolean includeSpecifiedOrganization) 1113 throws com.liferay.portal.kernel.exception.PortalException, 1114 com.liferay.portal.kernel.exception.SystemException { 1115 return _organizationLocalService.hasUserOrganization(userId, 1116 organizationId, inheritSuborganizations, 1117 includeSpecifiedOrganization); 1118 } 1119 1120 /** 1121 * Rebuilds the organizations tree. 1122 * 1123 * <p> 1124 * Only call this method if the tree has become stale through operations 1125 * other than normal CRUD. Under normal circumstances the tree is 1126 * automatically rebuilt whenever necessary. 1127 * </p> 1128 * 1129 * @param companyId the primary key of the organization's company 1130 * @throws PortalException if an organization with the primary key could not 1131 be found 1132 * @throws SystemException if a system exception occurred 1133 */ 1134 @Override 1135 public void rebuildTree(long companyId) 1136 throws com.liferay.portal.kernel.exception.PortalException, 1137 com.liferay.portal.kernel.exception.SystemException { 1138 _organizationLocalService.rebuildTree(companyId); 1139 } 1140 1141 /** 1142 * Returns a range of all the organizations of the company. 1143 * 1144 * <p> 1145 * Useful when paginating results. Returns a maximum of <code>end - 1146 * start</code> instances. <code>start</code> and <code>end</code> are not 1147 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1148 * refers to the first result in the set. Setting both <code>start</code> 1149 * and <code>end</code> to {@link 1150 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1151 * result set. 1152 * </p> 1153 * 1154 * @param companyId the primary key of the company 1155 * @param params the finder parameters (optionally <code>null</code>). For 1156 more information see {@link 1157 com.liferay.portlet.usersadmin.util.OrganizationIndexer} 1158 * @param start the lower bound of the range of organizations to return 1159 * @param end the upper bound of the range of organizations to return (not 1160 inclusive) 1161 * @return the range of all the organizations of the company 1162 * @throws SystemException if a system exception occurred 1163 */ 1164 @Override 1165 public java.util.List<com.liferay.portal.model.Organization> search( 1166 long companyId, 1167 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1168 int start, int end) 1169 throws com.liferay.portal.kernel.exception.SystemException { 1170 return _organizationLocalService.search(companyId, params, start, end); 1171 } 1172 1173 /** 1174 * Returns an ordered range of all the organizations that match the 1175 * keywords, using the indexer. It is preferable to use this method instead 1176 * of the non-indexed version whenever possible for performance reasons. 1177 * 1178 * <p> 1179 * Useful when paginating results. Returns a maximum of <code>end - 1180 * start</code> instances. <code>start</code> and <code>end</code> are not 1181 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1182 * refers to the first result in the set. Setting both <code>start</code> 1183 * and <code>end</code> to {@link 1184 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1185 * result set. 1186 * </p> 1187 * 1188 * @param companyId the primary key of the organization's company 1189 * @param parentOrganizationId the primary key of the organization's parent 1190 organization 1191 * @param keywords the keywords (space separated), which may occur in the 1192 organization's name, street, city, zipcode, type, region or 1193 country (optionally <code>null</code>) 1194 * @param params the finder parameters (optionally <code>null</code>). For 1195 more information see {@link 1196 com.liferay.portlet.usersadmin.util.OrganizationIndexer} 1197 * @param start the lower bound of the range of organizations to return 1198 * @param end the upper bound of the range of organizations to return (not 1199 inclusive) 1200 * @param sort the field and direction by which to sort (optionally 1201 <code>null</code>) 1202 * @return the matching organizations ordered by name 1203 * @throws SystemException if a system exception occurred 1204 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 1205 */ 1206 @Override 1207 public com.liferay.portal.kernel.search.Hits search(long companyId, 1208 long parentOrganizationId, java.lang.String keywords, 1209 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1210 int start, int end, com.liferay.portal.kernel.search.Sort sort) 1211 throws com.liferay.portal.kernel.exception.SystemException { 1212 return _organizationLocalService.search(companyId, 1213 parentOrganizationId, keywords, params, start, end, sort); 1214 } 1215 1216 /** 1217 * Returns a name ordered range of all the organizations that match the 1218 * keywords, type, region, and country, without using the indexer. It is 1219 * preferable to use the indexed version {@link #search(long, long, String, 1220 * LinkedHashMap, int, int, Sort)} instead of this method wherever possible 1221 * for performance reasons. 1222 * 1223 * <p> 1224 * Useful when paginating results. Returns a maximum of <code>end - 1225 * start</code> instances. <code>start</code> and <code>end</code> are not 1226 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1227 * refers to the first result in the set. Setting both <code>start</code> 1228 * and <code>end</code> to {@link 1229 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1230 * result set. 1231 * </p> 1232 * 1233 * @param companyId the primary key of the organization's company 1234 * @param parentOrganizationId the primary key of the organization's parent 1235 organization 1236 * @param keywords the keywords (space separated), which may occur in the 1237 organization's name, street, city, or zipcode (optionally 1238 <code>null</code>) 1239 * @param type the organization's type (optionally <code>null</code>) 1240 * @param regionId the primary key of the organization's region (optionally 1241 <code>null</code>) 1242 * @param countryId the primary key of the organization's country 1243 (optionally <code>null</code>) 1244 * @param params the finder params. For more information see {@link 1245 com.liferay.portal.service.persistence.OrganizationFinder} 1246 * @param start the lower bound of the range of organizations to return 1247 * @param end the upper bound of the range of organizations to return (not 1248 inclusive) 1249 * @return the matching organizations ordered by name 1250 * @throws SystemException if a system exception occurred 1251 * @see com.liferay.portal.service.persistence.OrganizationFinder 1252 */ 1253 @Override 1254 public java.util.List<com.liferay.portal.model.Organization> search( 1255 long companyId, long parentOrganizationId, java.lang.String keywords, 1256 java.lang.String type, java.lang.Long regionId, 1257 java.lang.Long countryId, 1258 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1259 int start, int end) 1260 throws com.liferay.portal.kernel.exception.SystemException { 1261 return _organizationLocalService.search(companyId, 1262 parentOrganizationId, keywords, type, regionId, countryId, params, 1263 start, end); 1264 } 1265 1266 /** 1267 * Returns an ordered range of all the organizations that match the 1268 * keywords, type, region, and country, without using the indexer. It is 1269 * preferable to use the indexed version {@link #search(long, long, String, 1270 * String, String, String, String, String, String, LinkedHashMap, boolean, 1271 * int, int, Sort)} instead of this method wherever possible for performance 1272 * reasons. 1273 * 1274 * <p> 1275 * Useful when paginating results. Returns a maximum of <code>end - 1276 * start</code> instances. <code>start</code> and <code>end</code> are not 1277 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1278 * refers to the first result in the set. Setting both <code>start</code> 1279 * and <code>end</code> to {@link 1280 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1281 * result set. 1282 * </p> 1283 * 1284 * @param companyId the primary key of the organization's company 1285 * @param parentOrganizationId the primary key of the organization's parent 1286 organization 1287 * @param keywords the keywords (space separated), which may occur in the 1288 organization's name, street, city, or zipcode (optionally 1289 <code>null</code>) 1290 * @param type the organization's type (optionally <code>null</code>) 1291 * @param regionId the primary key of the organization's region (optionally 1292 <code>null</code>) 1293 * @param countryId the primary key of the organization's country 1294 (optionally <code>null</code>) 1295 * @param params the finder params. For more information see {@link 1296 com.liferay.portal.service.persistence.OrganizationFinder} 1297 * @param start the lower bound of the range of organizations to return 1298 * @param end the upper bound of the range of organizations to return (not 1299 inclusive) 1300 * @param obc the comparator to order the organizations (optionally 1301 <code>null</code>) 1302 * @return the matching organizations ordered by comparator <code>obc</code> 1303 * @throws SystemException if a system exception occurred 1304 * @see com.liferay.portal.service.persistence.OrganizationFinder 1305 */ 1306 @Override 1307 public java.util.List<com.liferay.portal.model.Organization> search( 1308 long companyId, long parentOrganizationId, java.lang.String keywords, 1309 java.lang.String type, java.lang.Long regionId, 1310 java.lang.Long countryId, 1311 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1312 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1313 throws com.liferay.portal.kernel.exception.SystemException { 1314 return _organizationLocalService.search(companyId, 1315 parentOrganizationId, keywords, type, regionId, countryId, params, 1316 start, end, obc); 1317 } 1318 1319 /** 1320 * Returns a name ordered range of all the organizations with the type, 1321 * region, and country, and whose name, street, city, and zipcode match the 1322 * keywords specified for them, without using the indexer. It is preferable 1323 * to use the indexed version {@link #search(long, long, String, String, 1324 * String, String, String, String, String, LinkedHashMap, boolean, int, int, 1325 * Sort)} instead of this method wherever possible for performance reasons. 1326 * 1327 * <p> 1328 * Useful when paginating results. Returns a maximum of <code>end - 1329 * start</code> instances. <code>start</code> and <code>end</code> are not 1330 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1331 * refers to the first result in the set. Setting both <code>start</code> 1332 * and <code>end</code> to {@link 1333 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1334 * result set. 1335 * </p> 1336 * 1337 * @param companyId the primary key of the organization's company 1338 * @param parentOrganizationId the primary key of the organization's parent 1339 * @param name the name keywords (space separated, optionally 1340 <code>null</code>) 1341 * @param type the organization's type (optionally <code>null</code>) 1342 * @param street the street keywords (optionally <code>null</code>) 1343 * @param city the city keywords (optionally <code>null</code>) 1344 * @param zip the zipcode keywords (optionally <code>null</code>) 1345 * @param regionId the primary key of the organization's region (optionally 1346 <code>null</code>) 1347 * @param countryId the primary key of the organization's country 1348 (optionally <code>null</code>) 1349 * @param params the finder parameters (optionally <code>null</code>). For 1350 more information see {@link 1351 com.liferay.portal.service.persistence.OrganizationFinder} 1352 * @param andOperator whether every field must match its keywords, or just 1353 one field. For example, "organizations with the name 1354 'Employees' and city 'Chicago'" vs "organizations with 1355 the name 'Employees' or the city 'Chicago'". 1356 * @param start the lower bound of the range of organizations to return 1357 * @param end the upper bound of the range of organizations to return (not 1358 inclusive) 1359 * @return the matching organizations ordered by name 1360 * @throws SystemException if a system exception occurred 1361 * @see com.liferay.portal.service.persistence.OrganizationFinder 1362 */ 1363 @Override 1364 public java.util.List<com.liferay.portal.model.Organization> search( 1365 long companyId, long parentOrganizationId, java.lang.String name, 1366 java.lang.String type, java.lang.String street, java.lang.String city, 1367 java.lang.String zip, java.lang.Long regionId, 1368 java.lang.Long countryId, 1369 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1370 boolean andOperator, int start, int end) 1371 throws com.liferay.portal.kernel.exception.SystemException { 1372 return _organizationLocalService.search(companyId, 1373 parentOrganizationId, name, type, street, city, zip, regionId, 1374 countryId, params, andOperator, start, end); 1375 } 1376 1377 /** 1378 * Returns an ordered range of all the organizations with the type, region, 1379 * and country, and whose name, street, city, and zipcode match the keywords 1380 * specified for them, without using the indexer. It is preferable to use 1381 * the indexed version {@link #search(long, long, String, String, String, 1382 * String, String, String, String, LinkedHashMap, boolean, int, int, Sort)} 1383 * instead of this method wherever possible for performance reasons. 1384 * 1385 * <p> 1386 * Useful when paginating results. Returns a maximum of <code>end - 1387 * start</code> instances. <code>start</code> and <code>end</code> are not 1388 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1389 * refers to the first result in the set. Setting both <code>start</code> 1390 * and <code>end</code> to {@link 1391 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1392 * result set. 1393 * </p> 1394 * 1395 * @param companyId the primary key of the organization's company 1396 * @param parentOrganizationId the primary key of the organization's parent 1397 organization 1398 * @param name the name keywords (space separated, optionally 1399 <code>null</code>) 1400 * @param type the organization's type (optionally <code>null</code>) 1401 * @param street the street keywords (optionally <code>null</code>) 1402 * @param city the city keywords (optionally <code>null</code>) 1403 * @param zip the zipcode keywords (optionally <code>null</code>) 1404 * @param regionId the primary key of the organization's region (optionally 1405 <code>null</code>) 1406 * @param countryId the primary key of the organization's country 1407 (optionally <code>null</code>) 1408 * @param params the finder parameters (optionally <code>null</code>). For 1409 more information see {@link 1410 com.liferay.portal.service.persistence.OrganizationFinder} 1411 * @param andOperator whether every field must match its keywords, or just 1412 one field. For example, "organizations with the name 1413 'Employees' and city 'Chicago'" vs "organizations with 1414 the name 'Employees' or the city 'Chicago'". 1415 * @param start the lower bound of the range of organizations to return 1416 * @param end the upper bound of the range of organizations to return (not 1417 inclusive) 1418 * @param obc the comparator to order the organizations (optionally 1419 <code>null</code>) 1420 * @return the matching organizations ordered by comparator <code>obc</code> 1421 * @throws SystemException if a system exception occurred 1422 * @see com.liferay.portal.service.persistence.OrganizationFinder 1423 */ 1424 @Override 1425 public java.util.List<com.liferay.portal.model.Organization> search( 1426 long companyId, long parentOrganizationId, java.lang.String name, 1427 java.lang.String type, java.lang.String street, java.lang.String city, 1428 java.lang.String zip, java.lang.Long regionId, 1429 java.lang.Long countryId, 1430 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1431 boolean andOperator, int start, int end, 1432 com.liferay.portal.kernel.util.OrderByComparator obc) 1433 throws com.liferay.portal.kernel.exception.SystemException { 1434 return _organizationLocalService.search(companyId, 1435 parentOrganizationId, name, type, street, city, zip, regionId, 1436 countryId, params, andOperator, start, end, obc); 1437 } 1438 1439 /** 1440 * Returns an ordered range of all the organizations whose name, type, or 1441 * location fields match the keywords specified for them, using the indexer. 1442 * It is preferable to use this method instead of the non-indexed version 1443 * whenever possible for performance reasons. 1444 * 1445 * <p> 1446 * Useful when paginating results. Returns a maximum of <code>end - 1447 * start</code> instances. <code>start</code> and <code>end</code> are not 1448 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1449 * refers to the first result in the set. Setting both <code>start</code> 1450 * and <code>end</code> to {@link 1451 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1452 * result set. 1453 * </p> 1454 * 1455 * @param companyId the primary key of the organization's company 1456 * @param parentOrganizationId the primary key of the organization's parent 1457 organization 1458 * @param name the name keywords (space separated, optionally 1459 <code>null</code>) 1460 * @param type the type keywords (optionally <code>null</code>) 1461 * @param street the street keywords (optionally <code>null</code>) 1462 * @param city the city keywords (optionally <code>null</code>) 1463 * @param zip the zipcode keywords (optionally <code>null</code>) 1464 * @param region the region keywords (optionally <code>null</code>) 1465 * @param country the country keywords (optionally <code>null</code>) 1466 * @param params the finder parameters (optionally <code>null</code>). For 1467 more information see {@link 1468 com.liferay.portlet.usersadmin.util.OrganizationIndexer}. 1469 * @param andSearch whether every field must match its keywords or just one 1470 field 1471 * @param start the lower bound of the range of organizations to return 1472 * @param end the upper bound of the range of organizations to return (not 1473 inclusive) 1474 * @param sort the field and direction by which to sort (optionally 1475 <code>null</code>) 1476 * @return the matching organizations ordered by <code>sort</code> 1477 * @throws SystemException if a system exception occurred 1478 * @see com.liferay.portlet.usersadmin.util.OrganizationIndexer 1479 */ 1480 @Override 1481 public com.liferay.portal.kernel.search.Hits search(long companyId, 1482 long parentOrganizationId, java.lang.String name, 1483 java.lang.String type, java.lang.String street, java.lang.String city, 1484 java.lang.String zip, java.lang.String region, 1485 java.lang.String country, 1486 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1487 boolean andSearch, int start, int end, 1488 com.liferay.portal.kernel.search.Sort sort) 1489 throws com.liferay.portal.kernel.exception.SystemException { 1490 return _organizationLocalService.search(companyId, 1491 parentOrganizationId, name, type, street, city, zip, region, 1492 country, params, andSearch, start, end, sort); 1493 } 1494 1495 /** 1496 * Returns the number of organizations that match the keywords, type, 1497 * region, and country. 1498 * 1499 * @param companyId the primary key of the organization's company 1500 * @param parentOrganizationId the primary key of the organization's parent 1501 organization 1502 * @param keywords the keywords (space separated), which may occur in the 1503 organization's name, street, city, or zipcode (optionally 1504 <code>null</code>) 1505 * @param type the organization's type (optionally <code>null</code>) 1506 * @param regionId the primary key of the organization's region (optionally 1507 <code>null</code>) 1508 * @param countryId the primary key of the organization's country 1509 (optionally <code>null</code>) 1510 * @param params the finder parameters (optionally <code>null</code>). For 1511 more information see {@link 1512 com.liferay.portal.service.persistence.OrganizationFinder} 1513 * @return the number of matching organizations 1514 * @throws SystemException if a system exception occurred 1515 * @see com.liferay.portal.service.persistence.OrganizationFinder 1516 */ 1517 @Override 1518 public int searchCount(long companyId, long parentOrganizationId, 1519 java.lang.String keywords, java.lang.String type, 1520 java.lang.Long regionId, java.lang.Long countryId, 1521 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) 1522 throws com.liferay.portal.kernel.exception.SystemException { 1523 return _organizationLocalService.searchCount(companyId, 1524 parentOrganizationId, keywords, type, regionId, countryId, params); 1525 } 1526 1527 /** 1528 * Returns the number of organizations with the type, region, and country, 1529 * and whose name, street, city, and zipcode match the keywords specified 1530 * for them. 1531 * 1532 * @param companyId the primary key of the organization's company 1533 * @param parentOrganizationId the primary key of the organization's parent 1534 organization 1535 * @param name the name keywords (space separated, optionally 1536 <code>null</code>) 1537 * @param type the organization's type (optionally <code>null</code>) 1538 * @param street the street keywords (optionally <code>null</code>) 1539 * @param city the city keywords (optionally <code>null</code>) 1540 * @param zip the zipcode keywords (optionally <code>null</code>) 1541 * @param regionId the primary key of the organization's region (optionally 1542 <code>null</code>) 1543 * @param countryId the primary key of the organization's country 1544 (optionally <code>null</code>) 1545 * @param params the finder parameters (optionally <code>null</code>). For 1546 more information see {@link 1547 com.liferay.portal.service.persistence.OrganizationFinder} 1548 * @param andOperator whether every field must match its keywords, or just 1549 one field. For example, "organizations with the name 1550 'Employees' and city 'Chicago'" vs "organizations with 1551 the name 'Employees' or the city 'Chicago'". 1552 * @return the number of matching organizations 1553 * @throws SystemException if a system exception occurred 1554 * @see com.liferay.portal.service.persistence.OrganizationFinder 1555 */ 1556 @Override 1557 public int searchCount(long companyId, long parentOrganizationId, 1558 java.lang.String name, java.lang.String type, java.lang.String street, 1559 java.lang.String city, java.lang.String zip, java.lang.Long regionId, 1560 java.lang.Long countryId, 1561 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 1562 boolean andOperator) 1563 throws com.liferay.portal.kernel.exception.SystemException { 1564 return _organizationLocalService.searchCount(companyId, 1565 parentOrganizationId, name, type, street, city, zip, regionId, 1566 countryId, params, andOperator); 1567 } 1568 1569 /** 1570 * Removes the organizations from the group. 1571 * 1572 * @param groupId the primary key of the group 1573 * @param organizationIds the primary keys of the organizations 1574 * @throws PortalException if a portal exception occurred 1575 * @throws SystemException if a system exception occurred 1576 */ 1577 @Override 1578 public void unsetGroupOrganizations(long groupId, long[] organizationIds) 1579 throws com.liferay.portal.kernel.exception.PortalException, 1580 com.liferay.portal.kernel.exception.SystemException { 1581 _organizationLocalService.unsetGroupOrganizations(groupId, 1582 organizationIds); 1583 } 1584 1585 /** 1586 * Removes the organizations from the password policy. 1587 * 1588 * @param passwordPolicyId the primary key of the password policy 1589 * @param organizationIds the primary keys of the organizations 1590 * @throws SystemException if a system exception occurred 1591 */ 1592 @Override 1593 public void unsetPasswordPolicyOrganizations(long passwordPolicyId, 1594 long[] organizationIds) 1595 throws com.liferay.portal.kernel.exception.SystemException { 1596 _organizationLocalService.unsetPasswordPolicyOrganizations(passwordPolicyId, 1597 organizationIds); 1598 } 1599 1600 /** 1601 * Updates the organization's asset with the new asset categories and tag 1602 * names, removing and adding asset categories and tag names as necessary. 1603 * 1604 * @param userId the primary key of the user 1605 * @param organization the organization 1606 * @param assetCategoryIds the primary keys of the asset categories 1607 * @param assetTagNames the asset tag names 1608 * @throws PortalException if a user with the primary key could not be found 1609 * @throws SystemException if a system exception occurred 1610 */ 1611 @Override 1612 public void updateAsset(long userId, 1613 com.liferay.portal.model.Organization organization, 1614 long[] assetCategoryIds, java.lang.String[] assetTagNames) 1615 throws com.liferay.portal.kernel.exception.PortalException, 1616 com.liferay.portal.kernel.exception.SystemException { 1617 _organizationLocalService.updateAsset(userId, organization, 1618 assetCategoryIds, assetTagNames); 1619 } 1620 1621 /** 1622 * Updates the organization. 1623 * 1624 * @param companyId the primary key of the organization's company 1625 * @param organizationId the primary key of the organization 1626 * @param parentOrganizationId the primary key of organization's parent 1627 organization 1628 * @param name the organization's name 1629 * @param type the organization's type 1630 * @param recursable whether permissions of the organization are to be 1631 inherited by its suborganizations 1632 * @param regionId the primary key of the organization's region 1633 * @param countryId the primary key of the organization's country 1634 * @param statusId the organization's workflow status 1635 * @param comments the comments about the organization 1636 * @param site whether the organization is to be associated with a main 1637 site 1638 * @param serviceContext the service context to be applied (optionally 1639 <code>null</code>). Can set asset category IDs and asset tag 1640 names for the organization, and merge expando bridge 1641 attributes for the organization. 1642 * @return the organization 1643 * @throws PortalException if an organization or parent organization 1644 with the primary key could not be found or if the new 1645 information was invalid 1646 * @throws SystemException if a system exception occurred 1647 * @deprecated As of 6.2.0, replaced by {@link #updateOrganization(long, 1648 long, long, String, String, long, long, int, String, boolean, 1649 ServiceContext)} 1650 */ 1651 @Override 1652 public com.liferay.portal.model.Organization updateOrganization( 1653 long companyId, long organizationId, long parentOrganizationId, 1654 java.lang.String name, java.lang.String type, boolean recursable, 1655 long regionId, long countryId, int statusId, java.lang.String comments, 1656 boolean site, com.liferay.portal.service.ServiceContext serviceContext) 1657 throws com.liferay.portal.kernel.exception.PortalException, 1658 com.liferay.portal.kernel.exception.SystemException { 1659 return _organizationLocalService.updateOrganization(companyId, 1660 organizationId, parentOrganizationId, name, type, recursable, 1661 regionId, countryId, statusId, comments, site, serviceContext); 1662 } 1663 1664 /** 1665 * Updates the organization. 1666 * 1667 * @param companyId the primary key of the organization's company 1668 * @param organizationId the primary key of the organization 1669 * @param parentOrganizationId the primary key of organization's parent 1670 organization 1671 * @param name the organization's name 1672 * @param type the organization's type 1673 * @param regionId the primary key of the organization's region 1674 * @param countryId the primary key of the organization's country 1675 * @param statusId the organization's workflow status 1676 * @param comments the comments about the organization 1677 * @param site whether the organization is to be associated with a main 1678 site 1679 * @param serviceContext the service context to be applied (optionally 1680 <code>null</code>). Can set asset category IDs and asset tag 1681 names for the organization, and merge expando bridge attributes 1682 for the organization. 1683 * @return the organization 1684 * @throws PortalException if an organization or parent organization with 1685 the primary key could not be found or if the new information was 1686 invalid 1687 * @throws SystemException if a system exception occurred 1688 */ 1689 @Override 1690 public com.liferay.portal.model.Organization updateOrganization( 1691 long companyId, long organizationId, long parentOrganizationId, 1692 java.lang.String name, java.lang.String type, long regionId, 1693 long countryId, int statusId, java.lang.String comments, boolean site, 1694 com.liferay.portal.service.ServiceContext serviceContext) 1695 throws com.liferay.portal.kernel.exception.PortalException, 1696 com.liferay.portal.kernel.exception.SystemException { 1697 return _organizationLocalService.updateOrganization(companyId, 1698 organizationId, parentOrganizationId, name, type, regionId, 1699 countryId, statusId, comments, site, serviceContext); 1700 } 1701 1702 /** 1703 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 1704 */ 1705 public OrganizationLocalService getWrappedOrganizationLocalService() { 1706 return _organizationLocalService; 1707 } 1708 1709 /** 1710 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 1711 */ 1712 public void setWrappedOrganizationLocalService( 1713 OrganizationLocalService organizationLocalService) { 1714 _organizationLocalService = organizationLocalService; 1715 } 1716 1717 @Override 1718 public OrganizationLocalService getWrappedService() { 1719 return _organizationLocalService; 1720 } 1721 1722 @Override 1723 public void setWrappedService( 1724 OrganizationLocalService organizationLocalService) { 1725 _organizationLocalService = organizationLocalService; 1726 } 1727 1728 private OrganizationLocalService _organizationLocalService; 1729 }