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