-
public interface BackendPreparedStatementJust an interface to decouple dependency from PreparedStatementWrapper.- Author:
- harald
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> intset(DataType<T> dataType, int p, T object, boolean mapNull, java.lang.Integer size)Sets the object into the statement via itsDataType.
This method is provided for application-specific types.<T> voidset(DataType<T> dataType, int p, T object, int index, boolean mapNull, java.lang.Integer size)Sets a column of an object into a prepared statement via itsDataType.
This method is provided for application-specific types.voidset(SqlType sqlType, int p, java.lang.Object object)Generic setter for objects via knownSqlType.voidsetArray(int p, java.lang.Class<?> type, int columnIndex, java.util.Collection<?> elements, java.lang.String operator)Sets an array parameter.
Used for array operators such as IN, ANY or ALL.voidsetBigDecimal(int p, java.math.BigDecimal d)Sets the designated parameter to the givenjava.math.BigDecimalvalue.voidsetBoolean(int p, boolean b)Sets the designated parameter to the given Javabooleanvalue.voidsetBoolean(int p, java.lang.Boolean b)Sets the designated parameter to the given JavaBooleanvalue.voidsetByte(int p, byte b)Sets the designated parameter to the given Javabytevalue.voidsetByte(int p, java.lang.Byte b)Sets the designated parameter to the given JavaBytevalue.voidsetChar(int p, char c)Sets the designated parameter to the given Javacharvalue.voidsetCharacter(int p, java.lang.Character c)Sets the designated parameter to the given JavaCharactervalue.voidsetCharacter(int p, java.lang.Character c, boolean mapNull)Sets the designated parameter to the given JavaCharactervalue.voidsetDate(int p, java.sql.Date d)Sets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application.voidsetDate(int p, java.sql.Date d, boolean mapNull)Sets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application.voidsetDate(int p, java.sql.Date d, java.util.Calendar timezone)Sets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application.voidsetDate(int p, java.sql.Date d, java.util.Calendar timezone, boolean mapNull)Sets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application.voidsetDouble(int p, double d)Sets the designated parameter to the given Javadoublevalue.voidsetDouble(int p, java.lang.Double d)Sets the designated parameter to the given JavaDoublevalue.voidsetFloat(int p, float f)Sets the designated parameter to the given Javafloatvalue.voidsetFloat(int p, java.lang.Float f)Sets the designated parameter to the given JavaFloatvalue.voidsetInt(int p, int i)Sets the designated parameter to the given Javaintvalue.voidsetInteger(int p, java.lang.Integer i)Sets the designated parameter to the given JavaIntegervalue.voidsetLargeString(int p, java.lang.String s)Sets a very large string.
This is usually converted to SQLCLOB.voidsetLargeString(int p, java.lang.String s, boolean mapNull)Sets a very large string.
This is usually converted to SQLCLOB.voidsetLocalDate(int p, java.time.LocalDate d)Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application.voidsetLocalDate(int p, java.time.LocalDate d, boolean mapNull)Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application.voidsetLocalDate(int p, java.time.LocalDate d, java.util.Calendar timezone)Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application.voidsetLocalDate(int p, java.time.LocalDate d, java.util.Calendar timezone, boolean mapNull)Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application.voidsetLocalDateTime(int p, java.time.LocalDateTime ts)Sets the designated parameter to the givenjava.time.LocalDateTimevalue.voidsetLocalDateTime(int p, java.time.LocalDateTime ts, boolean mapNull)Sets the designated parameter to the givenjava.time.LocalDateTimevalue.voidsetLocalDateTime(int p, java.time.LocalDateTime ts, java.util.Calendar timezone)Sets the designated parameter to the givenjava.time.LocalDateTimevalue.voidsetLocalDateTime(int p, java.time.LocalDateTime ts, java.util.Calendar timezone, boolean mapNull)Sets the designated parameter to the givenjava.time.LocalDateTimevalue.voidsetLocalTime(int p, java.time.LocalTime t)Sets the designated parameter to the givenjava.time.LocalTimevalue.voidsetLocalTime(int p, java.time.LocalTime t, java.util.Calendar timezone)Sets the designated parameter to the givenjava.time.LocalTimevalue.voidsetLong(int p, long l)Sets the designated parameter to the given Javalongvalue.voidsetLong(int p, java.lang.Long l)Sets the designated parameter to the given JavaLongvalue.voidsetNull(int pos, int type)Sets the designated parameter to SQLNULL.voidsetShort(int p, short s)Sets the designated parameter to the given Javashortvalue.voidsetShort(int p, java.lang.Short s)Sets the designated parameter to the given JavaShortvalue.voidsetString(int p, java.lang.String s)Sets the designated parameter to the given JavaStringvalue.voidsetString(int p, java.lang.String s, boolean mapNull)Sets the designated parameter to the given JavaStringvalue.voidsetTime(int p, java.sql.Time t)Sets the designated parameter to the givenjava.sql.Timevalue.voidsetTime(int p, java.sql.Time t, java.util.Calendar timezone)Sets the designated parameter to the givenjava.sql.Timevalue.voidsetTimestamp(int p, java.sql.Timestamp ts)Sets the designated parameter to the givenjava.sql.Timestampvalue.voidsetTimestamp(int p, java.sql.Timestamp ts, boolean mapNull)Sets the designated parameter to the givenjava.sql.Timestampvalue.voidsetTimestamp(int p, java.sql.Timestamp ts, java.util.Calendar timezone)Sets the designated parameter to the givenjava.sql.Timestampvalue.voidsetTimestamp(int p, java.sql.Timestamp ts, java.util.Calendar timezone, boolean mapNull)Sets the designated parameter to the givenjava.sql.Timestampvalue.
-
-
-
Method Detail
-
set
<T> int set(DataType<T> dataType, int p, T object, boolean mapNull, java.lang.Integer size)
Sets the object into the statement via itsDataType.
This method is provided for application-specific types.- Type Parameters:
T- the type- Parameters:
dataType- the datatypep- the positional index, starting at 1object- the object of given datatypemapNull- true if map null valuessize- the optional size from the model- Returns:
- the number of columns set
-
set
<T> void set(DataType<T> dataType, int p, T object, int index, boolean mapNull, java.lang.Integer size)
Sets a column of an object into a prepared statement via itsDataType.
This method is provided for application-specific types.- Type Parameters:
T- the type- Parameters:
dataType- the datatypep- the positional index, starting at 1object- the object of given datatypeindex- the column indexmapNull- true if map null valuessize- the optional size from the model
-
set
void set(SqlType sqlType, int p, java.lang.Object object)
Generic setter for objects via knownSqlType.- Parameters:
sqlType- the sql typep- the positional index, starting at 1object- the object of given sql type
-
setArray
void setArray(int p, java.lang.Class<?> type, int columnIndex, java.util.Collection<?> elements, java.lang.String operator)Sets an array parameter.
Used for array operators such as IN, ANY or ALL.- Parameters:
p- the first parameter is 1, the second is 2, ...type- the type of the array's elements, or the inner type if elements implement ConvertiblecolumnIndex- the column index for multi columnDataTypes, -1 if type is a Convertible, ignored otherwiseelements- the array elementsoperator- the array operator
-
setBoolean
void setBoolean(int p, java.lang.Boolean b)Sets the designated parameter to the given JavaBooleanvalue. The driver converts this to an SQLBITorBOOLEANvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...b- the parameter value, null if the value should be set to SQL NULL
-
setBoolean
void setBoolean(int p, boolean b)Sets the designated parameter to the given Javabooleanvalue. The driver converts this to an SQLBITorBOOLEANvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...b- the parameter value
-
setByte
void setByte(int p, java.lang.Byte b)Sets the designated parameter to the given JavaBytevalue. The driver converts this to an SQLTINYINTvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...b- the parameter value, null if the value should be set to SQL NULL
-
setByte
void setByte(int p, byte b)Sets the designated parameter to the given Javabytevalue. The driver converts this to an SQLTINYINTvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...b- the parameter value
-
setChar
void setChar(int p, char c)Sets the designated parameter to the given Javacharvalue. The driver converts this to an SQLVARCHARwhen it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...c- the parameter value
-
setCharacter
void setCharacter(int p, java.lang.Character c)Sets the designated parameter to the given JavaCharactervalue. The driver converts this to an SQLVARCHARwhen it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...c- the parameter value, null if the value should be set to SQL NULL
-
setCharacter
void setCharacter(int p, java.lang.Character c, boolean mapNull)Sets the designated parameter to the given JavaCharactervalue. The driver converts this to an SQLVARCHARwhen it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...c- the parameter value, null if the value should be set to SQL NULLmapNull- true if null values should be mapped to BLANK, else SQL NULL
-
setDate
void setDate(int p, java.sql.Date d)Sets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application. The driver converts this to an SQLDATEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter value, null if the value should be set to SQL NULL
-
setDate
void setDate(int p, java.sql.Date d, boolean mapNull)Sets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application. The driver converts this to an SQLDATEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter valuemapNull- to map null values to 1.1.1970 (epochal time zero), else SQL NULL
-
setDate
void setDate(int p, java.sql.Date d, java.util.Calendar timezone)Sets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application. The driver converts this to an SQLDATEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter valuetimezone- the calendar providing the timezone configuration
-
setDate
void setDate(int p, java.sql.Date d, java.util.Calendar timezone, boolean mapNull)Sets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application. The driver converts this to an SQLDATEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter valuetimezone- the calendar providing the timezone configurationmapNull- to map null values to 1.1.1970 (epochal time zero), else SQL NULL
-
setDouble
void setDouble(int p, java.lang.Double d)Sets the designated parameter to the given JavaDoublevalue. The driver converts this to an SQLDOUBLEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter value, null if the value should be set to SQL NULL
-
setDouble
void setDouble(int p, double d)Sets the designated parameter to the given Javadoublevalue. The driver converts this to an SQLDOUBLEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter value
-
setFloat
void setFloat(int p, java.lang.Float f)Sets the designated parameter to the given JavaFloatvalue. The driver converts this to an SQLREALvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...f- the parameter value, null if the value should be set to SQL NULL
-
setFloat
void setFloat(int p, float f)Sets the designated parameter to the given Javafloatvalue. The driver converts this to an SQLREALvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...f- the parameter value
-
setInt
void setInt(int p, int i)Sets the designated parameter to the given Javaintvalue. The driver converts this to an SQLINTEGERvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...i- the parameter value
-
setInteger
void setInteger(int p, java.lang.Integer i)Sets the designated parameter to the given JavaIntegervalue. The driver converts this to an SQLINTEGERvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...i- the parameter value, null if the value should be set to SQL NULL
-
setLocalDate
void setLocalDate(int p, java.time.LocalDate d)Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application. The driver converts this to an SQLDATEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter value, null if the value should be set to SQL NULL
-
setLocalDate
void setLocalDate(int p, java.time.LocalDate d, boolean mapNull)Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application. The driver converts this to an SQLDATEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter valuemapNull- to map null values to 1.1.1970 (epochal time zero), else SQL NULL
-
setLocalDate
void setLocalDate(int p, java.time.LocalDate d, java.util.Calendar timezone)Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application. The driver converts this to an SQLDATEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter valuetimezone- the calendar providing the timezone configuration
-
setLocalDate
void setLocalDate(int p, java.time.LocalDate d, java.util.Calendar timezone, boolean mapNull)Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application. The driver converts this to an SQLDATEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter valuetimezone- the calendar providing the timezone configurationmapNull- to map null values to 1.1.1970 (epochal time zero), else SQL NULL
-
setLocalDateTime
void setLocalDateTime(int p, java.time.LocalDateTime ts)Sets the designated parameter to the givenjava.time.LocalDateTimevalue. The driver converts this to an SQLTIMESTAMPvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...ts- the parameter value, null if the value should be set to SQL NULL
-
setLocalDateTime
void setLocalDateTime(int p, java.time.LocalDateTime ts, boolean mapNull)Sets the designated parameter to the givenjava.time.LocalDateTimevalue. The driver converts this to an SQLTIMESTAMPvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...ts- the parameter valuemapNull- to map null values to 1.1.1970 00:00:00.000 (epochal time zero), else SQL NULL
-
setLocalDateTime
void setLocalDateTime(int p, java.time.LocalDateTime ts, java.util.Calendar timezone)Sets the designated parameter to the givenjava.time.LocalDateTimevalue. The driver converts this to an SQLTIMESTAMPvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...ts- the parameter valuetimezone- the calendar providing the timezone configuration else SQL NULL
-
setLocalDateTime
void setLocalDateTime(int p, java.time.LocalDateTime ts, java.util.Calendar timezone, boolean mapNull)Sets the designated parameter to the givenjava.time.LocalDateTimevalue. The driver converts this to an SQLTIMESTAMPvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...ts- the parameter valuetimezone- the calendar providing the timezone configurationmapNull- to map null values to 1.1.1970 00:00:00.000 (epochal time zero), else SQL NULL
-
setLocalTime
void setLocalTime(int p, java.time.LocalTime t)Sets the designated parameter to the givenjava.time.LocalTimevalue. The driver converts this to an SQLTIMEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...t- the parameter value, null if the value should be set to SQL NULL
-
setLocalTime
void setLocalTime(int p, java.time.LocalTime t, java.util.Calendar timezone)Sets the designated parameter to the givenjava.time.LocalTimevalue. The driver converts this to an SQLTIMEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...t- the parameter value, null if the value should be set to SQL NULLtimezone- the calendar providing the timezone configuration
-
setLong
void setLong(int p, java.lang.Long l)Sets the designated parameter to the given JavaLongvalue. The driver converts this to an SQLBIGINTvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...l- the parameter value, null if the value should be set to SQL NULL
-
setLong
void setLong(int p, long l)Sets the designated parameter to the given Javalongvalue. The driver converts this to an SQLBIGINTvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...l- the parameter value
-
setNull
void setNull(int pos, int type)Sets the designated parameter to SQLNULL.- Parameters:
pos- the first parameter is 1, the second is 2, ...type- the SQL type code defined injava.sql.Types
-
setShort
void setShort(int p, java.lang.Short s)Sets the designated parameter to the given JavaShortvalue. The driver converts this to an SQLSMALLINTvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...s- the parameter value, null if the value should be set to SQL NULL
-
setShort
void setShort(int p, short s)Sets the designated parameter to the given Javashortvalue. The driver converts this to an SQLSMALLINTvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...s- the parameter value
-
setString
void setString(int p, java.lang.String s)Sets the designated parameter to the given JavaStringvalue. The driver converts this to an SQLVARCHARorLONGVARCHARvalue (depending on the argument's size relative to the driver's limits onVARCHARvalues) when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...s- the parameter value, null if the value should be set to SQL NULL
-
setString
void setString(int p, java.lang.String s, boolean mapNull)Sets the designated parameter to the given JavaStringvalue. The driver converts this to an SQLVARCHARorLONGVARCHARvalue (depending on the argument's size relative to the driver's limits onVARCHARvalues) when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...s- the parameter valuemapNull- true if null values should be mapped to the empty string, else SQL NULL
-
setLargeString
void setLargeString(int p, java.lang.String s, boolean mapNull)Sets a very large string.
This is usually converted to SQLCLOB.- Parameters:
p- the first parameter is 1, the second is 2, ...s- the parameter valuemapNull- true if null values should be mapped to the empty string, else SQL NULL
-
setLargeString
void setLargeString(int p, java.lang.String s)Sets a very large string.
This is usually converted to SQLCLOB.- Parameters:
p- the first parameter is 1, the second is 2, ...s- the parameter value, null if the value should be set to SQL NULL
-
setTime
void setTime(int p, java.sql.Time t)Sets the designated parameter to the givenjava.sql.Timevalue. The driver converts this to an SQLTIMEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...t- the parameter value, null if the value should be set to SQL NULL
-
setTime
void setTime(int p, java.sql.Time t, java.util.Calendar timezone)Sets the designated parameter to the givenjava.sql.Timevalue. The driver converts this to an SQLTIMEvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...t- the parameter value, null if the value should be set to SQL NULLtimezone- the calendar providing the timezone configuration
-
setTimestamp
void setTimestamp(int p, java.sql.Timestamp ts)Sets the designated parameter to the givenjava.sql.Timestampvalue. The driver converts this to an SQLTIMESTAMPvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...ts- the parameter value, null if the value should be set to SQL NULL
-
setTimestamp
void setTimestamp(int p, java.sql.Timestamp ts, boolean mapNull)Sets the designated parameter to the givenjava.sql.Timestampvalue. The driver converts this to an SQLTIMESTAMPvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...ts- the parameter valuemapNull- to map null values to 1.1.1970 00:00:00.000 (epochal time zero), else SQL NULL
-
setTimestamp
void setTimestamp(int p, java.sql.Timestamp ts, java.util.Calendar timezone)Sets the designated parameter to the givenjava.sql.Timestampvalue. The driver converts this to an SQLTIMESTAMPvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...ts- the parameter valuetimezone- the calendar providing the timezone configuration else SQL NULL
-
setTimestamp
void setTimestamp(int p, java.sql.Timestamp ts, java.util.Calendar timezone, boolean mapNull)Sets the designated parameter to the givenjava.sql.Timestampvalue. The driver converts this to an SQLTIMESTAMPvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...ts- the parameter valuetimezone- the calendar providing the timezone configurationmapNull- to map null values to 1.1.1970 00:00:00.000 (epochal time zero), else SQL NULL
-
setBigDecimal
void setBigDecimal(int p, java.math.BigDecimal d)Sets the designated parameter to the givenjava.math.BigDecimalvalue. The driver converts this to an SQLNUMERICvalue when it sends it to the database.- Parameters:
p- the first parameter is 1, the second is 2, ...d- the parameter value, null if the value should be set to SQL NULL
-
-