Package org.jdbi.v3.core.argument
Class ObjectArgument
- java.lang.Object
-
- org.jdbi.v3.core.argument.ObjectArgument
-
-
Constructor Summary
Constructors Constructor Description ObjectArgument(java.lang.Object value, java.lang.Integer sqlType)Deprecated.useof(Object, Integer)factory method for more consistentnullhandling
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(int position, java.sql.PreparedStatement statement, StatementContext ctx)Apply the argument to the given prepared statement.static Argumentof(java.lang.Object value)Bind a vendor-supported object with the given SQL type.static Argumentof(java.lang.Object value, java.lang.Integer sqlType)Bind a vendor-supported object with the given SQL type.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ObjectArgument
@Deprecated public ObjectArgument(java.lang.Object value, java.lang.Integer sqlType)Deprecated.useof(Object, Integer)factory method for more consistentnullhandlingBind 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:
Types
-
-
Method Detail
-
of
public static Argument of(java.lang.Object value)
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
public static Argument of(java.lang.Object value, java.lang.Integer sqlType)
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:
Types
-
apply
public void apply(int position, java.sql.PreparedStatement statement, StatementContext ctx) throws java.sql.SQLExceptionDescription copied from interface:ArgumentApply the argument to the given prepared statement.- Specified by:
applyin 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:
java.sql.SQLException- if anything goes wrong
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-