001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.exception.SystemException; 022 import com.liferay.portal.kernel.util.OrderByComparator; 023 import com.liferay.portal.kernel.util.ReferenceRegistry; 024 import com.liferay.portal.model.Company; 025 import com.liferay.portal.service.ServiceContext; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the company service. This utility wraps {@link CompanyPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see CompanyPersistence 038 * @see CompanyPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class CompanyUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(Company company) { 060 getPersistence().clearCache(company); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) 067 throws SystemException { 068 return getPersistence().countWithDynamicQuery(dynamicQuery); 069 } 070 071 /** 072 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 073 */ 074 public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery) 075 throws SystemException { 076 return getPersistence().findWithDynamicQuery(dynamicQuery); 077 } 078 079 /** 080 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 081 */ 082 public static List<Company> findWithDynamicQuery( 083 DynamicQuery dynamicQuery, int start, int end) 084 throws SystemException { 085 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 086 } 087 088 /** 089 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 090 */ 091 public static List<Company> findWithDynamicQuery( 092 DynamicQuery dynamicQuery, int start, int end, 093 OrderByComparator orderByComparator) throws SystemException { 094 return getPersistence() 095 .findWithDynamicQuery(dynamicQuery, start, end, 096 orderByComparator); 097 } 098 099 /** 100 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 101 */ 102 public static Company update(Company company) throws SystemException { 103 return getPersistence().update(company); 104 } 105 106 /** 107 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 108 */ 109 public static Company update(Company company, ServiceContext serviceContext) 110 throws SystemException { 111 return getPersistence().update(company, serviceContext); 112 } 113 114 /** 115 * Returns the company where webId = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 116 * 117 * @param webId the web ID 118 * @return the matching company 119 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 120 * @throws SystemException if a system exception occurred 121 */ 122 public static com.liferay.portal.model.Company findByWebId( 123 java.lang.String webId) 124 throws com.liferay.portal.NoSuchCompanyException, 125 com.liferay.portal.kernel.exception.SystemException { 126 return getPersistence().findByWebId(webId); 127 } 128 129 /** 130 * Returns the company where webId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 131 * 132 * @param webId the web ID 133 * @return the matching company, or <code>null</code> if a matching company could not be found 134 * @throws SystemException if a system exception occurred 135 */ 136 public static com.liferay.portal.model.Company fetchByWebId( 137 java.lang.String webId) 138 throws com.liferay.portal.kernel.exception.SystemException { 139 return getPersistence().fetchByWebId(webId); 140 } 141 142 /** 143 * Returns the company where webId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 144 * 145 * @param webId the web ID 146 * @param retrieveFromCache whether to use the finder cache 147 * @return the matching company, or <code>null</code> if a matching company could not be found 148 * @throws SystemException if a system exception occurred 149 */ 150 public static com.liferay.portal.model.Company fetchByWebId( 151 java.lang.String webId, boolean retrieveFromCache) 152 throws com.liferay.portal.kernel.exception.SystemException { 153 return getPersistence().fetchByWebId(webId, retrieveFromCache); 154 } 155 156 /** 157 * Removes the company where webId = ? from the database. 158 * 159 * @param webId the web ID 160 * @return the company that was removed 161 * @throws SystemException if a system exception occurred 162 */ 163 public static com.liferay.portal.model.Company removeByWebId( 164 java.lang.String webId) 165 throws com.liferay.portal.NoSuchCompanyException, 166 com.liferay.portal.kernel.exception.SystemException { 167 return getPersistence().removeByWebId(webId); 168 } 169 170 /** 171 * Returns the number of companies where webId = ?. 172 * 173 * @param webId the web ID 174 * @return the number of matching companies 175 * @throws SystemException if a system exception occurred 176 */ 177 public static int countByWebId(java.lang.String webId) 178 throws com.liferay.portal.kernel.exception.SystemException { 179 return getPersistence().countByWebId(webId); 180 } 181 182 /** 183 * Returns the company where mx = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 184 * 185 * @param mx the mx 186 * @return the matching company 187 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 188 * @throws SystemException if a system exception occurred 189 */ 190 public static com.liferay.portal.model.Company findByMx(java.lang.String mx) 191 throws com.liferay.portal.NoSuchCompanyException, 192 com.liferay.portal.kernel.exception.SystemException { 193 return getPersistence().findByMx(mx); 194 } 195 196 /** 197 * Returns the company where mx = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 198 * 199 * @param mx the mx 200 * @return the matching company, or <code>null</code> if a matching company could not be found 201 * @throws SystemException if a system exception occurred 202 */ 203 public static com.liferay.portal.model.Company fetchByMx( 204 java.lang.String mx) 205 throws com.liferay.portal.kernel.exception.SystemException { 206 return getPersistence().fetchByMx(mx); 207 } 208 209 /** 210 * Returns the company where mx = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 211 * 212 * @param mx the mx 213 * @param retrieveFromCache whether to use the finder cache 214 * @return the matching company, or <code>null</code> if a matching company could not be found 215 * @throws SystemException if a system exception occurred 216 */ 217 public static com.liferay.portal.model.Company fetchByMx( 218 java.lang.String mx, boolean retrieveFromCache) 219 throws com.liferay.portal.kernel.exception.SystemException { 220 return getPersistence().fetchByMx(mx, retrieveFromCache); 221 } 222 223 /** 224 * Removes the company where mx = ? from the database. 225 * 226 * @param mx the mx 227 * @return the company that was removed 228 * @throws SystemException if a system exception occurred 229 */ 230 public static com.liferay.portal.model.Company removeByMx( 231 java.lang.String mx) 232 throws com.liferay.portal.NoSuchCompanyException, 233 com.liferay.portal.kernel.exception.SystemException { 234 return getPersistence().removeByMx(mx); 235 } 236 237 /** 238 * Returns the number of companies where mx = ?. 239 * 240 * @param mx the mx 241 * @return the number of matching companies 242 * @throws SystemException if a system exception occurred 243 */ 244 public static int countByMx(java.lang.String mx) 245 throws com.liferay.portal.kernel.exception.SystemException { 246 return getPersistence().countByMx(mx); 247 } 248 249 /** 250 * Returns the company where logoId = ? or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 251 * 252 * @param logoId the logo ID 253 * @return the matching company 254 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 255 * @throws SystemException if a system exception occurred 256 */ 257 public static com.liferay.portal.model.Company findByLogoId(long logoId) 258 throws com.liferay.portal.NoSuchCompanyException, 259 com.liferay.portal.kernel.exception.SystemException { 260 return getPersistence().findByLogoId(logoId); 261 } 262 263 /** 264 * Returns the company where logoId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 265 * 266 * @param logoId the logo ID 267 * @return the matching company, or <code>null</code> if a matching company could not be found 268 * @throws SystemException if a system exception occurred 269 */ 270 public static com.liferay.portal.model.Company fetchByLogoId(long logoId) 271 throws com.liferay.portal.kernel.exception.SystemException { 272 return getPersistence().fetchByLogoId(logoId); 273 } 274 275 /** 276 * Returns the company where logoId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 277 * 278 * @param logoId the logo ID 279 * @param retrieveFromCache whether to use the finder cache 280 * @return the matching company, or <code>null</code> if a matching company could not be found 281 * @throws SystemException if a system exception occurred 282 */ 283 public static com.liferay.portal.model.Company fetchByLogoId(long logoId, 284 boolean retrieveFromCache) 285 throws com.liferay.portal.kernel.exception.SystemException { 286 return getPersistence().fetchByLogoId(logoId, retrieveFromCache); 287 } 288 289 /** 290 * Removes the company where logoId = ? from the database. 291 * 292 * @param logoId the logo ID 293 * @return the company that was removed 294 * @throws SystemException if a system exception occurred 295 */ 296 public static com.liferay.portal.model.Company removeByLogoId(long logoId) 297 throws com.liferay.portal.NoSuchCompanyException, 298 com.liferay.portal.kernel.exception.SystemException { 299 return getPersistence().removeByLogoId(logoId); 300 } 301 302 /** 303 * Returns the number of companies where logoId = ?. 304 * 305 * @param logoId the logo ID 306 * @return the number of matching companies 307 * @throws SystemException if a system exception occurred 308 */ 309 public static int countByLogoId(long logoId) 310 throws com.liferay.portal.kernel.exception.SystemException { 311 return getPersistence().countByLogoId(logoId); 312 } 313 314 /** 315 * Returns all the companies where system = ?. 316 * 317 * @param system the system 318 * @return the matching companies 319 * @throws SystemException if a system exception occurred 320 */ 321 public static java.util.List<com.liferay.portal.model.Company> findBySystem( 322 boolean system) 323 throws com.liferay.portal.kernel.exception.SystemException { 324 return getPersistence().findBySystem(system); 325 } 326 327 /** 328 * Returns a range of all the companies where system = ?. 329 * 330 * <p> 331 * 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. 332 * </p> 333 * 334 * @param system the system 335 * @param start the lower bound of the range of companies 336 * @param end the upper bound of the range of companies (not inclusive) 337 * @return the range of matching companies 338 * @throws SystemException if a system exception occurred 339 */ 340 public static java.util.List<com.liferay.portal.model.Company> findBySystem( 341 boolean system, int start, int end) 342 throws com.liferay.portal.kernel.exception.SystemException { 343 return getPersistence().findBySystem(system, start, end); 344 } 345 346 /** 347 * Returns an ordered range of all the companies where system = ?. 348 * 349 * <p> 350 * 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. 351 * </p> 352 * 353 * @param system the system 354 * @param start the lower bound of the range of companies 355 * @param end the upper bound of the range of companies (not inclusive) 356 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 357 * @return the ordered range of matching companies 358 * @throws SystemException if a system exception occurred 359 */ 360 public static java.util.List<com.liferay.portal.model.Company> findBySystem( 361 boolean system, int start, int end, 362 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 363 throws com.liferay.portal.kernel.exception.SystemException { 364 return getPersistence() 365 .findBySystem(system, start, end, orderByComparator); 366 } 367 368 /** 369 * Returns the first company in the ordered set where system = ?. 370 * 371 * @param system the system 372 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 373 * @return the first matching company 374 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 375 * @throws SystemException if a system exception occurred 376 */ 377 public static com.liferay.portal.model.Company findBySystem_First( 378 boolean system, 379 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 380 throws com.liferay.portal.NoSuchCompanyException, 381 com.liferay.portal.kernel.exception.SystemException { 382 return getPersistence().findBySystem_First(system, orderByComparator); 383 } 384 385 /** 386 * Returns the first company in the ordered set where system = ?. 387 * 388 * @param system the system 389 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 390 * @return the first matching company, or <code>null</code> if a matching company could not be found 391 * @throws SystemException if a system exception occurred 392 */ 393 public static com.liferay.portal.model.Company fetchBySystem_First( 394 boolean system, 395 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 396 throws com.liferay.portal.kernel.exception.SystemException { 397 return getPersistence().fetchBySystem_First(system, orderByComparator); 398 } 399 400 /** 401 * Returns the last company in the ordered set where system = ?. 402 * 403 * @param system the system 404 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 405 * @return the last matching company 406 * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found 407 * @throws SystemException if a system exception occurred 408 */ 409 public static com.liferay.portal.model.Company findBySystem_Last( 410 boolean system, 411 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 412 throws com.liferay.portal.NoSuchCompanyException, 413 com.liferay.portal.kernel.exception.SystemException { 414 return getPersistence().findBySystem_Last(system, orderByComparator); 415 } 416 417 /** 418 * Returns the last company in the ordered set where system = ?. 419 * 420 * @param system the system 421 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 422 * @return the last matching company, or <code>null</code> if a matching company could not be found 423 * @throws SystemException if a system exception occurred 424 */ 425 public static com.liferay.portal.model.Company fetchBySystem_Last( 426 boolean system, 427 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 428 throws com.liferay.portal.kernel.exception.SystemException { 429 return getPersistence().fetchBySystem_Last(system, orderByComparator); 430 } 431 432 /** 433 * Returns the companies before and after the current company in the ordered set where system = ?. 434 * 435 * @param companyId the primary key of the current company 436 * @param system the system 437 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 438 * @return the previous, current, and next company 439 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 440 * @throws SystemException if a system exception occurred 441 */ 442 public static com.liferay.portal.model.Company[] findBySystem_PrevAndNext( 443 long companyId, boolean system, 444 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 445 throws com.liferay.portal.NoSuchCompanyException, 446 com.liferay.portal.kernel.exception.SystemException { 447 return getPersistence() 448 .findBySystem_PrevAndNext(companyId, system, 449 orderByComparator); 450 } 451 452 /** 453 * Removes all the companies where system = ? from the database. 454 * 455 * @param system the system 456 * @throws SystemException if a system exception occurred 457 */ 458 public static void removeBySystem(boolean system) 459 throws com.liferay.portal.kernel.exception.SystemException { 460 getPersistence().removeBySystem(system); 461 } 462 463 /** 464 * Returns the number of companies where system = ?. 465 * 466 * @param system the system 467 * @return the number of matching companies 468 * @throws SystemException if a system exception occurred 469 */ 470 public static int countBySystem(boolean system) 471 throws com.liferay.portal.kernel.exception.SystemException { 472 return getPersistence().countBySystem(system); 473 } 474 475 /** 476 * Caches the company in the entity cache if it is enabled. 477 * 478 * @param company the company 479 */ 480 public static void cacheResult(com.liferay.portal.model.Company company) { 481 getPersistence().cacheResult(company); 482 } 483 484 /** 485 * Caches the companies in the entity cache if it is enabled. 486 * 487 * @param companies the companies 488 */ 489 public static void cacheResult( 490 java.util.List<com.liferay.portal.model.Company> companies) { 491 getPersistence().cacheResult(companies); 492 } 493 494 /** 495 * Creates a new company with the primary key. Does not add the company to the database. 496 * 497 * @param companyId the primary key for the new company 498 * @return the new company 499 */ 500 public static com.liferay.portal.model.Company create(long companyId) { 501 return getPersistence().create(companyId); 502 } 503 504 /** 505 * Removes the company with the primary key from the database. Also notifies the appropriate model listeners. 506 * 507 * @param companyId the primary key of the company 508 * @return the company that was removed 509 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 510 * @throws SystemException if a system exception occurred 511 */ 512 public static com.liferay.portal.model.Company remove(long companyId) 513 throws com.liferay.portal.NoSuchCompanyException, 514 com.liferay.portal.kernel.exception.SystemException { 515 return getPersistence().remove(companyId); 516 } 517 518 public static com.liferay.portal.model.Company updateImpl( 519 com.liferay.portal.model.Company company) 520 throws com.liferay.portal.kernel.exception.SystemException { 521 return getPersistence().updateImpl(company); 522 } 523 524 /** 525 * Returns the company with the primary key or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found. 526 * 527 * @param companyId the primary key of the company 528 * @return the company 529 * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found 530 * @throws SystemException if a system exception occurred 531 */ 532 public static com.liferay.portal.model.Company findByPrimaryKey( 533 long companyId) 534 throws com.liferay.portal.NoSuchCompanyException, 535 com.liferay.portal.kernel.exception.SystemException { 536 return getPersistence().findByPrimaryKey(companyId); 537 } 538 539 /** 540 * Returns the company with the primary key or returns <code>null</code> if it could not be found. 541 * 542 * @param companyId the primary key of the company 543 * @return the company, or <code>null</code> if a company with the primary key could not be found 544 * @throws SystemException if a system exception occurred 545 */ 546 public static com.liferay.portal.model.Company fetchByPrimaryKey( 547 long companyId) 548 throws com.liferay.portal.kernel.exception.SystemException { 549 return getPersistence().fetchByPrimaryKey(companyId); 550 } 551 552 /** 553 * Returns all the companies. 554 * 555 * @return the companies 556 * @throws SystemException if a system exception occurred 557 */ 558 public static java.util.List<com.liferay.portal.model.Company> findAll() 559 throws com.liferay.portal.kernel.exception.SystemException { 560 return getPersistence().findAll(); 561 } 562 563 /** 564 * Returns a range of all the companies. 565 * 566 * <p> 567 * 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. 568 * </p> 569 * 570 * @param start the lower bound of the range of companies 571 * @param end the upper bound of the range of companies (not inclusive) 572 * @return the range of companies 573 * @throws SystemException if a system exception occurred 574 */ 575 public static java.util.List<com.liferay.portal.model.Company> findAll( 576 int start, int end) 577 throws com.liferay.portal.kernel.exception.SystemException { 578 return getPersistence().findAll(start, end); 579 } 580 581 /** 582 * Returns an ordered range of all the companies. 583 * 584 * <p> 585 * 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. 586 * </p> 587 * 588 * @param start the lower bound of the range of companies 589 * @param end the upper bound of the range of companies (not inclusive) 590 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 591 * @return the ordered range of companies 592 * @throws SystemException if a system exception occurred 593 */ 594 public static java.util.List<com.liferay.portal.model.Company> findAll( 595 int start, int end, 596 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 597 throws com.liferay.portal.kernel.exception.SystemException { 598 return getPersistence().findAll(start, end, orderByComparator); 599 } 600 601 /** 602 * Removes all the companies from the database. 603 * 604 * @throws SystemException if a system exception occurred 605 */ 606 public static void removeAll() 607 throws com.liferay.portal.kernel.exception.SystemException { 608 getPersistence().removeAll(); 609 } 610 611 /** 612 * Returns the number of companies. 613 * 614 * @return the number of companies 615 * @throws SystemException if a system exception occurred 616 */ 617 public static int countAll() 618 throws com.liferay.portal.kernel.exception.SystemException { 619 return getPersistence().countAll(); 620 } 621 622 public static CompanyPersistence getPersistence() { 623 if (_persistence == null) { 624 _persistence = (CompanyPersistence)PortalBeanLocatorUtil.locate(CompanyPersistence.class.getName()); 625 626 ReferenceRegistry.registerReference(CompanyUtil.class, 627 "_persistence"); 628 } 629 630 return _persistence; 631 } 632 633 /** 634 * @deprecated As of 6.2.0 635 */ 636 public void setPersistence(CompanyPersistence persistence) { 637 } 638 639 private static CompanyPersistence _persistence; 640 }