Interface LanguageRepository

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

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

    Modifier and Type
    Method
    Description
    Retrieve all the languages sorted by locale ID, sort index, and name.
    Retrieve the languages 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 l from Language l order by l.localeId, -l.sortIndex DESC, l.shortName") List<Language> findAll()
      Retrieve all the languages sorted by locale ID, sort index, and name.
      Specified by:
      findAll in interface org.springframework.data.repository.CrudRepository<Language,LanguageId>
      Specified by:
      findAll in interface org.springframework.data.jpa.repository.JpaRepository<Language,LanguageId>
      Returns:
      all the languages sorted by locale ID, sort index, and name.
    • findByLocaleIdIgnoreCase

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