public interface BackendPreparedStatement
Just an interface to decouple dependency from PreparedStatementWrapper.
- Author:
- harald
-
Method Summary
Modifier and TypeMethodDescription<T> intSets the object into the statement via itsDataType.
This method is provided for application-specific types.<T> voidSets a column of an object into a prepared statement via itsDataType.
This method is provided for application-specific types.voidGeneric setter for objects via knownSqlType.voidsetArray(int p, Class<?> type, int columnIndex, Collection<?> elements, String operator) Sets an array parameter.
Used for array operators such as IN, ANY or ALL.voidsetBigDecimal(int p, 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, Boolean b) Sets the designated parameter to the given JavaBooleanvalue.voidsetByte(int p, byte b) Sets the designated parameter to the given Javabytevalue.voidSets the designated parameter to the given JavaBytevalue.voidsetChar(int p, char c) Sets the designated parameter to the given Javacharvalue.voidsetCharacter(int p, Character c) Sets the designated parameter to the given JavaCharactervalue.voidsetCharacter(int p, Character c, boolean mapNull) Sets the designated parameter to the given JavaCharactervalue.voidSets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application.voidSets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application.voidSets the designated parameter to the givenjava.sql.Datevalue using the default time zone of the virtual machine that is running the application.voidSets 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.voidSets the designated parameter to the given JavaDoublevalue.voidsetFloat(int p, float f) Sets the designated parameter to the given Javafloatvalue.voidSets the designated parameter to the given JavaFloatvalue.voidsetInstant(int p, Instant ts) Sets the designated parameter to the givenjava.time.Instantvalue.voidsetInstant(int p, Instant ts, boolean mapNull) Sets the designated parameter to the givenjava.time.Instantvalue.voidsetInt(int p, int i) Sets the designated parameter to the given Javaintvalue.voidsetInteger(int p, Integer i) Sets the designated parameter to the given JavaIntegervalue.voidsetLargeString(int p, String s) Sets a very large string.
This is usually converted to SQLCLOB.voidsetLargeString(int p, String s, boolean mapNull) Sets a very large string.
This is usually converted to SQLCLOB.voidsetLocalDate(int p, 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, 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.voidsetLocalDateTime(int p, LocalDateTime ts) Sets the designated parameter to the givenjava.time.LocalDateTimevalue.voidsetLocalDateTime(int p, LocalDateTime ts, boolean mapNull) Sets the designated parameter to the givenjava.time.LocalDateTimevalue.voidsetLocalTime(int p, LocalTime t) Sets the designated parameter to the givenjava.time.LocalTimevalue.voidsetLong(int p, long l) Sets the designated parameter to the given Javalongvalue.voidSets the designated parameter to the given JavaLongvalue.voidsetNull(int pos, int type) Sets the designated parameter to SQLNULL.voidsetOffsetDateTime(int p, OffsetDateTime ts) Sets the designated parameter to the givenjava.time.OffsetDateTimevalue.voidsetOffsetDateTime(int p, OffsetDateTime ts, boolean mapNull) Sets the designated parameter to the givenjava.time.OffsetDateTimevalue.voidsetOffsetTime(int p, OffsetTime t) Sets the designated parameter to the givenjava.time.OffsetTimevalue.voidsetShort(int p, short s) Sets the designated parameter to the given Javashortvalue.voidSets the designated parameter to the given JavaShortvalue.voidSets the designated parameter to the given JavaStringvalue.voidSets the designated parameter to the given JavaStringvalue.voidSets the designated parameter to the givenjava.sql.Timevalue.voidSets the designated parameter to the givenjava.sql.Timevalue.voidsetTimestamp(int p, Timestamp ts) Sets the designated parameter to the givenjava.sql.Timestampvalue.voidsetTimestamp(int p, Timestamp ts, boolean mapNull) Sets the designated parameter to the givenjava.sql.Timestampvalue.voidsetTimestamp(int p, Timestamp ts, Calendar timezone) Sets the designated parameter to the givenjava.sql.Timestampvalue.voidsetTimestamp(int p, Timestamp ts, Calendar timezone, boolean mapNull) Sets the designated parameter to the givenjava.sql.Timestampvalue.voidsetZonedDateTime(int p, ZonedDateTime ts) Sets the designated parameter to the givenjava.time.ZonedDateTimevalue.voidsetZonedDateTime(int p, ZonedDateTime ts, boolean mapNull) Sets the designated parameter to the givenjava.time.ZonedDateTimevalue.
-
Method Details
-
set
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
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
Generic setter for objects via knownSqlType.- Parameters:
sqlType- the sql typep- the positional index, starting at 1object- the object of given sql type
-
setArray
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
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
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
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
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
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
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
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
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
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
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
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
Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application.- 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
Sets the designated parameter to the givenjava.time.LocalDatevalue using the default time zone of the virtual machine that is running the application.- 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
-
setLocalDateTime
Sets the designated parameter to the givenjava.time.LocalDateTimevalue.- 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
Sets the designated parameter to the givenjava.time.LocalDateTimevalue.- 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
-
setOffsetDateTime
Sets the designated parameter to the givenjava.time.OffsetDateTimevalue.- 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
-
setOffsetDateTime
Sets the designated parameter to the givenjava.time.OffsetDateTimevalue.- 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
-
setZonedDateTime
Sets the designated parameter to the givenjava.time.ZonedDateTimevalue.- 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
-
setZonedDateTime
Sets the designated parameter to the givenjava.time.ZonedDateTimevalue.- 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 GMT (epochal time zero), else SQL NULL
-
setInstant
Sets the designated parameter to the givenjava.time.Instantvalue.- 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
-
setInstant
Sets the designated parameter to the givenjava.time.Instantvalue.- 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
-
setLocalTime
Sets the designated parameter to the givenjava.time.LocalTimevalue.- 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
-
setOffsetTime
Sets the designated parameter to the givenjava.time.OffsetTimevalue.- 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
-
setLong
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
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
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
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
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
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
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
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
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
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
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
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
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
-