Class PickingStrategyBuilder

    • 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 the PickingStrategyFunction 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 the PickingStrategyFunction 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 class MutationStrategyBuilder<PickingStrategyBuilder>
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException