@groovy.util.logging.Slf4j class VertexBuilder extends PropertyValuesHolder<VertexBuilder>
Builder class used when creating verticies from a VertexDefinition object.
Type | Name and description |
---|---|
VertexDefinition |
vertexDef The source vertex definition of this builder. |
Constructor and description |
---|
VertexBuilder
(VertexDefinition vertexDef) Constructor |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
assertRequiredProperties() Assert that all the properties required by the source vertex definition have been set in this builder. |
|
org.apache.tinkerpop.gremlin.structure.Vertex |
create(org.apache.tinkerpop.gremlin.structure.Graph graph) Create a vertex with the specified properties. |
|
org.apache.tinkerpop.gremlin.structure.Vertex |
createVertex(org.apache.tinkerpop.gremlin.structure.Graph graph) Create a vertex with the specified properties. |
|
org.apache.tinkerpop.gremlin.structure.Vertex |
ensure(org.apache.tinkerpop.gremlin.structure.Graph graph, org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource g) If the vertex with the specified properties exists return it, otherwise create it. |
|
ElementDefinition |
getElementDef() Return the source vertex definition as an element definition. |
|
java.lang.String |
toString() Render this object as a String. |
|
org.apache.tinkerpop.gremlin.process.traversal.Traversal |
traversal(org.apache.tinkerpop.gremlin.structure.Graph graph, org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource g) Returns a graph traversal that starts with vertices that match this vertex builder. |
|
org.apache.tinkerpop.gremlin.structure.Vertex |
vertex(org.apache.tinkerpop.gremlin.structure.Graph graph, org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource g) If the vertex with the specified properties exists return it, otherwise create it. |
The source vertex definition of this builder.
Constructor
The
- source vertex definition of this builder.Assert that all the properties required by the source vertex definition have been set in this builder.
Create a vertex with the specified properties. Usage example, assuming VX.SHIBA_INU is an enum decorated with '@VertexModel':
Vertex rover = VX.SHIBA_INU.instance().create(graph)
Create a vertex with the specified properties. Usage example, assuming VX.SHIBA_INU is an enum decorated with '@VertexModel':
Vertex rover = VX.SHIBA_INU.instance().create(graph)
If the vertex with the specified properties exists return it, otherwise create it. Usage example, assuming VX.SHIBA_INU is an enum decorated with '@VertexModel':
Vertex rover = VX.SHIBA_INU.instance().ensure(graph)
Return the source vertex definition as an element definition.
Render this object as a String.
Returns a graph traversal that starts with vertices that match this vertex builder.
graph
- The property graphg
- A graph traversal source to useIf the vertex with the specified properties exists return it, otherwise create it. Usage example, assuming VX.SHIBA_INU is an enum decorated with '@VertexModel':
Vertex rover = VX.SHIBA_INU.instance().vertex(graph)
Groovy Documentation