Liferay 6.0.5

com.liferay.portal.service.persistence
Interface RegionPersistence

All Superinterfaces:
BasePersistence<Region>
All Known Implementing Classes:
RegionPersistenceImpl

public interface RegionPersistence
extends BasePersistence<Region>

The persistence interface for the region service.

Never modify or reference this interface directly. Always use RegionUtil to access the region persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface.

Caching information and settings can be found in portal.properties

See Also:
RegionPersistenceImpl, RegionUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

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()
          Counts all the regions.
 int countByActive(boolean active)
          Counts all the regions where active = ?.
 int countByC_A(long countryId, boolean active)
          Counts all the regions where countryId = ? and active = ?.
 int countByCountryId(long countryId)
          Counts all the regions where countryId = ?.
 Region create(long regionId)
          Creates a new region with the primary key.
 Region fetchByPrimaryKey(long regionId)
          Finds the region with the primary key or returns null if it could not be found.
 List<Region> findAll()
          Finds all the regions.
 List<Region> findAll(int start, int end)
          Finds a range of all the regions.
 List<Region> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the regions.
 Region findByActive_First(boolean active, OrderByComparator orderByComparator)
          Finds the first region in the ordered set where active = ?.
 Region findByActive_Last(boolean active, OrderByComparator orderByComparator)
          Finds the last region in the ordered set where active = ?.
 Region[] findByActive_PrevAndNext(long regionId, boolean active, OrderByComparator orderByComparator)
          Finds the regions before and after the current region in the ordered set where active = ?.
 List<Region> findByActive(boolean active)
          Finds all the regions where active = ?.
 List<Region> findByActive(boolean active, int start, int end)
          Finds a range of all the regions where active = ?.
 List<Region> findByActive(boolean active, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the regions where active = ?.
 Region findByC_A_First(long countryId, boolean active, OrderByComparator orderByComparator)
          Finds the first region in the ordered set where countryId = ? and active = ?.
 Region findByC_A_Last(long countryId, boolean active, OrderByComparator orderByComparator)
          Finds the last region in the ordered set where countryId = ? and active = ?.
 Region[] findByC_A_PrevAndNext(long regionId, long countryId, boolean active, OrderByComparator orderByComparator)
          Finds the regions before and after the current region in the ordered set where countryId = ? and active = ?.
 List<Region> findByC_A(long countryId, boolean active)
          Finds all the regions where countryId = ? and active = ?.
 List<Region> findByC_A(long countryId, boolean active, int start, int end)
          Finds a range of all the regions where countryId = ? and active = ?.
 List<Region> findByC_A(long countryId, boolean active, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the regions where countryId = ? and active = ?.
 Region findByCountryId_First(long countryId, OrderByComparator orderByComparator)
          Finds the first region in the ordered set where countryId = ?.
 Region findByCountryId_Last(long countryId, OrderByComparator orderByComparator)
          Finds the last region in the ordered set where countryId = ?.
 Region[] findByCountryId_PrevAndNext(long regionId, long countryId, OrderByComparator orderByComparator)
          Finds the regions before and after the current region in the ordered set where countryId = ?.
 List<Region> findByCountryId(long countryId)
          Finds all the regions where countryId = ?.
 List<Region> findByCountryId(long countryId, int start, int end)
          Finds a range of all the regions where countryId = ?.
 List<Region> findByCountryId(long countryId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the regions where countryId = ?.
 Region findByPrimaryKey(long regionId)
          Finds 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.
 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, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, registerListener, remove, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

void cacheResult(Region region)
Caches the region in the entity cache if it is enabled.

Parameters:
region - the region to cache

cacheResult

void cacheResult(List<Region> regions)
Caches the regions in the entity cache if it is enabled.

Parameters:
regions - the regions to cache

create

Region create(long regionId)
Creates a new region with the primary key. Does not add the region to the database.

Parameters:
regionId - the primary key for the new region
Returns:
the new region

remove

Region remove(long regionId)
              throws NoSuchRegionException,
                     SystemException
Removes the region with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
regionId - the primary key of the region to remove
Returns:
the region that was removed
Throws:
NoSuchRegionException - if a region with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

Region updateImpl(Region region,
                  boolean merge)
                  throws SystemException
Throws:
SystemException

findByPrimaryKey

Region findByPrimaryKey(long regionId)
                        throws NoSuchRegionException,
                               SystemException
Finds the region with the primary key or throws a NoSuchRegionException if it could not be found.

Parameters:
regionId - the primary key of the region to find
Returns:
the region
Throws:
NoSuchRegionException - if a region with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

Region fetchByPrimaryKey(long regionId)
                         throws SystemException
Finds the region with the primary key or returns null if it could not be found.

Parameters:
regionId - the primary key of the region to find
Returns:
the region, or null if a region with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByCountryId

List<Region> findByCountryId(long countryId)
                             throws SystemException
Finds all the regions where countryId = ?.

Parameters:
countryId - the country id to search with
Returns:
the matching regions
Throws:
SystemException - if a system exception occurred

findByCountryId

List<Region> findByCountryId(long countryId,
                             int start,
                             int end)
                             throws SystemException
Finds a range of all the regions where countryId = ?.

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.

Parameters:
countryId - the country id to search with
start - the lower bound of the range of regions to return
end - the upper bound of the range of regions to return (not inclusive)
Returns:
the range of matching regions
Throws:
SystemException - if a system exception occurred

findByCountryId

List<Region> findByCountryId(long countryId,
                             int start,
                             int end,
                             OrderByComparator orderByComparator)
                             throws SystemException
Finds an ordered range of all the regions where countryId = ?.

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.

Parameters:
countryId - the country id to search with
start - the lower bound of the range of regions to return
end - the upper bound of the range of regions to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching regions
Throws:
SystemException - if a system exception occurred

findByCountryId_First

Region findByCountryId_First(long countryId,
                             OrderByComparator orderByComparator)
                             throws NoSuchRegionException,
                                    SystemException
Finds the first region in the ordered set where countryId = ?.

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.

Parameters:
countryId - the country id to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

findByCountryId_Last

Region findByCountryId_Last(long countryId,
                            OrderByComparator orderByComparator)
                            throws NoSuchRegionException,
                                   SystemException
Finds the last region in the ordered set where countryId = ?.

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.

Parameters:
countryId - the country id to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

findByCountryId_PrevAndNext

Region[] findByCountryId_PrevAndNext(long regionId,
                                     long countryId,
                                     OrderByComparator orderByComparator)
                                     throws NoSuchRegionException,
                                            SystemException
Finds the regions before and after the current region in the ordered set where countryId = ?.

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.

Parameters:
regionId - the primary key of the current region
countryId - the country id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next region
Throws:
NoSuchRegionException - if a region with the primary key could not be found
SystemException - if a system exception occurred

findByActive

List<Region> findByActive(boolean active)
                          throws SystemException
Finds all the regions where active = ?.

Parameters:
active - the active to search with
Returns:
the matching regions
Throws:
SystemException - if a system exception occurred

findByActive

List<Region> findByActive(boolean active,
                          int start,
                          int end)
                          throws SystemException
Finds a range of all the regions where active = ?.

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.

Parameters:
active - the active to search with
start - the lower bound of the range of regions to return
end - the upper bound of the range of regions to return (not inclusive)
Returns:
the range of matching regions
Throws:
SystemException - if a system exception occurred

findByActive

List<Region> findByActive(boolean active,
                          int start,
                          int end,
                          OrderByComparator orderByComparator)
                          throws SystemException
Finds an ordered range of all the regions where active = ?.

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.

Parameters:
active - the active to search with
start - the lower bound of the range of regions to return
end - the upper bound of the range of regions to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching regions
Throws:
SystemException - if a system exception occurred

findByActive_First

Region findByActive_First(boolean active,
                          OrderByComparator orderByComparator)
                          throws NoSuchRegionException,
                                 SystemException
Finds the first region in the ordered set where active = ?.

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.

Parameters:
active - the active to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

findByActive_Last

Region findByActive_Last(boolean active,
                         OrderByComparator orderByComparator)
                         throws NoSuchRegionException,
                                SystemException
Finds the last region in the ordered set where active = ?.

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.

Parameters:
active - the active to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

findByActive_PrevAndNext

Region[] findByActive_PrevAndNext(long regionId,
                                  boolean active,
                                  OrderByComparator orderByComparator)
                                  throws NoSuchRegionException,
                                         SystemException
Finds the regions before and after the current region in the ordered set where active = ?.

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.

Parameters:
regionId - the primary key of the current region
active - the active to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next region
Throws:
NoSuchRegionException - if a region with the primary key could not be found
SystemException - if a system exception occurred

findByC_A

List<Region> findByC_A(long countryId,
                       boolean active)
                       throws SystemException
Finds all the regions where countryId = ? and active = ?.

Parameters:
countryId - the country id to search with
active - the active to search with
Returns:
the matching regions
Throws:
SystemException - if a system exception occurred

findByC_A

List<Region> findByC_A(long countryId,
                       boolean active,
                       int start,
                       int end)
                       throws SystemException
Finds a range of all the regions where countryId = ? and active = ?.

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.

Parameters:
countryId - the country id to search with
active - the active to search with
start - the lower bound of the range of regions to return
end - the upper bound of the range of regions to return (not inclusive)
Returns:
the range of matching regions
Throws:
SystemException - if a system exception occurred

findByC_A

List<Region> findByC_A(long countryId,
                       boolean active,
                       int start,
                       int end,
                       OrderByComparator orderByComparator)
                       throws SystemException
Finds an ordered range of all the regions where countryId = ? and active = ?.

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.

Parameters:
countryId - the country id to search with
active - the active to search with
start - the lower bound of the range of regions to return
end - the upper bound of the range of regions to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching regions
Throws:
SystemException - if a system exception occurred

findByC_A_First

Region findByC_A_First(long countryId,
                       boolean active,
                       OrderByComparator orderByComparator)
                       throws NoSuchRegionException,
                              SystemException
Finds the first region in the ordered set where countryId = ? and active = ?.

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.

Parameters:
countryId - the country id to search with
active - the active to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

findByC_A_Last

Region findByC_A_Last(long countryId,
                      boolean active,
                      OrderByComparator orderByComparator)
                      throws NoSuchRegionException,
                             SystemException
Finds the last region in the ordered set where countryId = ? and active = ?.

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.

Parameters:
countryId - the country id to search with
active - the active to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

findByC_A_PrevAndNext

Region[] findByC_A_PrevAndNext(long regionId,
                               long countryId,
                               boolean active,
                               OrderByComparator orderByComparator)
                               throws NoSuchRegionException,
                                      SystemException
Finds the regions before and after the current region in the ordered set where countryId = ? and active = ?.

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.

Parameters:
regionId - the primary key of the current region
countryId - the country id to search with
active - the active to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next region
Throws:
NoSuchRegionException - if a region with the primary key could not be found
SystemException - if a system exception occurred

findAll

List<Region> findAll()
                     throws SystemException
Finds all the regions.

Returns:
the regions
Throws:
SystemException - if a system exception occurred

findAll

List<Region> findAll(int start,
                     int end)
                     throws SystemException
Finds a range of all the regions.

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.

Parameters:
start - the lower bound of the range of regions to return
end - the upper bound of the range of regions to return (not inclusive)
Returns:
the range of regions
Throws:
SystemException - if a system exception occurred

findAll

List<Region> findAll(int start,
                     int end,
                     OrderByComparator orderByComparator)
                     throws SystemException
Finds an ordered range of all the regions.

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.

Parameters:
start - the lower bound of the range of regions to return
end - the upper bound of the range of regions to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of regions
Throws:
SystemException - if a system exception occurred

removeByCountryId

void removeByCountryId(long countryId)
                       throws SystemException
Removes all the regions where countryId = ? from the database.

Parameters:
countryId - the country id to search with
Throws:
SystemException - if a system exception occurred

removeByActive

void removeByActive(boolean active)
                    throws SystemException
Removes all the regions where active = ? from the database.

Parameters:
active - the active to search with
Throws:
SystemException - if a system exception occurred

removeByC_A

void removeByC_A(long countryId,
                 boolean active)
                 throws SystemException
Removes all the regions where countryId = ? and active = ? from the database.

Parameters:
countryId - the country id to search with
active - the active to search with
Throws:
SystemException - if a system exception occurred

removeAll

void removeAll()
               throws SystemException
Removes all the regions from the database.

Throws:
SystemException - if a system exception occurred

countByCountryId

int countByCountryId(long countryId)
                     throws SystemException
Counts all the regions where countryId = ?.

Parameters:
countryId - the country id to search with
Returns:
the number of matching regions
Throws:
SystemException - if a system exception occurred

countByActive

int countByActive(boolean active)
                  throws SystemException
Counts all the regions where active = ?.

Parameters:
active - the active to search with
Returns:
the number of matching regions
Throws:
SystemException - if a system exception occurred

countByC_A

int countByC_A(long countryId,
               boolean active)
               throws SystemException
Counts all the regions where countryId = ? and active = ?.

Parameters:
countryId - the country id to search with
active - the active to search with
Returns:
the number of matching regions
Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Counts all the regions.

Returns:
the number of regions
Throws:
SystemException - if a system exception occurred

Liferay 6.0.5