Object
com.liferay.portal.kernel.service.persistence.RegionUtil

public class RegionUtil extends Object
The persistence utility for the region service. This utility wraps 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.description}
  • Constructor Details

    • RegionUtil

      public RegionUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
    • clearCache

      public static void clearCache(Region region)
      See Also:
    • countWithDynamicQuery

      public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
      See Also:
    • fetchByPrimaryKeys

      public static Map<Serializable,Region> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
      See Also:
    • findWithDynamicQuery

      public static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery)
      See Also:
    • findWithDynamicQuery

      public static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
      See Also:
    • findWithDynamicQuery

      public static List<Region> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<Region> orderByComparator)
      See Also:
    • update

      public static Region update(Region region)
      See Also:
    • update

      public static Region update(Region region, ServiceContext serviceContext)
      See Also:
    • findByUuid

      public static List<Region> findByUuid(String uuid)
      Returns all the regions where uuid = ?.
      Parameters:
      uuid - the uuid
      Returns:
      the matching regions
    • findByUuid

      public static List<Region> findByUuid(String uuid, int start, int end)
      Returns a range of all the regions where uuid = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      Parameters:
      uuid - the uuid
      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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      Parameters:
      uuid - the uuid
      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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      Parameters:
      uuid - the uuid
      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)
      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 uuid
      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
      NoSuchRegionException
    • fetchByUuid_First

      public static Region fetchByUuid_First(String uuid, OrderByComparator<Region> orderByComparator)
      Returns the first region in the ordered set where uuid = ?.
      Parameters:
      uuid - the uuid
      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
    • findByUuid_Last

      public static Region findByUuid_Last(String uuid, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      Returns the last region in the ordered set where uuid = ?.
      Parameters:
      uuid - the uuid
      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
      NoSuchRegionException
    • fetchByUuid_Last

      public static Region fetchByUuid_Last(String uuid, OrderByComparator<Region> orderByComparator)
      Returns the last region in the ordered set where uuid = ?.
      Parameters:
      uuid - the uuid
      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
    • findByUuid_PrevAndNext

      public static Region[] findByUuid_PrevAndNext(long regionId, String uuid, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      Returns the regions before and after the current region in the ordered set where uuid = ?.
      Parameters:
      regionId - the primary key of the current region
      uuid - the uuid
      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
      NoSuchRegionException
    • removeByUuid

      public static void removeByUuid(String uuid)
      Removes all the regions where uuid = ? from the database.
      Parameters:
      uuid - the uuid
    • countByUuid

      public static int countByUuid(String uuid)
      Returns the number of regions where uuid = ?.
      Parameters:
      uuid - the uuid
      Returns:
      the number of matching regions
    • findByUuid_C

      public static List<Region> findByUuid_C(String uuid, long companyId)
      Returns all the regions where uuid = ? and companyId = ?.
      Parameters:
      uuid - the uuid
      companyId - the company ID
      Returns:
      the matching regions
    • findByUuid_C

      public static List<Region> findByUuid_C(String uuid, long companyId, int start, int end)
      Returns a range of all the regions where uuid = ? and companyId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      Parameters:
      uuid - the uuid
      companyId - the company 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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      Parameters:
      uuid - the uuid
      companyId - the company 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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      Parameters:
      uuid - the uuid
      companyId - the company 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)
      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 uuid
      companyId - the company 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
      NoSuchRegionException
    • 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 uuid
      companyId - the company 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
    • findByUuid_C_Last

      public static Region findByUuid_C_Last(String uuid, long companyId, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      Returns the last region in the ordered set where uuid = ? and companyId = ?.
      Parameters:
      uuid - the uuid
      companyId - the company 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
      NoSuchRegionException
    • fetchByUuid_C_Last

      public static Region fetchByUuid_C_Last(String uuid, long companyId, OrderByComparator<Region> orderByComparator)
      Returns the last region in the ordered set where uuid = ? and companyId = ?.
      Parameters:
      uuid - the uuid
      companyId - the company 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
    • findByUuid_C_PrevAndNext

      public static Region[] findByUuid_C_PrevAndNext(long regionId, String uuid, long companyId, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      Returns the regions before and after the current region in the ordered set where uuid = ? and companyId = ?.
      Parameters:
      regionId - the primary key of the current region
      uuid - the uuid
      companyId - the company 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
      NoSuchRegionException
    • removeByUuid_C

      public static void removeByUuid_C(String uuid, long companyId)
      Removes all the regions where uuid = ? and companyId = ? from the database.
      Parameters:
      uuid - the uuid
      companyId - the company ID
    • countByUuid_C

      public static int countByUuid_C(String uuid, long companyId)
      Returns the number of regions where uuid = ? and companyId = ?.
      Parameters:
      uuid - the uuid
      companyId - the company ID
      Returns:
      the number of matching regions
    • findByCountryId

      public static List<Region> findByCountryId(long countryId)
      Returns all the regions where countryId = ?.
      Parameters:
      countryId - the country ID
      Returns:
      the matching regions
    • findByCountryId

      public static List<Region> findByCountryId(long countryId, int start, int end)
      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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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)
      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 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
      NoSuchRegionException
    • 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 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
    • findByCountryId_Last

      public static Region findByCountryId_Last(long countryId, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      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
      NoSuchRegionException
    • fetchByCountryId_Last

      public static Region fetchByCountryId_Last(long countryId, OrderByComparator<Region> orderByComparator)
      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
    • findByCountryId_PrevAndNext

      public static Region[] findByCountryId_PrevAndNext(long regionId, long countryId, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      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
      NoSuchRegionException
    • 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

      public static List<Region> findByActive(boolean active)
      Returns all the regions where active = ?.
      Parameters:
      active - the active
      Returns:
      the matching regions
    • findByActive

      public static List<Region> findByActive(boolean active, int start, int end)
      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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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)
      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 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
      NoSuchRegionException
    • 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 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
    • findByActive_Last

      public static Region findByActive_Last(boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      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
      NoSuchRegionException
    • fetchByActive_Last

      public static Region fetchByActive_Last(boolean active, OrderByComparator<Region> orderByComparator)
      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
    • findByActive_PrevAndNext

      public static Region[] findByActive_PrevAndNext(long regionId, boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      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
      NoSuchRegionException
    • 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

      public static List<Region> findByC_A(long countryId, boolean active)
      Returns all the regions where countryId = ? and active = ?.
      Parameters:
      countryId - the country ID
      active - the active
      Returns:
      the matching regions
    • findByC_A

      public static List<Region> findByC_A(long countryId, boolean active, int start, int end)
      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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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)
      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 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
      NoSuchRegionException
    • 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 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
    • findByC_A_Last

      public static Region findByC_A_Last(long countryId, boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      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
      NoSuchRegionException
    • fetchByC_A_Last

      public static Region fetchByC_A_Last(long countryId, boolean active, OrderByComparator<Region> orderByComparator)
      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
    • findByC_A_PrevAndNext

      public static Region[] findByC_A_PrevAndNext(long regionId, long countryId, boolean active, OrderByComparator<Region> orderByComparator) throws NoSuchRegionException
      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
      NoSuchRegionException
    • 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 ID
      active - 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 ID
      active - the active
      Returns:
      the number of matching regions
    • findByC_R

      public static Region findByC_R(long countryId, String regionCode) throws NoSuchRegionException
      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
      NoSuchRegionException
    • fetchByC_R

      public static Region fetchByC_R(long countryId, String regionCode)
      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
    • fetchByC_R

      public static Region fetchByC_R(long countryId, String regionCode, boolean useFinderCache)
      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
      useFinderCache - whether to use the finder cache
      Returns:
      the matching region, or null if a matching region could not be found
    • removeByC_R

      public static Region removeByC_R(long countryId, String regionCode) throws NoSuchRegionException
      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:
      NoSuchRegionException
    • countByC_R

      public static int countByC_R(long countryId, String regionCode)
      Returns the number of regions where countryId = ? and regionCode = ?.
      Parameters:
      countryId - the country ID
      regionCode - the region code
      Returns:
      the number of matching regions
    • 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
      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
      NoSuchRegionException
    • updateImpl

      public static Region updateImpl(Region region)
    • findByPrimaryKey

      public static Region findByPrimaryKey(long regionId) throws NoSuchRegionException
      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
      NoSuchRegionException
    • fetchByPrimaryKey

      public static Region fetchByPrimaryKey(long regionId)
      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
    • findAll

      public static List<Region> findAll()
      Returns all the regions.
      Returns:
      the regions
    • findAll

      public static List<Region> findAll(int start, int end)
      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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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
    • findAll

      public static List<Region> findAll(int start, int end, OrderByComparator<Region> orderByComparator)
      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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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
    • 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 - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from RegionModelImpl.

      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)
      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

      public static RegionPersistence getPersistence()
    • setPersistence

      public static void setPersistence(RegionPersistence persistence)