public class GraphChangeSetImpl<VID> extends GraphBuilderImpl<VID> implements GraphChangeSet<VID>
Modifier and Type | Method and Description |
---|---|
EdgeBuilder<VID> |
addEdge(long edgeId, VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
Adds an edge with the given edge ID and the given source and destination vertices.
|
EdgeBuilder<VID> |
addEdge(VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
Adds an edge with an implicit ID and the given source and destination vertices.
|
VertexBuilder<VID> |
addVertex()
Adds a vertex with an implicit id to the graph builder.
|
PgxFuture<PgxGraph> |
buildNewSnapshotAsync()
Builds a new snapshot of the graph out of
this GraphChangeSet : the resulting PgxGraph is a new snapshot of the PgxGraph object this was created from. |
GraphChangeSet<VID> |
removeEdge(long edgeId)
Removes an edge from the graph.
|
GraphChangeSet<VID> |
removeVertex(VID vertexId)
Removes a vertex from the graph.
|
GraphChangeSet<VID> |
resetEdge(long edgeId)
Resets any change for the edge with the given ID.
|
GraphChangeSet<VID> |
resetVertex(VertexBuilder<VID> vertex)
Resets any change for the given vertex.
|
GraphChangeSet<VID> |
resetVertex(VID vertexId)
Resets any change for the vertex with the given ID.
|
GraphChangeSet<VID> |
setAddExistingEdgePolicy(OnAddExistingElement addExistingEdgePolicy)
Sets the policy on what to do when an edge is added that already exists
|
GraphChangeSet<VID> |
setAddExistingVertexPolicy(OnAddExistingElement addExistingVertexPolicy)
Sets the policy on what to do when a vertex is added that already exists
|
GraphChangeSet<VID> |
setInvalidChangePolicy(OnInvalidChange invalidChangePolicy)
Sets the policy on what to do when an invalid action is added
|
GraphChangeSet<VID> |
setRequiredConversionPolicy(OnRequiredConversion requiredConversionPolicy)
Sets the policy on what to do when an invalid type is encountered
|
java.lang.String |
toString() |
EdgeModifier<VID> |
updateEdge(long edgeId)
Returns a
EdgeModifier with which you can update edge properties and the edge label. |
VertexModifier<VID> |
updateVertex(VID vertexId)
Returns a
VertexModifier with which you can update vertex properties. |
addEdge, addEdge, addVertex, build, build, buildAsync, buildAsync, getConfigParameter, getSession, setConfigParameter
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEdge, addVertex, buildNewSnapshot, setRetainEdgeIds, setRetainIds, setRetainVertexIds
addEdge, build, build, buildAsync, buildAsync, getConfigParameter, setConfigParameter
public EdgeBuilder<VID> addEdge(long edgeId, VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
GraphBuilder
UnsupportedOperationException
if edge Id generation strategy is set to IdGenerationStrategy.AUTO_GENERATED
addEdge
in interface GraphBuilder<VID>
addEdge
in interface GraphChangeSet<VID>
addEdge
in class GraphBuilderImpl<VID>
edgeId
- the ID of the new edgesrcVertex
- a VertexBuilderImpl
instance representing the source vertexdstVertex
- a VertexBuilderImpl
instance representing the destination vertexVertexBuilderImpl
public EdgeBuilder<VID> addEdge(VertexBuilder<VID> srcVertex, VertexBuilder<VID> dstVertex)
GraphBuilder
UnsupportedOperationException
if edge Id generation strategy is set to IdGenerationStrategy.USER_IDS
addEdge
in interface GraphBuilder<VID>
addEdge
in class GraphBuilderImpl<VID>
srcVertex
- a VertexBuilderImpl
instance representing the source vertexdstVertex
- a VertexBuilderImpl
instance representing the destination vertexVertexBuilderImpl
public VertexBuilder<VID> addVertex()
GraphBuilder
UnsupportedOperationException
if vertex Id generation strategy is set to IdGenerationStrategy.USER_IDS
addVertex
in interface GraphBuilder<VID>
addVertex
in interface GraphChangeSet<VID>
addVertex
in class GraphBuilderImpl<VID>
public final PgxFuture<PgxGraph> buildNewSnapshotAsync()
GraphChangeSet
this
GraphChangeSet
: the resulting PgxGraph
is a new snapshot of the PgxGraph
object this
was created from.buildNewSnapshotAsync
in interface GraphChangeSet<VID>
PgxFuture
to retrieve a new PgxGraph
object with the same name of the original graph and the changes added into this
; the new PgxGraph
is a new snapshot of the original graphpublic GraphChangeSet<VID> removeEdge(long edgeId)
GraphChangeSet
removeEdge
in interface GraphChangeSet<VID>
edgeId
- the ID of the edge to be removedpublic GraphChangeSet<VID> removeVertex(VID vertexId)
GraphChangeSet
removeVertex
in interface GraphChangeSet<VID>
vertexId
- the ID of the vertex to be removedpublic GraphChangeSet<VID> resetEdge(long edgeId)
GraphBuilder
resetEdge
in interface GraphBuilder<VID>
resetEdge
in interface GraphChangeSet<VID>
resetEdge
in class GraphBuilderImpl<VID>
edgeId
- the ID of the edge which should be resetpublic GraphChangeSet<VID> resetVertex(VertexBuilder<VID> vertex)
GraphBuilder
resetVertex
in interface GraphBuilder<VID>
resetVertex
in interface GraphChangeSet<VID>
resetVertex
in class GraphBuilderImpl<VID>
vertex
- a VertexBuilder
public GraphChangeSet<VID> resetVertex(VID vertexId)
GraphBuilder
resetVertex
in interface GraphBuilder<VID>
resetVertex
in interface GraphChangeSet<VID>
resetVertex
in class GraphBuilderImpl<VID>
vertexId
- the ID of the vertex which should be resetpublic GraphChangeSet<VID> setAddExistingEdgePolicy(OnAddExistingElement addExistingEdgePolicy)
GraphChangeSet
setAddExistingEdgePolicy
in interface GraphChangeSet<VID>
addExistingEdgePolicy
- the new policypublic GraphChangeSet<VID> setAddExistingVertexPolicy(OnAddExistingElement addExistingVertexPolicy)
GraphChangeSet
setAddExistingVertexPolicy
in interface GraphChangeSet<VID>
addExistingVertexPolicy
- the new policypublic GraphChangeSet<VID> setInvalidChangePolicy(OnInvalidChange invalidChangePolicy)
GraphChangeSet
setInvalidChangePolicy
in interface GraphChangeSet<VID>
public GraphChangeSet<VID> setRequiredConversionPolicy(OnRequiredConversion requiredConversionPolicy)
GraphChangeSet
setRequiredConversionPolicy
in interface GraphChangeSet<VID>
public java.lang.String toString()
toString
in class GraphBuilderImpl<VID>
public EdgeModifier<VID> updateEdge(long edgeId)
GraphChangeSet
EdgeModifier
with which you can update edge properties and the edge label.updateEdge
in interface GraphChangeSet<VID>
edgeId
- the ID of the edge that should be updatedVertexModifier
instancepublic VertexModifier<VID> updateVertex(VID vertexId)
GraphChangeSet
VertexModifier
with which you can update vertex properties. Throws an exception if the vertex has been removed with this graph change set before.updateVertex
in interface GraphChangeSet<VID>
vertexId
- the ID of the vertex that should be updatedVertexModifier
instanceCopyright © 2010, 2020 Oracle and/or its affiliates. All Rights Reserved.