Interface I18nMessageRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<I18nMessage, String>, org.springframework.data.jpa.repository.JpaRepository<I18nMessage, String>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<I18nMessage>, org.springframework.data.repository.ListCrudRepository<I18nMessage, String>, org.springframework.data.repository.ListPagingAndSortingRepository<I18nMessage, String>, org.springframework.data.repository.PagingAndSortingRepository<I18nMessage, String>, org.springframework.data.repository.query.QueryByExampleExecutor<I18nMessage>, org.springframework.data.repository.Repository<I18nMessage, String>

@Repository @NullMarked public interface I18nMessageRepository extends org.springframework.data.jpa.repository.JpaRepository<I18nMessage, String>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<I18nMessage>
国际化内容仓库接口。 用于国际化内容的数据库操作。
Author:
xezzon
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

    org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    findByNamespaceAndMessageKey(String namespace, String messageKey)
    根据命名空间和消息键查找国际化内容。
    查找所有不同的国际化内容命名空间。

    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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

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

    count, count, delete, delete, exists, exists, findAll, findAll, findAll, findAll, findAll, findBy, findBy, findOne, findOne, update

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

    findAll, findAllById, saveAll

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

    findAll

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

    findAll

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

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByNamespaceAndMessageKey

      Optional<I18nMessage> findByNamespaceAndMessageKey(String namespace, String messageKey)
      根据命名空间和消息键查找国际化内容。
      Parameters:
      namespace - 国际化内容命名空间。
      messageKey - 国际化内容消息键。
      Returns:
      包含国际化内容的 Optional 对象。
    • findDistinctNamespace

      @Query("SELECT DISTINCT namespace FROM I18nMessage") List<String> findDistinctNamespace()
      查找所有不同的国际化内容命名空间。
      Returns:
      国际化内容命名空间列表。