Interface TopicRepository

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

@Repository public interface TopicRepository extends org.springframework.data.jpa.repository.JpaRepository<TopicEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<TopicEntity>
  • Method Summary

    Modifier and Type
    Method
    Description
    TODO: wildcard match 通配符匹配 topic topic通配符说明: 单层通配符"+":只能匹配一层主题。
     
     

    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, delete, exists, findAll, findAll, findAll, findBy, findOne

    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

    • findByUid

      Optional<TopicEntity> findByUid(String uid)
    • findFirstByUserUid

      Optional<TopicEntity> findFirstByUserUid(String userUid)
    • findByTopicsContains

      @Query(value="select * from bytedesk_core_topic where topics like %:topic% ", nativeQuery=true) Set<TopicEntity> findByTopicsContains(@Param("topic") String topic)
      TODO: wildcard match 通配符匹配 topic topic通配符说明: 单层通配符"+":只能匹配一层主题。例如,"aaa/+"可以匹配"aaa/bbb",但不能匹配"aaa/bbb/ccc"。 多层通配符"#":可以匹配多层主题。例如,"aaa/#"不但可以匹配"aaa/bbb",还可以匹配"aaa/bbb/ccc/ddd"。它必须作为主题的最后一个级别使用,并且只能出现在最后