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