Interface HLMRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<HLMEntity,String>, org.springframework.data.neo4j.repository.Neo4jRepository<HLMEntity,String>, org.springframework.data.repository.PagingAndSortingRepository<HLMEntity,String>, org.springframework.data.repository.query.QueryByExampleExecutor<HLMEntity>, org.springframework.data.repository.Repository<HLMEntity,String>

public interface HLMRepository extends org.springframework.data.neo4j.repository.Neo4jRepository<HLMEntity,String>
  • Method Summary

    Modifier and Type
    Method
    Description
    根据 name 查询
    根据ID 匹配数据,这里的 ID 是 neo4j里默认会创建的一个Long型自增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.neo4j.repository.Neo4jRepository

    findAll, findAll, findAll, findAll, findAllById, saveAll

    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

    • findByName

      List<HLMEntity> findByName(String name)
      根据 name 查询
      Parameters:
      name -
      Returns:
    • getById

      @Query("MATCH (n:HLM) WHERE id(n)={id} RETURN n") HLMEntity getById(Long id)
      根据ID 匹配数据,这里的 ID 是 neo4j里默认会创建的一个Long型自增ID
      Parameters:
      id -
      Returns:
    • getRoot

      @Query("MATCH (n) WHERE not ()-->(n) RETURN DISTINCT n") List<HLMEntity> getRoot()
      查询根节点,顶级 无入
      Returns:
    • getLeaf

      @Query("MATCH (n) WHERE not (n)-->() RETURN DISTINCT n") List<HLMEntity> getLeaf()
      查询叶子节点,底级 无出
      Returns:
    • getCycle

      @Query("MATCH (n)-[*]->(n) RETURN DISTINCT n") List<HLMEntity> getCycle()
      查询循环节点
      Returns: