@ProviderType public interface RegionPersistence extends BasePersistence<Region>
Caching information and settings can be found in portal.properties
RegionPersistenceImpl
,
RegionUtil
Modifier and Type | Method and Description |
---|---|
void |
cacheResult(List<Region> regions)
Caches the regions in the entity cache if it is enabled.
|
void |
cacheResult(Region region)
Caches the region in the entity cache if it is enabled.
|
int |
countAll()
Returns the number of regions.
|
int |
countByActive(boolean active)
Returns the number of regions where active = ?.
|
int |
countByC_A(long countryId,
boolean active)
Returns the number of regions where countryId = ? and active = ?.
|
int |
countByC_R(long countryId,
String regionCode)
Returns the number of regions where countryId = ? and regionCode = ?.
|
int |
countByCountryId(long countryId)
Returns the number of regions where countryId = ?.
|
Region |
create(long regionId)
Creates a new region with the primary key.
|
Region |
fetchByActive_First(boolean active,
OrderByComparator<Region> orderByComparator)
Returns the first region in the ordered set where active = ?.
|
Region |
fetchByActive_Last(boolean active,
OrderByComparator<Region> orderByComparator)
Returns the last region in the ordered set where active = ?.
|
Region |
fetchByC_A_First(long countryId,
boolean active,
OrderByComparator<Region> orderByComparator)
Returns the first region in the ordered set where countryId = ? and active = ?.
|
Region |
fetchByC_A_Last(long countryId,
boolean active,
OrderByComparator<Region> orderByComparator)
Returns the last region in the ordered set where countryId = ? and active = ?.
|
Region |
fetchByC_R(long countryId,
String regionCode)
Returns the region where countryId = ? and regionCode = ? or returns
null if it could not be found. |
Region |
fetchByC_R(long countryId,
String regionCode,
boolean retrieveFromCache)
Returns the region where countryId = ? and regionCode = ? or returns
null if it could not be found, optionally using the finder cache. |
Region |
fetchByCountryId_First(long countryId,
OrderByComparator<Region> orderByComparator)
Returns the first region in the ordered set where countryId = ?.
|
Region |
fetchByCountryId_Last(long countryId,
OrderByComparator<Region> orderByComparator)
Returns the last region in the ordered set where countryId = ?.
|
Region |
fetchByPrimaryKey(long regionId)
Returns the region with the primary key or returns
null if it could not be found. |
Map<Serializable,Region> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
List<Region> |
findAll()
Returns all the regions.
|
List<Region> |
findAll(int start,
int end)
Returns a range of all the regions.
|
List<Region> |
findAll(int start,
int end,
OrderByComparator<Region> orderByComparator)
Returns an ordered range of all the regions.
|
List<Region> |
findAll(int start,
int end,
OrderByComparator<Region> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the regions.
|
Region |
findByActive_First(boolean active,
OrderByComparator<Region> orderByComparator)
Returns the first region in the ordered set where active = ?.
|
Region |
findByActive_Last(boolean active,
OrderByComparator<Region> orderByComparator)
Returns the last region in the ordered set where active = ?.
|
Region[] |
findByActive_PrevAndNext(long regionId,
boolean active,
OrderByComparator<Region> orderByComparator)
Returns the regions before and after the current region in the ordered set where active = ?.
|
List<Region> |
findByActive(boolean active)
Returns all the regions where active = ?.
|
List<Region> |
findByActive(boolean active,
int start,
int end)
Returns a range of all the regions where active = ?.
|
List<Region> |
findByActive(boolean active,
int start,
int end,
OrderByComparator<Region> orderByComparator)
Returns an ordered range of all the regions where active = ?.
|
List<Region> |
findByActive(boolean active,
int start,
int end,
OrderByComparator<Region> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the regions where active = ?.
|
Region |
findByC_A_First(long countryId,
boolean active,
OrderByComparator<Region> orderByComparator)
Returns the first region in the ordered set where countryId = ? and active = ?.
|
Region |
findByC_A_Last(long countryId,
boolean active,
OrderByComparator<Region> orderByComparator)
Returns the last region in the ordered set where countryId = ? and active = ?.
|
Region[] |
findByC_A_PrevAndNext(long regionId,
long countryId,
boolean active,
OrderByComparator<Region> orderByComparator)
Returns the regions before and after the current region in the ordered set where countryId = ? and active = ?.
|
List<Region> |
findByC_A(long countryId,
boolean active)
Returns all the regions where countryId = ? and active = ?.
|
List<Region> |
findByC_A(long countryId,
boolean active,
int start,
int end)
Returns a range of all the regions where countryId = ? and active = ?.
|
List<Region> |
findByC_A(long countryId,
boolean active,
int start,
int end,
OrderByComparator<Region> orderByComparator)
Returns an ordered range of all the regions where countryId = ? and active = ?.
|
List<Region> |
findByC_A(long countryId,
boolean active,
int start,
int end,
OrderByComparator<Region> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the regions where countryId = ? and active = ?.
|
Region |
findByC_R(long countryId,
String regionCode)
Returns the region where countryId = ? and regionCode = ? or throws a
NoSuchRegionException if it could not be found. |
Region |
findByCountryId_First(long countryId,
OrderByComparator<Region> orderByComparator)
Returns the first region in the ordered set where countryId = ?.
|
Region |
findByCountryId_Last(long countryId,
OrderByComparator<Region> orderByComparator)
Returns the last region in the ordered set where countryId = ?.
|
Region[] |
findByCountryId_PrevAndNext(long regionId,
long countryId,
OrderByComparator<Region> orderByComparator)
Returns the regions before and after the current region in the ordered set where countryId = ?.
|
List<Region> |
findByCountryId(long countryId)
Returns all the regions where countryId = ?.
|
List<Region> |
findByCountryId(long countryId,
int start,
int end)
Returns a range of all the regions where countryId = ?.
|
List<Region> |
findByCountryId(long countryId,
int start,
int end,
OrderByComparator<Region> orderByComparator)
Returns an ordered range of all the regions where countryId = ?.
|
List<Region> |
findByCountryId(long countryId,
int start,
int end,
OrderByComparator<Region> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the regions where countryId = ?.
|
Region |
findByPrimaryKey(long regionId)
Returns the region with the primary key or throws a
NoSuchRegionException if it could not be found. |
Set<String> |
getBadColumnNames() |
Region |
remove(long regionId)
Removes the region with the primary key from the database.
|
void |
removeAll()
Removes all the regions from the database.
|
void |
removeByActive(boolean active)
Removes all the regions where active = ? from the database.
|
void |
removeByC_A(long countryId,
boolean active)
Removes all the regions where countryId = ? and active = ? from the database.
|
Region |
removeByC_R(long countryId,
String regionCode)
Removes the region where countryId = ? and regionCode = ? from the database.
|
void |
removeByCountryId(long countryId)
Removes all the regions where countryId = ? from the database.
|
Region |
updateImpl(Region region) |
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update
List<Region> findByCountryId(long countryId)
countryId
- the country IDList<Region> findByCountryId(long countryId, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
countryId
- the country IDstart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)List<Region> findByCountryId(long countryId, int start, int end, OrderByComparator<Region> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
countryId
- the country IDstart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)List<Region> findByCountryId(long countryId, int start, int end, OrderByComparator<Region> orderByComparator, boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
countryId
- the country IDstart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheRegion findByCountryId_First(long countryId, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionException
- if a matching region could not be foundRegion fetchByCountryId_First(long countryId, OrderByComparator<Region> orderByComparator)
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching region could not be foundRegion findByCountryId_Last(long countryId, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionException
- if a matching region could not be foundRegion fetchByCountryId_Last(long countryId, OrderByComparator<Region> orderByComparator)
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching region could not be foundRegion[] findByCountryId_PrevAndNext(long regionId, long countryId, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
regionId
- the primary key of the current regioncountryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionException
- if a region with the primary key could not be foundvoid removeByCountryId(long countryId)
countryId
- the country IDint countByCountryId(long countryId)
countryId
- the country IDList<Region> findByActive(boolean active)
active
- the activeList<Region> findByActive(boolean active, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
active
- the activestart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)List<Region> findByActive(boolean active, int start, int end, OrderByComparator<Region> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
active
- the activestart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)List<Region> findByActive(boolean active, int start, int end, OrderByComparator<Region> orderByComparator, boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
active
- the activestart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheRegion findByActive_First(boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionException
- if a matching region could not be foundRegion fetchByActive_First(boolean active, OrderByComparator<Region> orderByComparator)
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching region could not be foundRegion findByActive_Last(boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionException
- if a matching region could not be foundRegion fetchByActive_Last(boolean active, OrderByComparator<Region> orderByComparator)
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching region could not be foundRegion[] findByActive_PrevAndNext(long regionId, boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
regionId
- the primary key of the current regionactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionException
- if a region with the primary key could not be foundvoid removeByActive(boolean active)
active
- the activeint countByActive(boolean active)
active
- the activeRegion findByC_R(long countryId, String regionCode) throws NoSuchRegionException
NoSuchRegionException
if it could not be found.countryId
- the country IDregionCode
- the region codeNoSuchRegionException
- if a matching region could not be foundRegion fetchByC_R(long countryId, String regionCode)
null
if it could not be found. Uses the finder cache.countryId
- the country IDregionCode
- the region codenull
if a matching region could not be foundRegion fetchByC_R(long countryId, String regionCode, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.countryId
- the country IDregionCode
- the region coderetrieveFromCache
- whether to retrieve from the finder cachenull
if a matching region could not be foundRegion removeByC_R(long countryId, String regionCode) throws NoSuchRegionException
countryId
- the country IDregionCode
- the region codeNoSuchRegionException
int countByC_R(long countryId, String regionCode)
countryId
- the country IDregionCode
- the region codeList<Region> findByC_A(long countryId, boolean active)
countryId
- the country IDactive
- the activeList<Region> findByC_A(long countryId, boolean active, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
countryId
- the country IDactive
- the activestart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)List<Region> findByC_A(long countryId, boolean active, int start, int end, OrderByComparator<Region> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
countryId
- the country IDactive
- the activestart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)List<Region> findByC_A(long countryId, boolean active, int start, int end, OrderByComparator<Region> orderByComparator, boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
countryId
- the country IDactive
- the activestart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cacheRegion findByC_A_First(long countryId, boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
countryId
- the country IDactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionException
- if a matching region could not be foundRegion fetchByC_A_First(long countryId, boolean active, OrderByComparator<Region> orderByComparator)
countryId
- the country IDactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching region could not be foundRegion findByC_A_Last(long countryId, boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
countryId
- the country IDactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionException
- if a matching region could not be foundRegion fetchByC_A_Last(long countryId, boolean active, OrderByComparator<Region> orderByComparator)
countryId
- the country IDactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching region could not be foundRegion[] findByC_A_PrevAndNext(long regionId, long countryId, boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
regionId
- the primary key of the current regioncountryId
- the country IDactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)NoSuchRegionException
- if a region with the primary key could not be foundvoid removeByC_A(long countryId, boolean active)
countryId
- the country IDactive
- the activeint countByC_A(long countryId, boolean active)
countryId
- the country IDactive
- the activevoid cacheResult(Region region)
region
- the regionvoid cacheResult(List<Region> regions)
regions
- the regionsRegion create(long regionId)
regionId
- the primary key for the new regionRegion remove(long regionId) throws NoSuchRegionException
regionId
- the primary key of the regionNoSuchRegionException
- if a region with the primary key could not be foundRegion findByPrimaryKey(long regionId) throws NoSuchRegionException
NoSuchRegionException
if it could not be found.regionId
- the primary key of the regionNoSuchRegionException
- if a region with the primary key could not be foundRegion fetchByPrimaryKey(long regionId)
null
if it could not be found.regionId
- the primary key of the regionnull
if a region with the primary key could not be foundMap<Serializable,Region> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
fetchByPrimaryKeys
in interface BasePersistence<Region>
List<Region> findAll()
List<Region> findAll(int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
start
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)List<Region> findAll(int start, int end, OrderByComparator<Region> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
start
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)List<Region> findAll(int start, int end, OrderByComparator<Region> orderByComparator, boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from RegionModelImpl
. If both orderByComparator
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.
start
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachevoid removeAll()
int countAll()
Set<String> getBadColumnNames()
getBadColumnNames
in interface BasePersistence<Region>