Interface CountryRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Country,​CountryId>, org.springframework.data.jpa.repository.JpaRepository<Country,​CountryId>, org.springframework.data.repository.PagingAndSortingRepository<Country,​CountryId>, org.springframework.data.repository.query.QueryByExampleExecutor<Country>, org.springframework.data.repository.Repository<Country,​CountryId>

    public interface CountryRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Country,​CountryId>
    The CountryRepository interface declares the repository for the Country domain type.
    Author:
    Marcus Portmann
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<Country> findAll()  
      List<Country> findByLocaleIdIgnoreCase​(String localeId)  
      • 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 Detail

      • findAll

        @Query("select c from Country c order by c.localeId, -c.sortIndex DESC, c.shortName")
        List<Country> findAll()
        Specified by:
        findAll in interface org.springframework.data.repository.CrudRepository<Country,​CountryId>
        Specified by:
        findAll in interface org.springframework.data.jpa.repository.JpaRepository<Country,​CountryId>
      • findByLocaleIdIgnoreCase

        @Query("select c from Country c where upper(c.localeId) = upper(:localeId) order by c.localeId, -c.sortIndex DESC, c.shortName")
        List<Country> findByLocaleIdIgnoreCase​(String localeId)