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.MutationStrategy
build()
Builds a PickingStrategy.PickingStrategyBuilder
setPickByEdgeId(oracle.pgx.common.mutations.PickingStrategyFunction pickingStrategyFunction)
PickingStrategyBuilder
setPickByLabel(oracle.pgx.common.mutations.PickingStrategyFunction pickingStrategyFunction)
If there are multiple edges between two vertices, the edge whose label satisfies thePickingStrategyFunction
will be picked.PickingStrategyBuilder
setPickByProperty(EdgeProperty edgeProperty, oracle.pgx.common.mutations.PickingStrategyFunction pickingStrategyFunction)
If there are multiple edges between two vertices, the edge that satisfies thePickingStrategyFunction
will 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 thePickingStrategyFunction
will 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 thePickingStrategyFunction
will 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.InterruptedException
Builds a PickingStrategy.Per default, it will pick any edge. To change this behavior, call either setPickByProperty or setPickByEdgeId beforehand.
- Specified by:
build
in classMutationStrategyBuilder<PickingStrategyBuilder>
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
-