Class RegionUtil
com.liferay.portal.service.persistence.impl.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
- Author:
- Brian Wing Shun Chan
- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(Region region) Caches the region in the entity cache if it is enabled.static voidcacheResult(List<Region> regions) Caches the regions in the entity cache if it is enabled.static voidstatic voidclearCache(Region region) static intcountAll()Returns the number of regions.static intcountByActive(boolean active) Returns the number of regions where active = ?.static intcountByC_A(long countryId, boolean active) Returns the number of regions where countryId = ? and active = ?.static intcountByC_R(long countryId, String regionCode) Returns the number of regions where countryId = ? and regionCode = ?.static intcountByCountryId(long countryId) Returns the number of regions where countryId = ?.static intcountByUuid(String uuid) Returns the number of regions where uuid = ?.static intcountByUuid_C(String uuid, long companyId) Returns the number of regions where uuid = ? and companyId = ?.static longcountWithDynamicQuery(DynamicQuery dynamicQuery) static Regioncreate(long regionId) Creates a new region with the primary key.static RegionfetchByActive_First(boolean active, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where active = ?.static RegionfetchByC_A_First(long countryId, boolean active, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where countryId = ? and active = ?.static RegionfetchByC_R(long countryId, String regionCode) Returns the region where countryId = ? and regionCode = ? or returnsnullif it could not be found.static RegionfetchByC_R(long countryId, String regionCode, boolean useFinderCache) Returns the region where countryId = ? and regionCode = ? or returnsnullif it could not be found, optionally using the finder cache.static RegionfetchByCountryId_First(long countryId, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where countryId = ?.static RegionfetchByPrimaryKey(long regionId) Returns the region with the primary key or returnsnullif it could not be found.static Map<Serializable, Region> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static RegionfetchByUuid_C_First(String uuid, long companyId, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where uuid = ? and companyId = ?.static RegionfetchByUuid_First(String uuid, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where uuid = ?.findAll()Returns all the regions.findAll(int start, int end) Returns a range of all the regions.findAll(int start, int end, OrderByComparator<Region> orderByComparator) Returns an ordered range of all the regions.findAll(int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions.findByActive(boolean active) Returns all the regions where active = ?.findByActive(boolean active, int start, int end) Returns a range of all the regions where active = ?.findByActive(boolean active, int start, int end, OrderByComparator<Region> orderByComparator) Returns an ordered range of all the regions where active = ?.findByActive(boolean active, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where active = ?.static RegionfindByActive_First(boolean active, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where active = ?.findByC_A(long countryId, boolean active) Returns all the regions where countryId = ? and active = ?.findByC_A(long countryId, boolean active, int start, int end) Returns a range of all the regions where countryId = ? and active = ?.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 = ?.findByC_A(long countryId, boolean active, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where countryId = ? and active = ?.static RegionfindByC_A_First(long countryId, boolean active, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where countryId = ? and active = ?.static RegionReturns the region where countryId = ? and regionCode = ? or throws aNoSuchRegionExceptionif it could not be found.findByCountryId(long countryId) Returns all the regions where countryId = ?.findByCountryId(long countryId, int start, int end) Returns a range of all the regions where countryId = ?.findByCountryId(long countryId, int start, int end, OrderByComparator<Region> orderByComparator) Returns an ordered range of all the regions where countryId = ?.findByCountryId(long countryId, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where countryId = ?.static RegionfindByCountryId_First(long countryId, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where countryId = ?.static RegionfindByPrimaryKey(long regionId) Returns the region with the primary key or throws aNoSuchRegionExceptionif it could not be found.findByUuid(String uuid) Returns all the regions where uuid = ?.findByUuid(String uuid, int start, int end) Returns a range of all the regions where uuid = ?.findByUuid(String uuid, int start, int end, OrderByComparator<Region> orderByComparator) Returns an ordered range of all the regions where uuid = ?.findByUuid(String uuid, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where uuid = ?.findByUuid_C(String uuid, long companyId) Returns all the regions where uuid = ? and companyId = ?.findByUuid_C(String uuid, long companyId, int start, int end) Returns a range of all the regions where uuid = ? and companyId = ?.findByUuid_C(String uuid, long companyId, int start, int end, OrderByComparator<Region> orderByComparator) Returns an ordered range of all the regions where uuid = ? and companyId = ?.findByUuid_C(String uuid, long companyId, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where uuid = ? and companyId = ?.static RegionfindByUuid_C_First(String uuid, long companyId, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where uuid = ? and companyId = ?.static RegionfindByUuid_First(String uuid, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where uuid = ?.findWithDynamicQuery(DynamicQuery dynamicQuery) findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<Region> orderByComparator) static RegionPersistencestatic Regionremove(long regionId) Removes the region with the primary key from the database.static voidRemoves all the regions from the database.static voidremoveByActive(boolean active) Removes all the regions where active = ? from the database.static voidremoveByC_A(long countryId, boolean active) Removes all the regions where countryId = ? and active = ? from the database.static RegionremoveByC_R(long countryId, String regionCode) Removes the region where countryId = ? and regionCode = ? from the database.static voidremoveByCountryId(long countryId) Removes all the regions where countryId = ? from the database.static voidremoveByUuid(String uuid) Removes all the regions where uuid = ? from the database.static voidremoveByUuid_C(String uuid, long companyId) Removes all the regions where uuid = ? and companyId = ? from the database.static voidsetPersistence(RegionPersistence persistence) static Regionstatic Regionupdate(Region region, ServiceContext serviceContext) static RegionupdateImpl(Region region)
-
Constructor Details
-
RegionUtil
public RegionUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
clearCache
- See Also:
-
countWithDynamicQuery
- See Also:
-
fetchByPrimaryKeys
- See Also:
-
findWithDynamicQuery
- See Also:
-
findWithDynamicQuery
- See Also:
-
findWithDynamicQuery
public static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<Region> orderByComparator) - See Also:
-
update
- See Also:
-
update
- See Also:
-
findByUuid
Returns all the regions where uuid = ?.- Parameters:
uuid- the uuid- Returns:
- the matching regions
-
findByUuid
Returns a range of all the regions where uuid = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
uuid- the uuidstart- the lower bound of the range of regionsend- the upper bound of the range of regions (not inclusive)- Returns:
- the range of matching regions
-
findByUuid
public static List<Region> findByUuid(String uuid, int start, int end, OrderByComparator<Region> orderByComparator) Returns an ordered range of all the regions where uuid = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
uuid- the uuidstart- 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 (optionallynull)- Returns:
- the ordered range of matching regions
-
findByUuid
public static List<Region> findByUuid(String uuid, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where uuid = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
uuid- the uuidstart- 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 (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching regions
-
findByUuid_First
public static Region findByUuid_First(String uuid, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException Returns the first region in the ordered set where uuid = ?.- Parameters:
uuid- the uuidorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region
-
fetchByUuid_First
Returns the first region in the ordered set where uuid = ?.- Parameters:
uuid- the uuidorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region, or
nullif a matching region could not be found
-
removeByUuid
Removes all the regions where uuid = ? from the database.- Parameters:
uuid- the uuid
-
countByUuid
Returns the number of regions where uuid = ?.- Parameters:
uuid- the uuid- Returns:
- the number of matching regions
-
findByUuid_C
Returns all the regions where uuid = ? and companyId = ?.- Parameters:
uuid- the uuidcompanyId- the company ID- Returns:
- the matching regions
-
findByUuid_C
Returns a range of all the regions where uuid = ? and companyId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
uuid- the uuidcompanyId- the company IDstart- the lower bound of the range of regionsend- the upper bound of the range of regions (not inclusive)- Returns:
- the range of matching regions
-
findByUuid_C
public static List<Region> findByUuid_C(String uuid, long companyId, int start, int end, OrderByComparator<Region> orderByComparator) Returns an ordered range of all the regions where uuid = ? and companyId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
uuid- the uuidcompanyId- the company 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 (optionallynull)- Returns:
- the ordered range of matching regions
-
findByUuid_C
public static List<Region> findByUuid_C(String uuid, long companyId, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where uuid = ? and companyId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
uuid- the uuidcompanyId- the company 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 (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching regions
-
findByUuid_C_First
public static Region findByUuid_C_First(String uuid, long companyId, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException Returns the first region in the ordered set where uuid = ? and companyId = ?.- Parameters:
uuid- the uuidcompanyId- the company IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region
-
fetchByUuid_C_First
public static Region fetchByUuid_C_First(String uuid, long companyId, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where uuid = ? and companyId = ?.- Parameters:
uuid- the uuidcompanyId- the company IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region, or
nullif a matching region could not be found
-
removeByUuid_C
Removes all the regions where uuid = ? and companyId = ? from the database.- Parameters:
uuid- the uuidcompanyId- the company ID
-
countByUuid_C
Returns the number of regions where uuid = ? and companyId = ?.- Parameters:
uuid- the uuidcompanyId- the company ID- Returns:
- the number of matching regions
-
findByCountryId
Returns all the regions where countryId = ?.- Parameters:
countryId- the country ID- Returns:
- the matching regions
-
findByCountryId
Returns a range of all the regions where countryId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
countryId- the country IDstart- the lower bound of the range of regionsend- the upper bound of the range of regions (not inclusive)- Returns:
- the range of matching regions
-
findByCountryId
public static List<Region> findByCountryId(long countryId, int start, int end, OrderByComparator<Region> orderByComparator) Returns an ordered range of all the regions where countryId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
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 (optionallynull)- Returns:
- the ordered range of matching regions
-
findByCountryId
public static List<Region> findByCountryId(long countryId, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where countryId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
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 (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching regions
-
findByCountryId_First
public static Region findByCountryId_First(long countryId, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException Returns the first region in the ordered set where countryId = ?.- Parameters:
countryId- the country IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region
-
fetchByCountryId_First
public static Region fetchByCountryId_First(long countryId, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where countryId = ?.- Parameters:
countryId- the country IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region, or
nullif a matching region could not be found
-
removeByCountryId
public static void removeByCountryId(long countryId) Removes all the regions where countryId = ? from the database.- Parameters:
countryId- the country ID
-
countByCountryId
public static int countByCountryId(long countryId) Returns the number of regions where countryId = ?.- Parameters:
countryId- the country ID- Returns:
- the number of matching regions
-
findByActive
Returns all the regions where active = ?.- Parameters:
active- the active- Returns:
- the matching regions
-
findByActive
Returns a range of all the regions where active = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
active- the activestart- the lower bound of the range of regionsend- the upper bound of the range of regions (not inclusive)- Returns:
- the range of matching regions
-
findByActive
public static List<Region> findByActive(boolean active, int start, int end, OrderByComparator<Region> orderByComparator) Returns an ordered range of all the regions where active = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
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 (optionallynull)- Returns:
- the ordered range of matching regions
-
findByActive
public static List<Region> findByActive(boolean active, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where active = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
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 (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching regions
-
findByActive_First
public static Region findByActive_First(boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException Returns the first region in the ordered set where active = ?.- Parameters:
active- the activeorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region
-
fetchByActive_First
public static Region fetchByActive_First(boolean active, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where active = ?.- Parameters:
active- the activeorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region, or
nullif a matching region could not be found
-
removeByActive
public static void removeByActive(boolean active) Removes all the regions where active = ? from the database.- Parameters:
active- the active
-
countByActive
public static int countByActive(boolean active) Returns the number of regions where active = ?.- Parameters:
active- the active- Returns:
- the number of matching regions
-
findByC_A
Returns all the regions where countryId = ? and active = ?.- Parameters:
countryId- the country IDactive- the active- Returns:
- the matching regions
-
findByC_A
Returns a range of all the regions where countryId = ? and active = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
countryId- the country IDactive- the activestart- the lower bound of the range of regionsend- the upper bound of the range of regions (not inclusive)- Returns:
- the range of matching regions
-
findByC_A
public static 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 = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
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 (optionallynull)- Returns:
- the ordered range of matching regions
-
findByC_A
public static List<Region> findByC_A(long countryId, boolean active, int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions where countryId = ? and active = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
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 (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching regions
-
findByC_A_First
public static Region findByC_A_First(long countryId, boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException Returns the first region in the ordered set where countryId = ? and active = ?.- Parameters:
countryId- the country IDactive- the activeorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region
-
fetchByC_A_First
public static Region fetchByC_A_First(long countryId, boolean active, OrderByComparator<Region> orderByComparator) Returns the first region in the ordered set where countryId = ? and active = ?.- Parameters:
countryId- the country IDactive- the activeorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching region, or
nullif a matching region could not be found
-
removeByC_A
public static void removeByC_A(long countryId, boolean active) Removes all the regions where countryId = ? and active = ? from the database.- Parameters:
countryId- the country IDactive- the active
-
countByC_A
public static int countByC_A(long countryId, boolean active) Returns the number of regions where countryId = ? and active = ?.- Parameters:
countryId- the country IDactive- the active- Returns:
- the number of matching regions
-
findByC_R
Returns the region where countryId = ? and regionCode = ? or throws aNoSuchRegionExceptionif it could not be found.- Parameters:
countryId- the country IDregionCode- the region code- Returns:
- the matching region
-
fetchByC_R
Returns the region where countryId = ? and regionCode = ? or returnsnullif it could not be found. Uses the finder cache.- Parameters:
countryId- the country IDregionCode- the region code- Returns:
- the matching region, or
nullif a matching region could not be found
-
fetchByC_R
Returns the region where countryId = ? and regionCode = ? or returnsnullif it could not be found, optionally using the finder cache.- Parameters:
countryId- the country IDregionCode- the region codeuseFinderCache- whether to use the finder cache- Returns:
- the matching region, or
nullif a matching region could not be found
-
removeByC_R
Removes the region where countryId = ? and regionCode = ? from the database.- Parameters:
countryId- the country IDregionCode- the region code- Returns:
- the region that was removed
- Throws:
NoSuchRegionException
-
countByC_R
Returns the number of regions where countryId = ? and regionCode = ?.- Parameters:
countryId- the country IDregionCode- the region code- Returns:
- the number of matching regions
-
cacheResult
Caches the region in the entity cache if it is enabled.- Parameters:
region- the region
-
cacheResult
Caches the regions in the entity cache if it is enabled.- Parameters:
regions- the regions
-
create
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
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
-
updateImpl
-
findByPrimaryKey
Returns the region with the primary key or throws aNoSuchRegionExceptionif it could not be found.- Parameters:
regionId- the primary key of the region- Returns:
- the region
-
fetchByPrimaryKey
Returns the region with the primary key or returnsnullif it could not be found.- Parameters:
regionId- the primary key of the region- Returns:
- the region, or
nullif a region with the primary key could not be found
-
findAll
Returns all the regions.- Returns:
- the regions
-
findAll
Returns a range of all the regions.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
start- the lower bound of the range of regionsend- the upper bound of the range of regions (not inclusive)- Returns:
- the range of regions
-
findAll
Returns an ordered range of all the regions.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
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 (optionallynull)- Returns:
- the ordered range of regions
-
findAll
public static List<Region> findAll(int start, int end, OrderByComparator<Region> orderByComparator, boolean useFinderCache) Returns an ordered range of all the regions.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.RegionModelImpl.- Parameters:
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 (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of regions
-
removeAll
public static void removeAll()Removes all the regions from the database. -
countAll
public static int countAll()Returns the number of regions.- Returns:
- the number of regions
-
getPersistence
-
setPersistence
-