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(java.lang.String 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. |
ChangeType |
getEdgeChangeType(java.lang.Object id)
Returns the
ChangeType of the update for the edge with the given ID |
ChangeType |
getVertexChangeType(VID id)
Returns the
ChangeType of the update for the vertex with the given ID |
GraphChangeSet<VID> |
removeEdge(long edgeId)
Removes an edge from the graph.
|
GraphChangeSet<VID> |
removeEdge(java.lang.String 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> |
resetEdge(java.lang.String 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. |
EdgeModifier<VID> |
updateEdge(java.lang.String 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, addEdge, addVertex, build, build, buildAsync, buildAsync, getConfigParameter, getSession, setConfigParameter, setDataSourceVersion
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEdge, addEdge, addVertex, buildNewSnapshot, setRetainEdgeIds, setRetainIds, setRetainVertexIds
addEdge, build, build, buildAsync, buildAsync, getConfigParameter, setConfigParameter, setDataSourceVersion
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(java.lang.String 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 ChangeType getEdgeChangeType(java.lang.Object id)
GraphChangeSet
ChangeType
of the update for the edge with the given IDgetEdgeChangeType
in interface GraphChangeSet<VID>
id
- the ID of the edge that should be referencedChangeType
or null if the graph doesn't have an edge with the given IDpublic ChangeType getVertexChangeType(VID id)
GraphChangeSet
ChangeType
of the update for the vertex with the given IDgetVertexChangeType
in interface GraphChangeSet<VID>
id
- the ID of the vertex that should be referencedChangeType
or null if the graph doesn't have an vertex with the given IDpublic GraphChangeSet<VID> removeEdge(long edgeId)
GraphChangeSet
removeEdge
in interface GraphChangeSet<VID>
edgeId
- the ID of the edge to be removedpublic GraphChangeSet<VID> removeEdge(java.lang.String 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> resetEdge(java.lang.String 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 EdgeModifier<VID> updateEdge(java.lang.String 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
instance