Interface RegionRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Region,RegionId>, org.springframework.data.jpa.repository.JpaRepository<Region,RegionId>, org.springframework.data.repository.PagingAndSortingRepository<Region,RegionId>, org.springframework.data.repository.query.QueryByExampleExecutor<Region>, org.springframework.data.repository.Repository<Region,RegionId>

public interface RegionRepository extends org.springframework.data.jpa.repository.JpaRepository<Region,RegionId>
The RegionRepository interface declares the repository for the Region domain type.
Author:
Marcus Portmann
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieve all the regions sorted by locale ID, sort index, and name.
    Retrieve the regions for the specified locale sorted by locale ID, sort index, and name.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findOne
  • Method Details

    • findAll

      @Query("select r from Region r order by r.localeId, -r.sortIndex DESC, r.name") List<Region> findAll()
      Retrieve all the regions sorted by locale ID, sort index, and name.
      Specified by:
      findAll in interface org.springframework.data.repository.CrudRepository<Region,RegionId>
      Specified by:
      findAll in interface org.springframework.data.jpa.repository.JpaRepository<Region,RegionId>
      Returns:
      all the regions sorted by locale ID, sort index, and name.
    • findByLocaleIdIgnoreCase

      @Query("select r from Region r where upper(r.localeId) = upper(:localeId) order by r.localeId, -r.sortIndex DESC, r.name") List<Region> findByLocaleIdIgnoreCase(String localeId)
      Retrieve the regions for the specified locale sorted by locale ID, sort index, and name.
      Parameters:
      localeId - the Unicode locale identifier for the locale to retrieve the regions for
      Returns:
      the regions for the specified locale sorted by locale ID, sort index, and name