Package com.graphdbapi.values.api
Interface Node
-
- All Superinterfaces:
Entity<java.lang.Long>
,PropertyEntity
public interface Node extends Entity<java.lang.Long>
点实体。 点的id是唯一的。
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Relationship
createRelationshipTo(Node otherNode, RelationshipType type)
创建并返回此点与另一点的指定边类型的边void
delete()
删除此点int
getDegree()
返回所有与此点连接的边数量int
getDegree(Direction direction)
返回此点指定方向的边数量int
getDegree(RelationshipType type)
返回指定类型此点的边数量int
getDegree(RelationshipType type, Direction direction)
返回此点指定类型指定方向的边数量java.lang.Long
getId()
返回实体唯一标识ID=java.lang.String
getNodeType()
返回此点的类型名java.lang.String
getPkName(java.lang.String typeName)
获取此点的主键名java.lang.String
getPkValue()
返回此点的主键值java.lang.Iterable<Relationship>
getRelationships()
返回此点上的所有边的迭代器java.lang.Iterable<Relationship>
getRelationships(Direction dir)
返回此点指定方向的边迭代器java.lang.Iterable<Relationship>
getRelationships(Direction direction, RelationshipType... types)
返回此点指定某些类型指定方向的边的迭代器java.lang.Iterable<Relationship>
getRelationships(RelationshipType... types)
返回此点指定某些类型的边的迭代器java.lang.Iterable<Relationship>
getRelationships(RelationshipType type, Direction dir)
返回此点指定方向的某些类型的边迭代器java.lang.Iterable<RelationshipType>
getRelationshipTypes()
返回此点边类型的迭代器Relationship
getSingleRelationship(RelationshipType type, Direction dir)
返回此点指定方向和边类型的一条边boolean
hasRelationship()
查看此点是否存在边boolean
hasRelationship(Direction dir)
查看此点是否存在指定方向的边boolean
hasRelationship(Direction direction, RelationshipType... types)
查看此点是否存在某类指定方向的边boolean
hasRelationship(RelationshipType... types)
查看此点是否存在某类边boolean
isType(NodeType type)
判断是否为指定的点类型-
Methods inherited from interface com.graphdbapi.values.api.PropertyEntity
getAllProperties, getProperties, getProperty, getProperty, getPropertyKeys, hasProperty, removeProperty, setProperty
-
-
-
-
Method Detail
-
getId
java.lang.Long getId()
返回实体唯一标识ID=
-
delete
void delete()
删除此点
-
getRelationships
java.lang.Iterable<Relationship> getRelationships()
返回此点上的所有边的迭代器- Returns:
- 边的迭代器
-
hasRelationship
boolean hasRelationship()
查看此点是否存在边- Returns:
- true (有边) or false(无边)
-
getRelationships
java.lang.Iterable<Relationship> getRelationships(RelationshipType... types)
返回此点指定某些类型的边的迭代器- Parameters:
types
- 边的某些类型- Returns:
- 符合条件的边迭代器
-
getRelationships
java.lang.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
java.lang.Iterable<Relationship> getRelationships(Direction dir)
返回此点指定方向的边迭代器- Parameters:
dir
- 边的方向- Returns:
- 符合条件的边的迭代器
-
hasRelationship
boolean hasRelationship(Direction dir)
查看此点是否存在指定方向的边- Parameters:
dir
- 边的方向- Returns:
- true (有边) or false(无边)
-
getRelationships
java.lang.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
java.lang.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
java.lang.String getNodeType()
返回此点的类型名- Returns:
- 点的类型名
-
getPkValue
java.lang.String getPkValue()
返回此点的主键值- Returns:
- 点主键值
-
getPkName
java.lang.String getPkName(java.lang.String typeName)
获取此点的主键名- Parameters:
typeName
- 类型名- Returns:
- 主键名
-
-