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