Interface DictRepository

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

@Repository @NullMarked public interface DictRepository extends org.springframework.data.jpa.repository.JpaRepository<Dict,String>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<Dict>

字典数据仓库

提供字典数据的持久化操作,继承自 JpaRepositoryJpaSpecificationExecutor

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
    根据上级ID集合查找字典列表
    根据字典目和字典码查找字典
    根据字典目查找字典列表,并按排序号升序排列

    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

    • findByTagAndCode

      Optional<Dict> findByTagAndCode(String tag, String code)
      根据字典目和字典码查找字典
      Parameters:
      tag - 字典目编码
      code - 字典码
      Returns:
      字典实体(可能为空)
    • findByParentIdIn

      List<Dict> findByParentIdIn(Collection<String> parentIds)
      根据上级ID集合查找字典列表
      Parameters:
      parentIds - 上级ID集合
      Returns:
      字典列表
    • findByTagOrderByOrdinalAsc

      List<Dict> findByTagOrderByOrdinalAsc(String tag)
      根据字典目查找字典列表,并按排序号升序排列
      Parameters:
      tag - 字典目编码
      Returns:
      字典列表(已按排序号升序排列)