Package oracle.pgx.api
Class PickingStrategyBuilder
- java.lang.Object
-
- oracle.pgx.api.MutationStrategyBuilder<PickingStrategyBuilder>
-
- oracle.pgx.api.PickingStrategyBuilder
-
public class PickingStrategyBuilder extends MutationStrategyBuilder<PickingStrategyBuilder>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description oracle.pgx.common.mutations.MutationStrategybuild()Builds a PickingStrategy.PickingStrategyBuildersetPickByEdgeId(oracle.pgx.common.mutations.PickingStrategyFunction pickingStrategyFunction)PickingStrategyBuildersetPickByLabel(oracle.pgx.common.mutations.PickingStrategyFunction pickingStrategyFunction)If there are multiple edges between two vertices, the edge whose label satisfies thePickingStrategyFunctionwill be picked.PickingStrategyBuildersetPickByProperty(EdgeProperty edgeProperty, oracle.pgx.common.mutations.PickingStrategyFunction pickingStrategyFunction)If there are multiple edges between two vertices, the edge that satisfies thePickingStrategyFunctionwill be picked.-
Methods inherited from class oracle.pgx.api.MutationStrategyBuilder
dropEdgeProperties, dropEdgeProperty, dropVertexProperties, dropVertexProperty, setCopyMode, setKeptEdgeProperties, setKeptVertexProperties, setMultiEdges, setNewGraphName, setSelfEdges, setTrivialVertices
-
-
-
-
Method Detail
-
setPickByProperty
public PickingStrategyBuilder setPickByProperty(EdgeProperty edgeProperty, oracle.pgx.common.mutations.PickingStrategyFunction pickingStrategyFunction)
If there are multiple edges between two vertices, the edge that satisfies thePickingStrategyFunctionwill be picked.For instance, pick the edge where property_1 is MAX. Note, if two or more properties could be chosen according to the
PickingStrategyFunction, only one of them is picked.- Parameters:
edgeProperty-pickingStrategyFunction-
-
setPickByLabel
public PickingStrategyBuilder setPickByLabel(oracle.pgx.common.mutations.PickingStrategyFunction pickingStrategyFunction)
If there are multiple edges between two vertices, the edge whose label satisfies thePickingStrategyFunctionwill be picked.- Parameters:
pickingStrategyFunction-
-
setPickByEdgeId
public PickingStrategyBuilder setPickByEdgeId(oracle.pgx.common.mutations.PickingStrategyFunction pickingStrategyFunction)
-
build
public oracle.pgx.common.mutations.MutationStrategy build() throws java.util.concurrent.ExecutionException, java.lang.InterruptedExceptionBuilds a PickingStrategy.Per default, it will pick any edge. To change this behavior, call either setPickByProperty or setPickByEdgeId beforehand.
- Specified by:
buildin classMutationStrategyBuilder<PickingStrategyBuilder>- Throws:
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedException
-
-