Interface Node

    • Method Detail

      • getId

        Long getId()
        返回实体唯一标识ID=
        Specified by:
        getId in interface Entity<Long>
        Returns:
        返回该实体的唯一id
      • delete

        void delete()
        删除此点
      • getRelationships

        Iterable<Relationship> getRelationships()
        返回此点上的所有边的迭代器
        Returns:
        边的迭代器
      • hasRelationship

        boolean hasRelationship()
        查看此点是否存在边
        Returns:
        true (有边) or false(无边)
      • getRelationships

        Iterable<Relationship> getRelationships​(RelationshipType... types)
        返回此点指定某些类型的边的迭代器
        Parameters:
        types - 边的某些类型
        Returns:
        符合条件的边迭代器
      • getRelationships

        Iterable<Relationship> getRelationships​(Direction direction,
                                                RelationshipType... types)
        返回此点指定某些类型指定方向的边的迭代器
        Parameters:
        types - 边的某些类型
        direction - 边的方向
        Returns:
        符合条件的边迭代器
      • hasRelationship

        boolean hasRelationship​(RelationshipType... types)
        查看此点是否存在某类边
        Parameters:
        types - 边的某些类型
        Returns:
        true (有边) or false(无边)
      • hasRelationship

        boolean hasRelationship​(Direction direction,
                                RelationshipType... types)
        查看此点是否存在某类指定方向的边
        Parameters:
        types - 边的某些类型
        direction - 边的方向
        Returns:
        true (有边) or false(无边)
      • getRelationships

        Iterable<Relationship> getRelationships​(Direction dir)
        返回此点指定方向的边迭代器
        Parameters:
        dir - 边的方向
        Returns:
        符合条件的边的迭代器
      • hasRelationship

        boolean hasRelationship​(Direction dir)
        查看此点是否存在指定方向的边
        Parameters:
        dir - 边的方向
        Returns:
        true (有边) or false(无边)
      • getRelationships

        Iterable<Relationship> getRelationships​(RelationshipType type,
                                                Direction dir)
        返回此点指定方向的某些类型的边迭代器
        Parameters:
        dir - 边的方向
        type - 边的某些类型
        Returns:
        符合条件的边的迭代器
      • getSingleRelationship

        Relationship getSingleRelationship​(RelationshipType type,
                                           Direction dir)
        返回此点指定方向和边类型的一条边
        Parameters:
        type - 边的类型
        dir - 边的方向
        Returns:
        符合条件的唯一边
      • createRelationshipTo

        Relationship createRelationshipTo​(Node otherNode,
                                          RelationshipType type)
        创建并返回此点与另一点的指定边类型的边
        Parameters:
        otherNode - 新边的终止点
        type - 新边的类型
        Returns:
        被创建的新边
      • getRelationshipTypes

        Iterable<RelationshipType> getRelationshipTypes()
        返回此点边类型的迭代器
        Returns:
        此点边类型的迭代器
      • getDegree

        int getDegree()
        返回所有与此点连接的边数量
        Returns:
        所有边的数量
      • getDegree

        int getDegree​(RelationshipType type)
        返回指定类型此点的边数量
        Parameters:
        type - 边的类型
        Returns:
        符合条件的边的数量
      • getDegree

        int getDegree​(Direction direction)
        返回此点指定方向的边数量
        Parameters:
        direction - 边方向
        Returns:
        符合条件的边的数量
      • getDegree

        int getDegree​(RelationshipType type,
                      Direction direction)
        返回此点指定类型指定方向的边数量
        Parameters:
        direction - 边方向
        type - 边的类型
        Returns:
        符合条件的边的数量
      • isType

        boolean isType​(NodeType type)
        判断是否为指定的点类型
        Parameters:
        type - 点的类型
        Returns:
        true (是) or false(否)
      • getNodeType

        String getNodeType()
        返回此点的类型名
        Returns:
        点的类型名
      • getPkValue

        String getPkValue()
        返回此点的主键值
        Returns:
        点主键值
      • getPkName

        String getPkName​(String typeName)
        获取此点的主键名
        Parameters:
        typeName - 类型名
        Returns:
        主键名