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 CompanyLocalService}. 021 * 022 * @author Brian Wing Shun Chan 023 * @see CompanyLocalService 024 * @generated 025 */ 026 @ProviderType 027 public class CompanyLocalServiceWrapper implements CompanyLocalService, 028 ServiceWrapper<CompanyLocalService> { 029 public CompanyLocalServiceWrapper(CompanyLocalService companyLocalService) { 030 _companyLocalService = companyLocalService; 031 } 032 033 @Override 034 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 035 return _companyLocalService.getActionableDynamicQuery(); 036 } 037 038 @Override 039 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 040 return _companyLocalService.dynamicQuery(); 041 } 042 043 @Override 044 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 045 return _companyLocalService.getIndexableActionableDynamicQuery(); 046 } 047 048 /** 049 * Adds the company to the database. Also notifies the appropriate model listeners. 050 * 051 * @param company the company 052 * @return the company that was added 053 */ 054 @Override 055 public com.liferay.portal.kernel.model.Company addCompany( 056 com.liferay.portal.kernel.model.Company company) { 057 return _companyLocalService.addCompany(company); 058 } 059 060 /** 061 * Adds a company. 062 * 063 * @param webId the the company's web domain 064 * @param virtualHostname the company's virtual host name 065 * @param mx the company's mail domain 066 * @param system whether the company is the very first company (i.e., the 067 super company) 068 * @param maxUsers the max number of company users (optionally 069 <code>0</code>) 070 * @param active whether the company is active 071 * @return the company 072 */ 073 @Override 074 public com.liferay.portal.kernel.model.Company addCompany( 075 java.lang.String webId, java.lang.String virtualHostname, 076 java.lang.String mx, boolean system, int maxUsers, boolean active) 077 throws com.liferay.portal.kernel.exception.PortalException { 078 return _companyLocalService.addCompany(webId, virtualHostname, mx, 079 system, maxUsers, active); 080 } 081 082 /** 083 * Returns the company with the web domain. 084 * 085 * The method sets mail domain to the web domain to the default name set in 086 * portal.properties 087 * 088 * @param webId the company's web domain 089 * @return the company with the web domain 090 */ 091 @Override 092 public com.liferay.portal.kernel.model.Company checkCompany( 093 java.lang.String webId) 094 throws com.liferay.portal.kernel.exception.PortalException { 095 return _companyLocalService.checkCompany(webId); 096 } 097 098 /** 099 * Returns the company with the web domain and mail domain. If no such 100 * company exits, the method will create a new company. 101 * 102 * The method goes through a series of checks to ensure that the company 103 * contains default users, groups, etc. 104 * 105 * @param webId the company's web domain 106 * @param mx the company's mail domain 107 * @return the company with the web domain and mail domain 108 */ 109 @Override 110 public com.liferay.portal.kernel.model.Company checkCompany( 111 java.lang.String webId, java.lang.String mx) 112 throws com.liferay.portal.kernel.exception.PortalException { 113 return _companyLocalService.checkCompany(webId, mx); 114 } 115 116 /** 117 * Creates a new company with the primary key. Does not add the company to the database. 118 * 119 * @param companyId the primary key for the new company 120 * @return the new company 121 */ 122 @Override 123 public com.liferay.portal.kernel.model.Company createCompany(long companyId) { 124 return _companyLocalService.createCompany(companyId); 125 } 126 127 /** 128 * Deletes the company from the database. Also notifies the appropriate model listeners. 129 * 130 * @param company the company 131 * @return the company that was removed 132 * @throws PortalException 133 */ 134 @Override 135 public com.liferay.portal.kernel.model.Company deleteCompany( 136 com.liferay.portal.kernel.model.Company company) 137 throws com.liferay.portal.kernel.exception.PortalException { 138 return _companyLocalService.deleteCompany(company); 139 } 140 141 /** 142 * Deletes the company with the primary key from the database. Also notifies the appropriate model listeners. 143 * 144 * @param companyId the primary key of the company 145 * @return the company that was removed 146 * @throws PortalException if a company with the primary key could not be found 147 */ 148 @Override 149 public com.liferay.portal.kernel.model.Company deleteCompany(long companyId) 150 throws com.liferay.portal.kernel.exception.PortalException { 151 return _companyLocalService.deleteCompany(companyId); 152 } 153 154 /** 155 * Deletes the company's logo. 156 * 157 * @param companyId the primary key of the company 158 * @return the deleted logo's company 159 */ 160 @Override 161 public com.liferay.portal.kernel.model.Company deleteLogo(long companyId) 162 throws com.liferay.portal.kernel.exception.PortalException { 163 return _companyLocalService.deleteLogo(companyId); 164 } 165 166 @Override 167 public com.liferay.portal.kernel.model.Company fetchCompany(long companyId) { 168 return _companyLocalService.fetchCompany(companyId); 169 } 170 171 /** 172 * Returns the company with the primary key. 173 * 174 * @param companyId the primary key of the company 175 * @return the company with the primary key, <code>null</code> if a company 176 with the primary key could not be found 177 */ 178 @Override 179 public com.liferay.portal.kernel.model.Company fetchCompanyById( 180 long companyId) { 181 return _companyLocalService.fetchCompanyById(companyId); 182 } 183 184 /** 185 * Returns the company with the virtual host name. 186 * 187 * @param virtualHostname the virtual host name 188 * @return the company with the virtual host name, <code>null</code> if a 189 company with the virtual host could not be found 190 */ 191 @Override 192 public com.liferay.portal.kernel.model.Company fetchCompanyByVirtualHost( 193 java.lang.String virtualHostname) { 194 return _companyLocalService.fetchCompanyByVirtualHost(virtualHostname); 195 } 196 197 /** 198 * Returns the company with the primary key. 199 * 200 * @param companyId the primary key of the company 201 * @return the company 202 * @throws PortalException if a company with the primary key could not be found 203 */ 204 @Override 205 public com.liferay.portal.kernel.model.Company getCompany(long companyId) 206 throws com.liferay.portal.kernel.exception.PortalException { 207 return _companyLocalService.getCompany(companyId); 208 } 209 210 /** 211 * Returns the company with the primary key. 212 * 213 * @param companyId the primary key of the company 214 * @return the company with the primary key 215 */ 216 @Override 217 public com.liferay.portal.kernel.model.Company getCompanyById( 218 long companyId) 219 throws com.liferay.portal.kernel.exception.PortalException { 220 return _companyLocalService.getCompanyById(companyId); 221 } 222 223 /** 224 * Returns the company with the logo. 225 * 226 * @param logoId the ID of the company's logo 227 * @return the company with the logo 228 */ 229 @Override 230 public com.liferay.portal.kernel.model.Company getCompanyByLogoId( 231 long logoId) throws com.liferay.portal.kernel.exception.PortalException { 232 return _companyLocalService.getCompanyByLogoId(logoId); 233 } 234 235 /** 236 * Returns the company with the mail domain. 237 * 238 * @param mx the company's mail domain 239 * @return the company with the mail domain 240 */ 241 @Override 242 public com.liferay.portal.kernel.model.Company getCompanyByMx( 243 java.lang.String mx) 244 throws com.liferay.portal.kernel.exception.PortalException { 245 return _companyLocalService.getCompanyByMx(mx); 246 } 247 248 /** 249 * Returns the company with the virtual host name. 250 * 251 * @param virtualHostname the company's virtual host name 252 * @return the company with the virtual host name 253 */ 254 @Override 255 public com.liferay.portal.kernel.model.Company getCompanyByVirtualHost( 256 java.lang.String virtualHostname) 257 throws com.liferay.portal.kernel.exception.PortalException { 258 return _companyLocalService.getCompanyByVirtualHost(virtualHostname); 259 } 260 261 /** 262 * Returns the company with the web domain. 263 * 264 * @param webId the company's web domain 265 * @return the company with the web domain 266 */ 267 @Override 268 public com.liferay.portal.kernel.model.Company getCompanyByWebId( 269 java.lang.String webId) 270 throws com.liferay.portal.kernel.exception.PortalException { 271 return _companyLocalService.getCompanyByWebId(webId); 272 } 273 274 /** 275 * Updates the company in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 276 * 277 * @param company the company 278 * @return the company that was updated 279 */ 280 @Override 281 public com.liferay.portal.kernel.model.Company updateCompany( 282 com.liferay.portal.kernel.model.Company company) { 283 return _companyLocalService.updateCompany(company); 284 } 285 286 /** 287 * Updates the company. 288 * 289 * @param companyId the primary key of the company 290 * @param virtualHostname the company's virtual host name 291 * @param mx the company's mail domain 292 * @param maxUsers the max number of company users (optionally 293 <code>0</code>) 294 * @param active whether the company is active 295 * @return the company with the primary key 296 */ 297 @Override 298 public com.liferay.portal.kernel.model.Company updateCompany( 299 long companyId, java.lang.String virtualHostname, java.lang.String mx, 300 int maxUsers, boolean active) 301 throws com.liferay.portal.kernel.exception.PortalException { 302 return _companyLocalService.updateCompany(companyId, virtualHostname, 303 mx, maxUsers, active); 304 } 305 306 /** 307 * Update the company with additional account information. 308 * 309 * @param companyId the primary key of the company 310 * @param virtualHostname the company's virtual host name 311 * @param mx the company's mail domain 312 * @param homeURL the company's home URL (optionally <code>null</code>) 313 * @param logo whether to update the company's logo 314 * @param logoBytes the new logo image data 315 * @param name the company's account name(optionally <code>null</code>) 316 * @param legalName the company's account legal name (optionally 317 <code>null</code>) 318 * @param legalId the company's account legal ID (optionally 319 <code>null</code>) 320 * @param legalType the company's account legal type (optionally 321 <code>null</code>) 322 * @param sicCode the company's account SIC code (optionally 323 <code>null</code>) 324 * @param tickerSymbol the company's account ticker symbol (optionally 325 <code>null</code>) 326 * @param industry the company's account industry (optionally 327 <code>null</code>) 328 * @param type the company's account type (optionally <code>null</code>) 329 * @param size the company's account size (optionally <code>null</code>) 330 * @return the company with the primary key 331 */ 332 @Override 333 public com.liferay.portal.kernel.model.Company updateCompany( 334 long companyId, java.lang.String virtualHostname, java.lang.String mx, 335 java.lang.String homeURL, boolean logo, byte[] logoBytes, 336 java.lang.String name, java.lang.String legalName, 337 java.lang.String legalId, java.lang.String legalType, 338 java.lang.String sicCode, java.lang.String tickerSymbol, 339 java.lang.String industry, java.lang.String type, java.lang.String size) 340 throws com.liferay.portal.kernel.exception.PortalException { 341 return _companyLocalService.updateCompany(companyId, virtualHostname, 342 mx, homeURL, logo, logoBytes, name, legalName, legalId, legalType, 343 sicCode, tickerSymbol, industry, type, size); 344 } 345 346 /** 347 * Update the company with additional account information. 348 * 349 * @param companyId the primary key of the company 350 * @param virtualHostname the company's virtual host name 351 * @param mx the company's mail domain 352 * @param homeURL the company's home URL (optionally <code>null</code>) 353 * @param name the company's account name(optionally <code>null</code>) 354 * @param legalName the company's account legal name (optionally 355 <code>null</code>) 356 * @param legalId the company's account legal ID (optionally 357 <code>null</code>) 358 * @param legalType the company's account legal type (optionally 359 <code>null</code>) 360 * @param sicCode the company's account SIC code (optionally 361 <code>null</code>) 362 * @param tickerSymbol the company's account ticker symbol (optionally 363 <code>null</code>) 364 * @param industry the company's account industry (optionally 365 <code>null</code>) 366 * @param type the company's account type (optionally 367 <code>null</code>) 368 * @param size the company's account size (optionally 369 <code>null</code>) 370 * @return the company with the primary key 371 * @deprecated As of 7.0.0, replaced by {@link #updateCompany(long, String, 372 String, String, boolean, byte[], String, String, String, 373 String, String, String, String, String, String)} 374 */ 375 @Deprecated 376 @Override 377 public com.liferay.portal.kernel.model.Company updateCompany( 378 long companyId, java.lang.String virtualHostname, java.lang.String mx, 379 java.lang.String homeURL, java.lang.String name, 380 java.lang.String legalName, java.lang.String legalId, 381 java.lang.String legalType, java.lang.String sicCode, 382 java.lang.String tickerSymbol, java.lang.String industry, 383 java.lang.String type, java.lang.String size) 384 throws com.liferay.portal.kernel.exception.PortalException { 385 return _companyLocalService.updateCompany(companyId, virtualHostname, 386 mx, homeURL, name, legalName, legalId, legalType, sicCode, 387 tickerSymbol, industry, type, size); 388 } 389 390 /** 391 * Updates the company's logo. 392 * 393 * @param companyId the primary key of the company 394 * @param bytes the bytes of the company's logo image 395 * @return the company with the primary key 396 */ 397 @Override 398 public com.liferay.portal.kernel.model.Company updateLogo(long companyId, 399 byte[] bytes) 400 throws com.liferay.portal.kernel.exception.PortalException { 401 return _companyLocalService.updateLogo(companyId, bytes); 402 } 403 404 /** 405 * Updates the company's logo. 406 * 407 * @param companyId the primary key of the company 408 * @param file the file of the company's logo image 409 * @return the company with the primary key 410 */ 411 @Override 412 public com.liferay.portal.kernel.model.Company updateLogo(long companyId, 413 java.io.File file) 414 throws com.liferay.portal.kernel.exception.PortalException { 415 return _companyLocalService.updateLogo(companyId, file); 416 } 417 418 /** 419 * Update the company's logo. 420 * 421 * @param companyId the primary key of the company 422 * @param is the input stream of the company's logo image 423 * @return the company with the primary key 424 */ 425 @Override 426 public com.liferay.portal.kernel.model.Company updateLogo(long companyId, 427 java.io.InputStream is) 428 throws com.liferay.portal.kernel.exception.PortalException { 429 return _companyLocalService.updateLogo(companyId, is); 430 } 431 432 /** 433 * @throws PortalException 434 */ 435 @Override 436 public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 437 com.liferay.portal.kernel.model.PersistedModel persistedModel) 438 throws com.liferay.portal.kernel.exception.PortalException { 439 return _companyLocalService.deletePersistedModel(persistedModel); 440 } 441 442 @Override 443 public com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 444 java.io.Serializable primaryKeyObj) 445 throws com.liferay.portal.kernel.exception.PortalException { 446 return _companyLocalService.getPersistedModel(primaryKeyObj); 447 } 448 449 /** 450 * Returns an ordered range of all assets that match the keywords in the 451 * company. 452 * 453 * The method is called in {@link 454 * com.liferay.portal.search.PortalOpenSearchImpl} which is not longer used 455 * by the Search portlet. 456 * 457 * @param companyId the primary key of the company 458 * @param userId the primary key of the user 459 * @param keywords the keywords (space separated),which may occur in assets 460 in the company (optionally <code>null</code>) 461 * @param start the lower bound of the range of assets to return 462 * @param end the upper bound of the range of assets to return (not 463 inclusive) 464 * @return the matching assets in the company 465 */ 466 @Override 467 public com.liferay.portal.kernel.search.Hits search(long companyId, 468 long userId, java.lang.String keywords, int start, int end) { 469 return _companyLocalService.search(companyId, userId, keywords, start, 470 end); 471 } 472 473 /** 474 * Returns an ordered range of all assets that match the keywords in the 475 * portlet within the company. 476 * 477 * @param companyId the primary key of the company 478 * @param userId the primary key of the user 479 * @param portletId the primary key of the portlet (optionally 480 <code>null</code>) 481 * @param groupId the primary key of the group (optionally <code>0</code>) 482 * @param type the mime type of assets to return(optionally 483 <code>null</code>) 484 * @param keywords the keywords (space separated), which may occur in any 485 assets in the portlet (optionally <code>null</code>) 486 * @param start the lower bound of the range of assets to return 487 * @param end the upper bound of the range of assets to return (not 488 inclusive) 489 * @return the matching assets in the portlet within the company 490 */ 491 @Override 492 public com.liferay.portal.kernel.search.Hits search(long companyId, 493 long userId, java.lang.String portletId, long groupId, 494 java.lang.String type, java.lang.String keywords, int start, int end) { 495 return _companyLocalService.search(companyId, userId, portletId, 496 groupId, type, keywords, start, end); 497 } 498 499 /** 500 * Returns the number of companies. 501 * 502 * @return the number of companies 503 */ 504 @Override 505 public int getCompaniesCount() { 506 return _companyLocalService.getCompaniesCount(); 507 } 508 509 /** 510 * Returns the number of companies used by WSRP. 511 * 512 * @param system whether the company is the very first company (i.e., the 513 super company) 514 * @return the number of companies used by WSRP 515 */ 516 @Override 517 public int getCompaniesCount(boolean system) { 518 return _companyLocalService.getCompaniesCount(system); 519 } 520 521 /** 522 * Returns the OSGi service identifier. 523 * 524 * @return the OSGi service identifier 525 */ 526 @Override 527 public java.lang.String getOSGiServiceIdentifier() { 528 return _companyLocalService.getOSGiServiceIdentifier(); 529 } 530 531 /** 532 * Performs a dynamic query on the database and returns the matching rows. 533 * 534 * @param dynamicQuery the dynamic query 535 * @return the matching rows 536 */ 537 @Override 538 public <T> java.util.List<T> dynamicQuery( 539 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 540 return _companyLocalService.dynamicQuery(dynamicQuery); 541 } 542 543 /** 544 * Performs a dynamic query on the database and returns a range of the matching rows. 545 * 546 * <p> 547 * 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.CompanyModelImpl}. 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. 548 * </p> 549 * 550 * @param dynamicQuery the dynamic query 551 * @param start the lower bound of the range of model instances 552 * @param end the upper bound of the range of model instances (not inclusive) 553 * @return the range of matching rows 554 */ 555 @Override 556 public <T> java.util.List<T> dynamicQuery( 557 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 558 int end) { 559 return _companyLocalService.dynamicQuery(dynamicQuery, start, end); 560 } 561 562 /** 563 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 564 * 565 * <p> 566 * 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.CompanyModelImpl}. 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. 567 * </p> 568 * 569 * @param dynamicQuery the dynamic query 570 * @param start the lower bound of the range of model instances 571 * @param end the upper bound of the range of model instances (not inclusive) 572 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 573 * @return the ordered range of matching rows 574 */ 575 @Override 576 public <T> java.util.List<T> dynamicQuery( 577 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 578 int end, 579 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 580 return _companyLocalService.dynamicQuery(dynamicQuery, start, end, 581 orderByComparator); 582 } 583 584 /** 585 * Returns all the companies. 586 * 587 * @return the companies 588 */ 589 @Override 590 public java.util.List<com.liferay.portal.kernel.model.Company> getCompanies() { 591 return _companyLocalService.getCompanies(); 592 } 593 594 /** 595 * Returns all the companies used by WSRP. 596 * 597 * @param system whether the company is the very first company (i.e., the 598 super company) 599 * @return the companies used by WSRP 600 */ 601 @Override 602 public java.util.List<com.liferay.portal.kernel.model.Company> getCompanies( 603 boolean system) { 604 return _companyLocalService.getCompanies(system); 605 } 606 607 @Override 608 public java.util.List<com.liferay.portal.kernel.model.Company> getCompanies( 609 boolean system, int start, int end) { 610 return _companyLocalService.getCompanies(system, start, end); 611 } 612 613 /** 614 * Returns a range of all the companies. 615 * 616 * <p> 617 * 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.CompanyModelImpl}. 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. 618 * </p> 619 * 620 * @param start the lower bound of the range of companies 621 * @param end the upper bound of the range of companies (not inclusive) 622 * @return the range of companies 623 */ 624 @Override 625 public java.util.List<com.liferay.portal.kernel.model.Company> getCompanies( 626 int start, int end) { 627 return _companyLocalService.getCompanies(start, end); 628 } 629 630 /** 631 * Returns the number of rows matching the dynamic query. 632 * 633 * @param dynamicQuery the dynamic query 634 * @return the number of rows matching the dynamic query 635 */ 636 @Override 637 public long dynamicQueryCount( 638 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 639 return _companyLocalService.dynamicQueryCount(dynamicQuery); 640 } 641 642 /** 643 * Returns the number of rows matching the dynamic query. 644 * 645 * @param dynamicQuery the dynamic query 646 * @param projection the projection to apply to the query 647 * @return the number of rows matching the dynamic query 648 */ 649 @Override 650 public long dynamicQueryCount( 651 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 652 com.liferay.portal.kernel.dao.orm.Projection projection) { 653 return _companyLocalService.dynamicQueryCount(dynamicQuery, projection); 654 } 655 656 /** 657 * Returns the user's company. 658 * 659 * @param userId the primary key of the user 660 * @return Returns the first company if there is only one company or the 661 user's company if there are more than one company; <code>0</code> 662 otherwise 663 * @throws Exception if a user with the primary key could not be found 664 */ 665 @Override 666 public long getCompanyIdByUserId(long userId) throws java.lang.Exception { 667 return _companyLocalService.getCompanyIdByUserId(userId); 668 } 669 670 /** 671 * Checks if the company has an encryption key. It will create a key if one 672 * does not exist. 673 * 674 * @param companyId the primary key of the company 675 */ 676 @Override 677 public void checkCompanyKey(long companyId) 678 throws com.liferay.portal.kernel.exception.PortalException { 679 _companyLocalService.checkCompanyKey(companyId); 680 } 681 682 /** 683 * Removes the values that match the keys of the company's preferences. 684 * 685 * This method is called by {@link 686 * com.liferay.portlet.portalsettings.action.EditLDAPServerAction} remotely 687 * through {@link CompanyService}. 688 * 689 * @param companyId the primary key of the company 690 * @param keys the company's preferences keys to be remove 691 */ 692 @Override 693 public void removePreferences(long companyId, java.lang.String[] keys) { 694 _companyLocalService.removePreferences(companyId, keys); 695 } 696 697 /** 698 * Update the company's display. 699 * 700 * @param companyId the primary key of the company 701 * @param languageId the ID of the company's default user's language 702 * @param timeZoneId the ID of the company's default user's time zone 703 */ 704 @Override 705 public void updateDisplay(long companyId, java.lang.String languageId, 706 java.lang.String timeZoneId) 707 throws com.liferay.portal.kernel.exception.PortalException { 708 _companyLocalService.updateDisplay(companyId, languageId, timeZoneId); 709 } 710 711 /** 712 * Updates the company's preferences. The company's default properties are 713 * found in portal.properties. 714 * 715 * @param companyId the primary key of the company 716 * @param properties the company's properties. See {@link UnicodeProperties} 717 */ 718 @Override 719 public void updatePreferences(long companyId, 720 com.liferay.portal.kernel.util.UnicodeProperties properties) 721 throws com.liferay.portal.kernel.exception.PortalException { 722 _companyLocalService.updatePreferences(companyId, properties); 723 } 724 725 /** 726 * Updates the company's security properties. 727 * 728 * @param companyId the primary key of the company 729 * @param authType the company's method of authenticating users 730 * @param autoLogin whether to allow users to select the "remember me" 731 feature 732 * @param sendPassword whether to allow users to ask the company to send 733 their password 734 * @param strangers whether to allow strangers to create accounts register 735 themselves in the company 736 * @param strangersWithMx whether to allow strangers to create accounts with 737 email addresses that match the company mail suffix 738 * @param strangersVerify whether to require strangers who create accounts 739 to be verified via email 740 * @param siteLogo whether to allow site administrators to use their own 741 logo instead of the enterprise logo 742 */ 743 @Override 744 public void updateSecurity(long companyId, java.lang.String authType, 745 boolean autoLogin, boolean sendPassword, boolean strangers, 746 boolean strangersWithMx, boolean strangersVerify, boolean siteLogo) { 747 _companyLocalService.updateSecurity(companyId, authType, autoLogin, 748 sendPassword, strangers, strangersWithMx, strangersVerify, siteLogo); 749 } 750 751 @Override 752 public CompanyLocalService getWrappedService() { 753 return _companyLocalService; 754 } 755 756 @Override 757 public void setWrappedService(CompanyLocalService companyLocalService) { 758 _companyLocalService = companyLocalService; 759 } 760 761 private CompanyLocalService _companyLocalService; 762 }