Interface ParameterizedOperation<T>

  • Type Parameters:
    T - the type of the result of this Operation
    All Superinterfaces:
    Operation<T>, PrimitiveOperation<T>
    All Known Subinterfaces:
    MultiOperation<T>, OutOperation<T>, ParameterizedRowCountOperation<T>, ParameterizedRowOperation<T>, ParameterizedRowPublisherOperation<T>

    public interface ParameterizedOperation<T>
    extends Operation<T>
    An Operation that has in parameters. As the SQL is vendor specific, how parameters are represented in the SQL is itself vendor specific. For positional parameters, those where all parameters are indicated by the same character sequence, for example '?', it is recommended that the parameter id be the decimal integer representation of the parameter number. A SQL structured type passed as an argument to a set method must be created by the same Session that the created the ParameterizedOperation. If not IllegalArgumentException is thrown. A SQL structured type is one of SqlArray, SqlBlob, SqlClob, SqlRef or SqlStruct. This limitation holds recursively for all components of a SQL structured type. An implementation may relax this constraint.
    • Method Detail

      • set

        ParameterizedOperation<T> set​(java.lang.String id,
                                      java.lang.Object value,
                                      SqlType type)
        Set a parameter value. The value is captured and should not be modified before the Operation is completed.
        Parameters:
        id - the identifier of the parameter marker to be set
        value - the value the parameter is to be set to
        type - the SQL type of the value to send to the database
        Returns:
        this Operation
      • set

        ParameterizedOperation<T> set​(java.lang.String id,
                                      java.lang.Object value)
        Set a parameter value. Use a default SQL type determined by the type of the value argument. The value is captured and should not be modified before the Operation is completed.
        Parameters:
        id - the identifier of the parameter marker to be set
        value - the value the parameter is to be set to
        Returns:
        this Operation
      • set

        ParameterizedOperation<T> set​(java.lang.String id,
                                      java.util.concurrent.CompletionStage<?> source,
                                      SqlType type)
        Set a parameter value to be the value of a CompletionStage. The Operation will not be executed until the CompletionStage is completed. This method allows submitting Operations that depend on the result of previous Operations rather than requiring that the dependent Operation be submitted only when the previous Operation completes.
        Parameters:
        id - the identifier of the parameter marker to be set
        source - the CompletionStage that provides the value the parameter is to be set to
        type - the SQL type of the value to send to the database
        Returns:
        this Operation
      • set

        ParameterizedOperation<T> set​(java.lang.String id,
                                      java.util.concurrent.CompletionStage<?> source)
        Set a parameter value to be the future value of a CompletionStage. The Operation will not be executed until the CompletionStage is completed. This method allows submitting Operations that depend on the result of previous Operations rather than requiring that the dependent Operation be submitted only when the previous Operation completes. Use a default SQL type determined by the type of the value of the CompletionStage argument.
        Parameters:
        id - the identifier of the parameter marker to be set
        source - the CompletionStage that provides the value the parameter is to be set to
        Returns:
        this Operation