-
- Type Parameters:
T
- the type of the result of thisOperation
- 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 sameSession
that the created theParameterizedOperation
. If notIllegalArgumentException
is thrown. A SQL structured type is one ofSqlArray
,SqlBlob
,SqlClob
,SqlRef
orSqlStruct
. This limitation holds recursively for all components of a SQL structured type. An implementation may relax this constraint.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ParameterizedOperation<T>
set(java.lang.String id, java.lang.Object value)
Set a parameter value.ParameterizedOperation<T>
set(java.lang.String id, java.lang.Object value, SqlType type)
Set a parameter value.ParameterizedOperation<T>
set(java.lang.String id, java.util.concurrent.CompletionStage<?> source)
Set a parameter value to be the future value of aCompletionStage
.ParameterizedOperation<T>
set(java.lang.String id, java.util.concurrent.CompletionStage<?> source, SqlType type)
Set a parameter value to be the value of aCompletionStage
.-
Methods inherited from interface jdk.incubator.sql2.PrimitiveOperation
submit
-
-
-
-
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 theOperation
is completed.- Parameters:
id
- the identifier of the parameter marker to be setvalue
- the value the parameter is to be set totype
- 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 theOperation
is completed.- Parameters:
id
- the identifier of the parameter marker to be setvalue
- 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 aCompletionStage
. TheOperation
will not be executed until theCompletionStage
is completed. This method allows submittingOperation
s that depend on the result of previousOperation
s rather than requiring that the dependentOperation
be submitted only when the previousOperation
completes.- Parameters:
id
- the identifier of the parameter marker to be setsource
- theCompletionStage
that provides the value the parameter is to be set totype
- 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 aCompletionStage
. TheOperation
will not be executed until theCompletionStage
is completed. This method allows submittingOperation
s that depend on the result of previousOperation
s rather than requiring that the dependentOperation
be submitted only when the previousOperation
completes. Use a default SQL type determined by the type of the value of theCompletionStage
argument.- Parameters:
id
- the identifier of the parameter marker to be setsource
- theCompletionStage
that provides the value the parameter is to be set to- Returns:
- this
Operation
-
-