Package org.jdbi.v3.core.argument
Class ObjectArgument
java.lang.Object
org.jdbi.v3.core.argument.ObjectArgument
- All Implemented Interfaces:
Argument
An Argument which uses
setObject
to support
vendor specific types.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(int position, PreparedStatement statement, StatementContext ctx) Apply the argument to the given prepared statement.static Argument
Bind a vendor-supported object with the given SQL type.static Argument
Bind a vendor-supported object with the given SQL type.toString()
-
Constructor Details
-
ObjectArgument
Deprecated.useof(Object, Integer)
factory method for more consistentnull
handlingBind a vendor-supported object with the given SQL type.- Parameters:
value
- the value to call @linkPreparedStatement.setObject(int, Object)
withsqlType
- the type to bind- See Also:
-
-
Method Details
-
of
Bind a vendor-supported object with the given SQL type.- Parameters:
value
- the value to call @linkPreparedStatement.setObject(int, Object)
with- Returns:
- the Argument
-
of
Bind a vendor-supported object with the given SQL type.- Parameters:
value
- the value to call @linkPreparedStatement.setObject(int, Object, int)
withsqlType
- the type to bind- Returns:
- the Argument
- See Also:
-
apply
public void apply(int position, PreparedStatement statement, StatementContext ctx) throws SQLException Description copied from interface:Argument
Apply the argument to the given prepared statement.- Specified by:
apply
in interfaceArgument
- Parameters:
position
- the position to which the argument should be bound, using the stupid JDBC "start at 1" bitstatement
- the prepared statement the argument is to be bound toctx
- the statement context- Throws:
SQLException
- if anything goes wrong
-
toString
-
of(Object, Integer)
factory method for more consistentnull
handling