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