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.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.Region; 020 021 /** 022 * The persistence interface for the region service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see RegionPersistenceImpl 030 * @see RegionUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface RegionPersistence extends BasePersistence<Region> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link RegionUtil} to access the region persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the regions where countryId = ?. 043 * 044 * @param countryId the country ID 045 * @return the matching regions 046 */ 047 public java.util.List<com.liferay.portal.model.Region> findByCountryId( 048 long countryId); 049 050 /** 051 * Returns a range of all the regions where countryId = ?. 052 * 053 * <p> 054 * 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.RegionModelImpl}. 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. 055 * </p> 056 * 057 * @param countryId the country ID 058 * @param start the lower bound of the range of regions 059 * @param end the upper bound of the range of regions (not inclusive) 060 * @return the range of matching regions 061 */ 062 public java.util.List<com.liferay.portal.model.Region> findByCountryId( 063 long countryId, int start, int end); 064 065 /** 066 * Returns an ordered range of all the regions where countryId = ?. 067 * 068 * <p> 069 * 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.RegionModelImpl}. 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. 070 * </p> 071 * 072 * @param countryId the country ID 073 * @param start the lower bound of the range of regions 074 * @param end the upper bound of the range of regions (not inclusive) 075 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 076 * @return the ordered range of matching regions 077 */ 078 public java.util.List<com.liferay.portal.model.Region> findByCountryId( 079 long countryId, int start, int end, 080 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 081 082 /** 083 * Returns the first region in the ordered set where countryId = ?. 084 * 085 * @param countryId the country ID 086 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 087 * @return the first matching region 088 * @throws com.liferay.portal.NoSuchRegionException if a matching region could not be found 089 */ 090 public com.liferay.portal.model.Region findByCountryId_First( 091 long countryId, 092 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator) 093 throws com.liferay.portal.NoSuchRegionException; 094 095 /** 096 * Returns the first region in the ordered set where countryId = ?. 097 * 098 * @param countryId the country ID 099 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 100 * @return the first matching region, or <code>null</code> if a matching region could not be found 101 */ 102 public com.liferay.portal.model.Region fetchByCountryId_First( 103 long countryId, 104 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 105 106 /** 107 * Returns the last region in the ordered set where countryId = ?. 108 * 109 * @param countryId the country ID 110 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 111 * @return the last matching region 112 * @throws com.liferay.portal.NoSuchRegionException if a matching region could not be found 113 */ 114 public com.liferay.portal.model.Region findByCountryId_Last( 115 long countryId, 116 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator) 117 throws com.liferay.portal.NoSuchRegionException; 118 119 /** 120 * Returns the last region in the ordered set where countryId = ?. 121 * 122 * @param countryId the country ID 123 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 124 * @return the last matching region, or <code>null</code> if a matching region could not be found 125 */ 126 public com.liferay.portal.model.Region fetchByCountryId_Last( 127 long countryId, 128 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 129 130 /** 131 * Returns the regions before and after the current region in the ordered set where countryId = ?. 132 * 133 * @param regionId the primary key of the current region 134 * @param countryId the country ID 135 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 136 * @return the previous, current, and next region 137 * @throws com.liferay.portal.NoSuchRegionException if a region with the primary key could not be found 138 */ 139 public com.liferay.portal.model.Region[] findByCountryId_PrevAndNext( 140 long regionId, long countryId, 141 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator) 142 throws com.liferay.portal.NoSuchRegionException; 143 144 /** 145 * Removes all the regions where countryId = ? from the database. 146 * 147 * @param countryId the country ID 148 */ 149 public void removeByCountryId(long countryId); 150 151 /** 152 * Returns the number of regions where countryId = ?. 153 * 154 * @param countryId the country ID 155 * @return the number of matching regions 156 */ 157 public int countByCountryId(long countryId); 158 159 /** 160 * Returns all the regions where active = ?. 161 * 162 * @param active the active 163 * @return the matching regions 164 */ 165 public java.util.List<com.liferay.portal.model.Region> findByActive( 166 boolean active); 167 168 /** 169 * Returns a range of all the regions where active = ?. 170 * 171 * <p> 172 * 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.RegionModelImpl}. 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. 173 * </p> 174 * 175 * @param active the active 176 * @param start the lower bound of the range of regions 177 * @param end the upper bound of the range of regions (not inclusive) 178 * @return the range of matching regions 179 */ 180 public java.util.List<com.liferay.portal.model.Region> findByActive( 181 boolean active, int start, int end); 182 183 /** 184 * Returns an ordered range of all the regions where active = ?. 185 * 186 * <p> 187 * 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.RegionModelImpl}. 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. 188 * </p> 189 * 190 * @param active the active 191 * @param start the lower bound of the range of regions 192 * @param end the upper bound of the range of regions (not inclusive) 193 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 194 * @return the ordered range of matching regions 195 */ 196 public java.util.List<com.liferay.portal.model.Region> findByActive( 197 boolean active, int start, int end, 198 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 199 200 /** 201 * Returns the first region in the ordered set where active = ?. 202 * 203 * @param active the active 204 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 205 * @return the first matching region 206 * @throws com.liferay.portal.NoSuchRegionException if a matching region could not be found 207 */ 208 public com.liferay.portal.model.Region findByActive_First(boolean active, 209 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator) 210 throws com.liferay.portal.NoSuchRegionException; 211 212 /** 213 * Returns the first region in the ordered set where active = ?. 214 * 215 * @param active the active 216 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 217 * @return the first matching region, or <code>null</code> if a matching region could not be found 218 */ 219 public com.liferay.portal.model.Region fetchByActive_First(boolean active, 220 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 221 222 /** 223 * Returns the last region in the ordered set where active = ?. 224 * 225 * @param active the active 226 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 227 * @return the last matching region 228 * @throws com.liferay.portal.NoSuchRegionException if a matching region could not be found 229 */ 230 public com.liferay.portal.model.Region findByActive_Last(boolean active, 231 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator) 232 throws com.liferay.portal.NoSuchRegionException; 233 234 /** 235 * Returns the last region in the ordered set where active = ?. 236 * 237 * @param active the active 238 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 239 * @return the last matching region, or <code>null</code> if a matching region could not be found 240 */ 241 public com.liferay.portal.model.Region fetchByActive_Last(boolean active, 242 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 243 244 /** 245 * Returns the regions before and after the current region in the ordered set where active = ?. 246 * 247 * @param regionId the primary key of the current region 248 * @param active the active 249 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 250 * @return the previous, current, and next region 251 * @throws com.liferay.portal.NoSuchRegionException if a region with the primary key could not be found 252 */ 253 public com.liferay.portal.model.Region[] findByActive_PrevAndNext( 254 long regionId, boolean active, 255 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator) 256 throws com.liferay.portal.NoSuchRegionException; 257 258 /** 259 * Removes all the regions where active = ? from the database. 260 * 261 * @param active the active 262 */ 263 public void removeByActive(boolean active); 264 265 /** 266 * Returns the number of regions where active = ?. 267 * 268 * @param active the active 269 * @return the number of matching regions 270 */ 271 public int countByActive(boolean active); 272 273 /** 274 * Returns the region where countryId = ? and regionCode = ? or throws a {@link com.liferay.portal.NoSuchRegionException} if it could not be found. 275 * 276 * @param countryId the country ID 277 * @param regionCode the region code 278 * @return the matching region 279 * @throws com.liferay.portal.NoSuchRegionException if a matching region could not be found 280 */ 281 public com.liferay.portal.model.Region findByC_R(long countryId, 282 java.lang.String regionCode) 283 throws com.liferay.portal.NoSuchRegionException; 284 285 /** 286 * Returns the region where countryId = ? and regionCode = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 287 * 288 * @param countryId the country ID 289 * @param regionCode the region code 290 * @return the matching region, or <code>null</code> if a matching region could not be found 291 */ 292 public com.liferay.portal.model.Region fetchByC_R(long countryId, 293 java.lang.String regionCode); 294 295 /** 296 * Returns the region where countryId = ? and regionCode = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 297 * 298 * @param countryId the country ID 299 * @param regionCode the region code 300 * @param retrieveFromCache whether to use the finder cache 301 * @return the matching region, or <code>null</code> if a matching region could not be found 302 */ 303 public com.liferay.portal.model.Region fetchByC_R(long countryId, 304 java.lang.String regionCode, boolean retrieveFromCache); 305 306 /** 307 * Removes the region where countryId = ? and regionCode = ? from the database. 308 * 309 * @param countryId the country ID 310 * @param regionCode the region code 311 * @return the region that was removed 312 */ 313 public com.liferay.portal.model.Region removeByC_R(long countryId, 314 java.lang.String regionCode) 315 throws com.liferay.portal.NoSuchRegionException; 316 317 /** 318 * Returns the number of regions where countryId = ? and regionCode = ?. 319 * 320 * @param countryId the country ID 321 * @param regionCode the region code 322 * @return the number of matching regions 323 */ 324 public int countByC_R(long countryId, java.lang.String regionCode); 325 326 /** 327 * Returns all the regions where countryId = ? and active = ?. 328 * 329 * @param countryId the country ID 330 * @param active the active 331 * @return the matching regions 332 */ 333 public java.util.List<com.liferay.portal.model.Region> findByC_A( 334 long countryId, boolean active); 335 336 /** 337 * Returns a range of all the regions where countryId = ? and active = ?. 338 * 339 * <p> 340 * 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.RegionModelImpl}. 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. 341 * </p> 342 * 343 * @param countryId the country ID 344 * @param active the active 345 * @param start the lower bound of the range of regions 346 * @param end the upper bound of the range of regions (not inclusive) 347 * @return the range of matching regions 348 */ 349 public java.util.List<com.liferay.portal.model.Region> findByC_A( 350 long countryId, boolean active, int start, int end); 351 352 /** 353 * Returns an ordered range of all the regions where countryId = ? and active = ?. 354 * 355 * <p> 356 * 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.RegionModelImpl}. 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. 357 * </p> 358 * 359 * @param countryId the country ID 360 * @param active the active 361 * @param start the lower bound of the range of regions 362 * @param end the upper bound of the range of regions (not inclusive) 363 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 364 * @return the ordered range of matching regions 365 */ 366 public java.util.List<com.liferay.portal.model.Region> findByC_A( 367 long countryId, boolean active, int start, int end, 368 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 369 370 /** 371 * Returns the first region in the ordered set where countryId = ? and active = ?. 372 * 373 * @param countryId the country ID 374 * @param active the active 375 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 376 * @return the first matching region 377 * @throws com.liferay.portal.NoSuchRegionException if a matching region could not be found 378 */ 379 public com.liferay.portal.model.Region findByC_A_First(long countryId, 380 boolean active, 381 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator) 382 throws com.liferay.portal.NoSuchRegionException; 383 384 /** 385 * Returns the first region in the ordered set where countryId = ? and active = ?. 386 * 387 * @param countryId the country ID 388 * @param active the active 389 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 390 * @return the first matching region, or <code>null</code> if a matching region could not be found 391 */ 392 public com.liferay.portal.model.Region fetchByC_A_First(long countryId, 393 boolean active, 394 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 395 396 /** 397 * Returns the last region in the ordered set where countryId = ? and active = ?. 398 * 399 * @param countryId the country ID 400 * @param active the active 401 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 402 * @return the last matching region 403 * @throws com.liferay.portal.NoSuchRegionException if a matching region could not be found 404 */ 405 public com.liferay.portal.model.Region findByC_A_Last(long countryId, 406 boolean active, 407 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator) 408 throws com.liferay.portal.NoSuchRegionException; 409 410 /** 411 * Returns the last region in the ordered set where countryId = ? and active = ?. 412 * 413 * @param countryId the country ID 414 * @param active the active 415 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 416 * @return the last matching region, or <code>null</code> if a matching region could not be found 417 */ 418 public com.liferay.portal.model.Region fetchByC_A_Last(long countryId, 419 boolean active, 420 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 421 422 /** 423 * Returns the regions before and after the current region in the ordered set where countryId = ? and active = ?. 424 * 425 * @param regionId the primary key of the current region 426 * @param countryId the country ID 427 * @param active the active 428 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 429 * @return the previous, current, and next region 430 * @throws com.liferay.portal.NoSuchRegionException if a region with the primary key could not be found 431 */ 432 public com.liferay.portal.model.Region[] findByC_A_PrevAndNext( 433 long regionId, long countryId, boolean active, 434 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator) 435 throws com.liferay.portal.NoSuchRegionException; 436 437 /** 438 * Removes all the regions where countryId = ? and active = ? from the database. 439 * 440 * @param countryId the country ID 441 * @param active the active 442 */ 443 public void removeByC_A(long countryId, boolean active); 444 445 /** 446 * Returns the number of regions where countryId = ? and active = ?. 447 * 448 * @param countryId the country ID 449 * @param active the active 450 * @return the number of matching regions 451 */ 452 public int countByC_A(long countryId, boolean active); 453 454 /** 455 * Caches the region in the entity cache if it is enabled. 456 * 457 * @param region the region 458 */ 459 public void cacheResult(com.liferay.portal.model.Region region); 460 461 /** 462 * Caches the regions in the entity cache if it is enabled. 463 * 464 * @param regions the regions 465 */ 466 public void cacheResult( 467 java.util.List<com.liferay.portal.model.Region> regions); 468 469 /** 470 * Creates a new region with the primary key. Does not add the region to the database. 471 * 472 * @param regionId the primary key for the new region 473 * @return the new region 474 */ 475 public com.liferay.portal.model.Region create(long regionId); 476 477 /** 478 * Removes the region with the primary key from the database. Also notifies the appropriate model listeners. 479 * 480 * @param regionId the primary key of the region 481 * @return the region that was removed 482 * @throws com.liferay.portal.NoSuchRegionException if a region with the primary key could not be found 483 */ 484 public com.liferay.portal.model.Region remove(long regionId) 485 throws com.liferay.portal.NoSuchRegionException; 486 487 public com.liferay.portal.model.Region updateImpl( 488 com.liferay.portal.model.Region region); 489 490 /** 491 * Returns the region with the primary key or throws a {@link com.liferay.portal.NoSuchRegionException} if it could not be found. 492 * 493 * @param regionId the primary key of the region 494 * @return the region 495 * @throws com.liferay.portal.NoSuchRegionException if a region with the primary key could not be found 496 */ 497 public com.liferay.portal.model.Region findByPrimaryKey(long regionId) 498 throws com.liferay.portal.NoSuchRegionException; 499 500 /** 501 * Returns the region with the primary key or returns <code>null</code> if it could not be found. 502 * 503 * @param regionId the primary key of the region 504 * @return the region, or <code>null</code> if a region with the primary key could not be found 505 */ 506 public com.liferay.portal.model.Region fetchByPrimaryKey(long regionId); 507 508 @Override 509 public java.util.Map<java.io.Serializable, com.liferay.portal.model.Region> fetchByPrimaryKeys( 510 java.util.Set<java.io.Serializable> primaryKeys); 511 512 /** 513 * Returns all the regions. 514 * 515 * @return the regions 516 */ 517 public java.util.List<com.liferay.portal.model.Region> findAll(); 518 519 /** 520 * Returns a range of all the regions. 521 * 522 * <p> 523 * 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.RegionModelImpl}. 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. 524 * </p> 525 * 526 * @param start the lower bound of the range of regions 527 * @param end the upper bound of the range of regions (not inclusive) 528 * @return the range of regions 529 */ 530 public java.util.List<com.liferay.portal.model.Region> findAll(int start, 531 int end); 532 533 /** 534 * Returns an ordered range of all the regions. 535 * 536 * <p> 537 * 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.RegionModelImpl}. 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. 538 * </p> 539 * 540 * @param start the lower bound of the range of regions 541 * @param end the upper bound of the range of regions (not inclusive) 542 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 543 * @return the ordered range of regions 544 */ 545 public java.util.List<com.liferay.portal.model.Region> findAll(int start, 546 int end, 547 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Region> orderByComparator); 548 549 /** 550 * Removes all the regions from the database. 551 */ 552 public void removeAll(); 553 554 /** 555 * Returns the number of regions. 556 * 557 * @return the number of regions 558 */ 559 public int countAll(); 560 }