Liferay 6.1.2-ce-ga3

com.liferay.portal.service.persistence
Class RegionUtil

java.lang.Object
  extended by com.liferay.portal.service.persistence.RegionUtil

public class RegionUtil
extends Object

The persistence utility for the region service. This utility wraps RegionPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

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

Constructor Summary
RegionUtil()
           
 
Method Summary
static void cacheResult(List<Region> regions)
          Caches the regions in the entity cache if it is enabled.
static void cacheResult(Region region)
          Caches the region in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(Region region)
           
static int countAll()
          Returns the number of regions.
static int countByActive(boolean active)
          Returns the number of regions where active = ?.
static int countByC_A(long countryId, boolean active)
          Returns the number of regions where countryId = ? and active = ?.
static int countByC_R(long countryId, String regionCode)
          Returns the number of regions where countryId = ? and regionCode = ?.
static int countByCountryId(long countryId)
          Returns the number of regions where countryId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static Region create(long regionId)
          Creates a new region with the primary key.
static Region fetchByActive_First(boolean active, OrderByComparator orderByComparator)
          Returns the first region in the ordered set where active = ?.
static Region fetchByActive_Last(boolean active, OrderByComparator orderByComparator)
          Returns the last region in the ordered set where active = ?.
static Region fetchByC_A_First(long countryId, boolean active, OrderByComparator orderByComparator)
          Returns the first region in the ordered set where countryId = ? and active = ?.
static Region fetchByC_A_Last(long countryId, boolean active, OrderByComparator orderByComparator)
          Returns the last region in the ordered set where countryId = ? and active = ?.
static Region fetchByC_R(long countryId, String regionCode)
          Returns the region where countryId = ? and regionCode = ? or returns null if it could not be found.
static 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.
static Region fetchByCountryId_First(long countryId, OrderByComparator orderByComparator)
          Returns the first region in the ordered set where countryId = ?.
static Region fetchByCountryId_Last(long countryId, OrderByComparator orderByComparator)
          Returns the last region in the ordered set where countryId = ?.
static Region fetchByPrimaryKey(long regionId)
          Returns the region with the primary key or returns null if it could not be found.
static List<Region> findAll()
          Returns all the regions.
static List<Region> findAll(int start, int end)
          Returns a range of all the regions.
static List<Region> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the regions.
static Region findByActive_First(boolean active, OrderByComparator orderByComparator)
          Returns the first region in the ordered set where active = ?.
static Region findByActive_Last(boolean active, OrderByComparator orderByComparator)
          Returns the last region in the ordered set where active = ?.
static Region[] findByActive_PrevAndNext(long regionId, boolean active, OrderByComparator orderByComparator)
          Returns the regions before and after the current region in the ordered set where active = ?.
static List<Region> findByActive(boolean active)
          Returns all the regions where active = ?.
static List<Region> findByActive(boolean active, int start, int end)
          Returns a range of all the regions where active = ?.
static List<Region> findByActive(boolean active, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the regions where active = ?.
static Region findByC_A_First(long countryId, boolean active, OrderByComparator orderByComparator)
          Returns the first region in the ordered set where countryId = ? and active = ?.
static Region findByC_A_Last(long countryId, boolean active, OrderByComparator orderByComparator)
          Returns the last region in the ordered set where countryId = ? and active = ?.
static 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 = ?.
static List<Region> findByC_A(long countryId, boolean active)
          Returns all the regions where countryId = ? and active = ?.
static List<Region> findByC_A(long countryId, boolean active, int start, int end)
          Returns a range of all the regions where countryId = ? and active = ?.
static 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 = ?.
static Region findByC_R(long countryId, String regionCode)
          Returns the region where countryId = ? and regionCode = ? or throws a NoSuchRegionException if it could not be found.
static Region findByCountryId_First(long countryId, OrderByComparator orderByComparator)
          Returns the first region in the ordered set where countryId = ?.
static Region findByCountryId_Last(long countryId, OrderByComparator orderByComparator)
          Returns the last region in the ordered set where countryId = ?.
static Region[] findByCountryId_PrevAndNext(long regionId, long countryId, OrderByComparator orderByComparator)
          Returns the regions before and after the current region in the ordered set where countryId = ?.
static List<Region> findByCountryId(long countryId)
          Returns all the regions where countryId = ?.
static List<Region> findByCountryId(long countryId, int start, int end)
          Returns a range of all the regions where countryId = ?.
static List<Region> findByCountryId(long countryId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the regions where countryId = ?.
static Region findByPrimaryKey(long regionId)
          Returns the region with the primary key or throws a NoSuchRegionException if it could not be found.
static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static RegionPersistence getPersistence()
           
static Region remove(long regionId)
          Removes the region with the primary key from the database.
static void removeAll()
          Removes all the regions from the database.
static void removeByActive(boolean active)
          Removes all the regions where active = ? from the database.
static void removeByC_A(long countryId, boolean active)
          Removes all the regions where countryId = ? and active = ? from the database.
static Region removeByC_R(long countryId, String regionCode)
          Removes the region where countryId = ? and regionCode = ? from the database.
static void removeByCountryId(long countryId)
          Removes all the regions where countryId = ? from the database.
 void setPersistence(RegionPersistence persistence)
          Deprecated.  
static Region update(Region region, boolean merge)
           
static Region update(Region region, boolean merge, ServiceContext serviceContext)
           
static Region updateImpl(Region region, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegionUtil

public RegionUtil()
Method Detail

clearCache

public static void clearCache()
See Also:
BasePersistence.clearCache()

clearCache

public static void clearCache(Region region)
See Also:
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)

countWithDynamicQuery

public long countWithDynamicQuery(DynamicQuery dynamicQuery)
                           throws SystemException
Throws:
SystemException
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                         throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                int start,
                                                int end)
                                         throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)

findWithDynamicQuery

public static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                int start,
                                                int end,
                                                OrderByComparator orderByComparator)
                                         throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)

update

public static Region update(Region region,
                            boolean merge)
                     throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)

update

public static Region update(Region region,
                            boolean merge,
                            ServiceContext serviceContext)
                     throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)

cacheResult

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

Parameters:
region - the region

cacheResult

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

Parameters:
regions - the regions

create

public static 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

public static 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
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

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

findByPrimaryKey

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

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

fetchByPrimaryKey

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

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

findByCountryId

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

Parameters:
countryId - the country ID
Returns:
the matching regions
Throws:
SystemException - if a system exception occurred

findByCountryId

public static List<Region> findByCountryId(long countryId,
                                           int start,
                                           int end)
                                    throws SystemException
Returns 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
start - the lower bound of the range of regions
end - the upper bound of the range of regions (not inclusive)
Returns:
the range of matching regions
Throws:
SystemException - if a system exception occurred

findByCountryId

public static List<Region> findByCountryId(long countryId,
                                           int start,
                                           int end,
                                           OrderByComparator orderByComparator)
                                    throws SystemException
Returns 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
start - the lower bound of the range of regions
end - the upper bound of the range of regions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching regions
Throws:
SystemException - if a system exception occurred

findByCountryId_First

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

Parameters:
countryId - the country ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

fetchByCountryId_First

public static Region fetchByCountryId_First(long countryId,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Returns the first region in the ordered set where countryId = ?.

Parameters:
countryId - the country ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching region, or null if a matching region could not be found
Throws:
SystemException - if a system exception occurred

findByCountryId_Last

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

Parameters:
countryId - the country ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

fetchByCountryId_Last

public static Region fetchByCountryId_Last(long countryId,
                                           OrderByComparator orderByComparator)
                                    throws SystemException
Returns the last region in the ordered set where countryId = ?.

Parameters:
countryId - the country ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching region, or null if a matching region could not be found
Throws:
SystemException - if a system exception occurred

findByCountryId_PrevAndNext

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

Parameters:
regionId - the primary key of the current region
countryId - the country ID
orderByComparator - the comparator to order the set by (optionally null)
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

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

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

findByActive

public static List<Region> findByActive(boolean active,
                                        int start,
                                        int end)
                                 throws SystemException
Returns 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
start - the lower bound of the range of regions
end - the upper bound of the range of regions (not inclusive)
Returns:
the range of matching regions
Throws:
SystemException - if a system exception occurred

findByActive

public static List<Region> findByActive(boolean active,
                                        int start,
                                        int end,
                                        OrderByComparator orderByComparator)
                                 throws SystemException
Returns 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
start - the lower bound of the range of regions
end - the upper bound of the range of regions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching regions
Throws:
SystemException - if a system exception occurred

findByActive_First

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

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

fetchByActive_First

public static Region fetchByActive_First(boolean active,
                                         OrderByComparator orderByComparator)
                                  throws SystemException
Returns the first region in the ordered set where active = ?.

Parameters:
active - the active
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching region, or null if a matching region could not be found
Throws:
SystemException - if a system exception occurred

findByActive_Last

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

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

fetchByActive_Last

public static Region fetchByActive_Last(boolean active,
                                        OrderByComparator orderByComparator)
                                 throws SystemException
Returns the last region in the ordered set where active = ?.

Parameters:
active - the active
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching region, or null if a matching region could not be found
Throws:
SystemException - if a system exception occurred

findByActive_PrevAndNext

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

Parameters:
regionId - the primary key of the current region
active - the active
orderByComparator - the comparator to order the set by (optionally null)
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_R

public static Region findByC_R(long countryId,
                               String regionCode)
                        throws NoSuchRegionException,
                               SystemException
Returns the region where countryId = ? and regionCode = ? or throws a NoSuchRegionException if it could not be found.

Parameters:
countryId - the country ID
regionCode - the region code
Returns:
the matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

fetchByC_R

public static Region fetchByC_R(long countryId,
                                String regionCode)
                         throws SystemException
Returns the region where countryId = ? and regionCode = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
countryId - the country ID
regionCode - the region code
Returns:
the matching region, or null if a matching region could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_R

public static Region fetchByC_R(long countryId,
                                String regionCode,
                                boolean retrieveFromCache)
                         throws SystemException
Returns the region where countryId = ? and regionCode = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
countryId - the country ID
regionCode - the region code
retrieveFromCache - whether to use the finder cache
Returns:
the matching region, or null if a matching region could not be found
Throws:
SystemException - if a system exception occurred

findByC_A

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

Parameters:
countryId - the country ID
active - the active
Returns:
the matching regions
Throws:
SystemException - if a system exception occurred

findByC_A

public static List<Region> findByC_A(long countryId,
                                     boolean active,
                                     int start,
                                     int end)
                              throws SystemException
Returns 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
active - the active
start - the lower bound of the range of regions
end - the upper bound of the range of regions (not inclusive)
Returns:
the range of matching regions
Throws:
SystemException - if a system exception occurred

findByC_A

public static List<Region> findByC_A(long countryId,
                                     boolean active,
                                     int start,
                                     int end,
                                     OrderByComparator orderByComparator)
                              throws SystemException
Returns 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
active - the active
start - the lower bound of the range of regions
end - the upper bound of the range of regions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching regions
Throws:
SystemException - if a system exception occurred

findByC_A_First

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

Parameters:
countryId - the country ID
active - the active
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

fetchByC_A_First

public static Region fetchByC_A_First(long countryId,
                                      boolean active,
                                      OrderByComparator orderByComparator)
                               throws SystemException
Returns the first region in the ordered set where countryId = ? and active = ?.

Parameters:
countryId - the country ID
active - the active
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching region, or null if a matching region could not be found
Throws:
SystemException - if a system exception occurred

findByC_A_Last

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

Parameters:
countryId - the country ID
active - the active
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching region
Throws:
NoSuchRegionException - if a matching region could not be found
SystemException - if a system exception occurred

fetchByC_A_Last

public static Region fetchByC_A_Last(long countryId,
                                     boolean active,
                                     OrderByComparator orderByComparator)
                              throws SystemException
Returns the last region in the ordered set where countryId = ? and active = ?.

Parameters:
countryId - the country ID
active - the active
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching region, or null if a matching region could not be found
Throws:
SystemException - if a system exception occurred

findByC_A_PrevAndNext

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

Parameters:
regionId - the primary key of the current region
countryId - the country ID
active - the active
orderByComparator - the comparator to order the set by (optionally null)
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

public static List<Region> findAll()
                            throws SystemException
Returns all the regions.

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

findAll

public static List<Region> findAll(int start,
                                   int end)
                            throws SystemException
Returns 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
end - the upper bound of the range of regions (not inclusive)
Returns:
the range of regions
Throws:
SystemException - if a system exception occurred

findAll

public static List<Region> findAll(int start,
                                   int end,
                                   OrderByComparator orderByComparator)
                            throws SystemException
Returns 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
end - the upper bound of the range of regions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of regions
Throws:
SystemException - if a system exception occurred

removeByCountryId

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

Parameters:
countryId - the country ID
Throws:
SystemException - if a system exception occurred

removeByActive

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

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

removeByC_R

public static Region removeByC_R(long countryId,
                                 String regionCode)
                          throws NoSuchRegionException,
                                 SystemException
Removes the region where countryId = ? and regionCode = ? from the database.

Parameters:
countryId - the country ID
regionCode - the region code
Returns:
the region that was removed
Throws:
SystemException - if a system exception occurred
NoSuchRegionException

removeByC_A

public static 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
active - the active
Throws:
SystemException - if a system exception occurred

removeAll

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

Throws:
SystemException - if a system exception occurred

countByCountryId

public static int countByCountryId(long countryId)
                            throws SystemException
Returns the number of regions where countryId = ?.

Parameters:
countryId - the country ID
Returns:
the number of matching regions
Throws:
SystemException - if a system exception occurred

countByActive

public static int countByActive(boolean active)
                         throws SystemException
Returns the number of regions where active = ?.

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

countByC_R

public static int countByC_R(long countryId,
                             String regionCode)
                      throws SystemException
Returns the number of regions where countryId = ? and regionCode = ?.

Parameters:
countryId - the country ID
regionCode - the region code
Returns:
the number of matching regions
Throws:
SystemException - if a system exception occurred

countByC_A

public static int countByC_A(long countryId,
                             boolean active)
                      throws SystemException
Returns the number of regions where countryId = ? and active = ?.

Parameters:
countryId - the country ID
active - the active
Returns:
the number of matching regions
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of regions.

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

getPersistence

public static RegionPersistence getPersistence()

setPersistence

public void setPersistence(RegionPersistence persistence)
Deprecated. 


Liferay 6.1.2-ce-ga3