|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RegionPersistence
The persistence interface for the region service.
Caching information and settings can be found in portal.properties
RegionPersistenceImpl
,
RegionUtil
Method Summary | |
---|---|
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 orderByComparator)
Returns the first region in the ordered set where active = ?. |
Region |
fetchByActive_Last(boolean active,
OrderByComparator orderByComparator)
Returns the last region in the ordered set where active = ?. |
Region |
fetchByC_A_First(long countryId,
boolean active,
OrderByComparator orderByComparator)
Returns the first region in the ordered set where countryId = ? and active = ?. |
Region |
fetchByC_A_Last(long countryId,
boolean active,
OrderByComparator 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 orderByComparator)
Returns the first region in the ordered set where countryId = ?. |
Region |
fetchByCountryId_Last(long countryId,
OrderByComparator 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. |
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 orderByComparator)
Returns an ordered range of all the regions. |
Region |
findByActive_First(boolean active,
OrderByComparator orderByComparator)
Returns the first region in the ordered set where active = ?. |
Region |
findByActive_Last(boolean active,
OrderByComparator orderByComparator)
Returns the last region in the ordered set where active = ?. |
Region[] |
findByActive_PrevAndNext(long regionId,
boolean active,
OrderByComparator 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 orderByComparator)
Returns an ordered range of all the regions where active = ?. |
Region |
findByC_A_First(long countryId,
boolean active,
OrderByComparator orderByComparator)
Returns the first region in the ordered set where countryId = ? and active = ?. |
Region |
findByC_A_Last(long countryId,
boolean active,
OrderByComparator orderByComparator)
Returns the last region in the ordered set where countryId = ? and active = ?. |
Region[] |
findByC_A_PrevAndNext(long regionId,
long countryId,
boolean active,
OrderByComparator 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 orderByComparator)
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 orderByComparator)
Returns the first region in the ordered set where countryId = ?. |
Region |
findByCountryId_Last(long countryId,
OrderByComparator orderByComparator)
Returns the last region in the ordered set where countryId = ?. |
Region[] |
findByCountryId_PrevAndNext(long regionId,
long countryId,
OrderByComparator 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 orderByComparator)
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. |
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,
boolean merge)
|
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence |
---|
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update |
Method Detail |
---|
void cacheResult(Region region)
region
- the regionvoid cacheResult(List<Region> regions)
regions
- the regionsRegion create(long regionId)
regionId
- the primary key for the new region
Region remove(long regionId) throws NoSuchRegionException, SystemException
regionId
- the primary key of the region
NoSuchRegionException
- if a region with the primary key could not be found
SystemException
- if a system exception occurredRegion updateImpl(Region region, boolean merge) throws SystemException
SystemException
Region findByPrimaryKey(long regionId) throws NoSuchRegionException, SystemException
NoSuchRegionException
if it could not be found.
regionId
- the primary key of the region
NoSuchRegionException
- if a region with the primary key could not be found
SystemException
- if a system exception occurredRegion fetchByPrimaryKey(long regionId) throws SystemException
null
if it could not be found.
regionId
- the primary key of the region
null
if a region with the primary key could not be found
SystemException
- if a system exception occurredList<Region> findByCountryId(long countryId) throws SystemException
countryId
- the country ID
SystemException
- if a system exception occurredList<Region> findByCountryId(long countryId, int start, int end) throws SystemException
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.
countryId
- the country IDstart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)
SystemException
- if a system exception occurredList<Region> findByCountryId(long countryId, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
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
)
SystemException
- if a system exception occurredRegion findByCountryId_First(long countryId, OrderByComparator orderByComparator) throws NoSuchRegionException, SystemException
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchRegionException
- if a matching region could not be found
SystemException
- if a system exception occurredRegion fetchByCountryId_First(long countryId, OrderByComparator orderByComparator) throws SystemException
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching region could not be found
SystemException
- if a system exception occurredRegion findByCountryId_Last(long countryId, OrderByComparator orderByComparator) throws NoSuchRegionException, SystemException
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchRegionException
- if a matching region could not be found
SystemException
- if a system exception occurredRegion fetchByCountryId_Last(long countryId, OrderByComparator orderByComparator) throws SystemException
countryId
- the country IDorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching region could not be found
SystemException
- if a system exception occurredRegion[] findByCountryId_PrevAndNext(long regionId, long countryId, OrderByComparator orderByComparator) throws NoSuchRegionException, SystemException
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 found
SystemException
- if a system exception occurredList<Region> findByActive(boolean active) throws SystemException
active
- the active
SystemException
- if a system exception occurredList<Region> findByActive(boolean active, int start, int end) throws SystemException
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.
active
- the activestart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)
SystemException
- if a system exception occurredList<Region> findByActive(boolean active, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
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
)
SystemException
- if a system exception occurredRegion findByActive_First(boolean active, OrderByComparator orderByComparator) throws NoSuchRegionException, SystemException
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchRegionException
- if a matching region could not be found
SystemException
- if a system exception occurredRegion fetchByActive_First(boolean active, OrderByComparator orderByComparator) throws SystemException
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching region could not be found
SystemException
- if a system exception occurredRegion findByActive_Last(boolean active, OrderByComparator orderByComparator) throws NoSuchRegionException, SystemException
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchRegionException
- if a matching region could not be found
SystemException
- if a system exception occurredRegion fetchByActive_Last(boolean active, OrderByComparator orderByComparator) throws SystemException
active
- the activeorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching region could not be found
SystemException
- if a system exception occurredRegion[] findByActive_PrevAndNext(long regionId, boolean active, OrderByComparator orderByComparator) throws NoSuchRegionException, SystemException
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 found
SystemException
- if a system exception occurredRegion findByC_R(long countryId, String regionCode) throws NoSuchRegionException, SystemException
NoSuchRegionException
if it could not be found.
countryId
- the country IDregionCode
- the region code
NoSuchRegionException
- if a matching region could not be found
SystemException
- if a system exception occurredRegion fetchByC_R(long countryId, String regionCode) throws SystemException
null
if it could not be found. Uses the finder cache.
countryId
- the country IDregionCode
- the region code
null
if a matching region could not be found
SystemException
- if a system exception occurredRegion fetchByC_R(long countryId, String regionCode, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
countryId
- the country IDregionCode
- the region coderetrieveFromCache
- whether to use the finder cache
null
if a matching region could not be found
SystemException
- if a system exception occurredList<Region> findByC_A(long countryId, boolean active) throws SystemException
countryId
- the country IDactive
- the active
SystemException
- if a system exception occurredList<Region> findByC_A(long countryId, boolean active, int start, int end) throws SystemException
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.
countryId
- the country IDactive
- the activestart
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)
SystemException
- if a system exception occurredList<Region> findByC_A(long countryId, boolean active, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
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
)
SystemException
- if a system exception occurredRegion findByC_A_First(long countryId, boolean active, OrderByComparator orderByComparator) throws NoSuchRegionException, SystemException
countryId
- the country IDactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchRegionException
- if a matching region could not be found
SystemException
- if a system exception occurredRegion fetchByC_A_First(long countryId, boolean active, OrderByComparator orderByComparator) throws SystemException
countryId
- the country IDactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching region could not be found
SystemException
- if a system exception occurredRegion findByC_A_Last(long countryId, boolean active, OrderByComparator orderByComparator) throws NoSuchRegionException, SystemException
countryId
- the country IDactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchRegionException
- if a matching region could not be found
SystemException
- if a system exception occurredRegion fetchByC_A_Last(long countryId, boolean active, OrderByComparator orderByComparator) throws SystemException
countryId
- the country IDactive
- the activeorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching region could not be found
SystemException
- if a system exception occurredRegion[] findByC_A_PrevAndNext(long regionId, long countryId, boolean active, OrderByComparator orderByComparator) throws NoSuchRegionException, SystemException
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 found
SystemException
- if a system exception occurredList<Region> findAll() throws SystemException
SystemException
- if a system exception occurredList<Region> findAll(int start, int end) throws SystemException
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.
start
- the lower bound of the range of regionsend
- the upper bound of the range of regions (not inclusive)
SystemException
- if a system exception occurredList<Region> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
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
)
SystemException
- if a system exception occurredvoid removeByCountryId(long countryId) throws SystemException
countryId
- the country ID
SystemException
- if a system exception occurredvoid removeByActive(boolean active) throws SystemException
active
- the active
SystemException
- if a system exception occurredRegion removeByC_R(long countryId, String regionCode) throws NoSuchRegionException, SystemException
countryId
- the country IDregionCode
- the region code
SystemException
- if a system exception occurred
NoSuchRegionException
void removeByC_A(long countryId, boolean active) throws SystemException
countryId
- the country IDactive
- the active
SystemException
- if a system exception occurredvoid removeAll() throws SystemException
SystemException
- if a system exception occurredint countByCountryId(long countryId) throws SystemException
countryId
- the country ID
SystemException
- if a system exception occurredint countByActive(boolean active) throws SystemException
active
- the active
SystemException
- if a system exception occurredint countByC_R(long countryId, String regionCode) throws SystemException
countryId
- the country IDregionCode
- the region code
SystemException
- if a system exception occurredint countByC_A(long countryId, boolean active) throws SystemException
countryId
- the country IDactive
- the active
SystemException
- if a system exception occurredint countAll() throws SystemException
SystemException
- if a system exception occurred
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |