Package de.uplanet.lucy.server.util.db
Class DbPreparedStatement
- java.lang.Object
-
- de.uplanet.lucy.server.util.db.DbPreparedStatement
-
- All Implemented Interfaces:
IDbPreparedStatement
,ICloseable
,AutoCloseable
public final class DbPreparedStatement extends Object implements IDbPreparedStatement
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this statement.void
execute()
Executes the SQL statement in this object, which may be any kind of SQL statement.BigDecimal
executeAndGetScalarBigDecimalValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.BigDecimal
executeAndGetScalarBigDecimalValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Boolean
executeAndGetScalarBooleanValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Boolean
executeAndGetScalarBooleanValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Byte
executeAndGetScalarByteValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Byte
executeAndGetScalarByteValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Date
executeAndGetScalarDateValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Date
executeAndGetScalarDateValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Double
executeAndGetScalarDoubleValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Double
executeAndGetScalarDoubleValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Float
executeAndGetScalarFloatValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Float
executeAndGetScalarFloatValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Integer
executeAndGetScalarIntValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Integer
executeAndGetScalarIntValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Long
executeAndGetScalarLongValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Long
executeAndGetScalarLongValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Short
executeAndGetScalarShortValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Short
executeAndGetScalarShortValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.String
executeAndGetScalarStringValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.String
executeAndGetScalarStringValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Timestamp
executeAndGetScalarTimestampValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Timestamp
executeAndGetScalarTimestampValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Date
executeAndGetScalarTimeValue()
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.Date
executeAndGetScalarTimeValue(Object p_valueFallback)
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.Object
executeAndGetScalarValue()
Get the value of the first column in the first row of the result set.Object
executeAndGetScalarValue(Object p_valueFallback)
Get the value of the first column in the first row of the result set.IValueHolder<?>
executeAndGetScalarValueHolder()
Get the value of the first column in the first row of the result set.DbResultSet
executeQuery()
Executes the SQL query in this object and returns theIDbResultSet
object generated by the query.int
executeUpdate()
Executes the SQL statement in this object, which must be an SQL Data Manipulation Language (DML) statement, such asINSERT
,UPDATE
orDELETE
; or an SQL statement that returns nothing, such as a DDL statement.int
getFetchSize()
Get the fetch size of the underlying prepared statement.void
setBigDecimal(int p_iIdx, Object p_value)
Sets the designated parameter to the given number value.void
setBoolean(int p_iIdx, Object p_value)
Sets the designated parameter to the given boolean value.void
setByte(int p_iIdx, Object p_value)
Sets the designated parameter to the given integer value.void
setCharacterStream(int p_iIdx, Object p_value)
Sets the designated parameter to the value given string value.void
setDate(int p_iIdx, Object p_value)
Sets the designated parameter to the given date value.void
setDate(int p_iIdx, Object p_value, Calendar p_cal)
Sets the designated parameter to the given date value.void
setDate(int p_iIdx, Object p_value, TimeZone p_tz)
Sets the designated parameter to the given date value.void
setDouble(int p_iIdx, Object p_value)
Sets the designated parameter to the given floating point number value.void
setFetchSize(int p_iFetchSize)
Set the fetch size of the underlying prepared statement.void
setFloat(int p_iIdx, Object p_value)
Sets the designated parameter to the given floating point number value.void
setInt(int p_iIdx, Object p_value)
Sets the designated parameter to the given integer number value.void
setLong(int p_iIdx, Object p_value)
Sets the designated parameter to the given integer number value.void
setShort(int p_iIdx, Object p_value)
Sets the designated parameter to the given integer number value.void
setString(int p_iIdx, Object p_value)
Sets the designated parameter to the given string value.void
setTime(int p_iIdx, Object p_value)
Sets the designated parameter to the given time value.void
setTime(int p_iIdx, Object p_value, Calendar p_cal)
Sets the designated parameter to the given time value.void
setTime(int p_iIdx, Object p_value, TimeZone p_tz)
Sets the designated parameter to the given time value.void
setTimestamp(int p_iIdx, Object p_value)
Sets the designated parameter to the given timestamp value.void
setTimestamp(int p_iIdx, Object p_value, Calendar p_cal)
Sets the designated parameter to the given timestamp value.void
setTimestamp(int p_iIdx, Object p_value, TimeZone p_tz)
Sets the designated parameter to the given timestamp value.
-
-
-
Method Detail
-
getFetchSize
public int getFetchSize() throws SQLException
Description copied from interface:IDbPreparedStatement
Get the fetch size of the underlying prepared statement.- Specified by:
getFetchSize
in interfaceIDbPreparedStatement
- Returns:
- The fetch size.
- Throws:
SQLException
- See Also:
Statement.setFetchSize(int)
-
setFetchSize
public void setFetchSize(int p_iFetchSize) throws SQLException
Description copied from interface:IDbPreparedStatement
Set the fetch size of the underlying prepared statement.- Specified by:
setFetchSize
in interfaceIDbPreparedStatement
- Parameters:
p_iFetchSize
- The fetch size.- Throws:
SQLException
- See Also:
Statement.setFetchSize(int)
-
execute
public void execute() throws SQLException
Description copied from interface:IDbPreparedStatement
Executes the SQL statement in this object, which may be any kind of SQL statement.- Specified by:
execute
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.
-
executeUpdate
public int executeUpdate() throws SQLException
Description copied from interface:IDbPreparedStatement
Executes the SQL statement in this object, which must be an SQL Data Manipulation Language (DML) statement, such asINSERT
,UPDATE
orDELETE
; or an SQL statement that returns nothing, such as a DDL statement.- Specified by:
executeUpdate
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.
-
executeQuery
public DbResultSet executeQuery() throws SQLException
Description copied from interface:IDbPreparedStatement
Executes the SQL query in this object and returns theIDbResultSet
object generated by the query.- Specified by:
executeQuery
in interfaceIDbPreparedStatement
- Returns:
- An
IDbResultSet
object that contains the data produced by the query; nevernull
. - Throws:
SQLException
- If a database error occurred.
-
executeAndGetScalarValueHolder
public IValueHolder<?> executeAndGetScalarValueHolder() throws SQLException
Get the value of the first column in the first row of the result set.If the result set is empty,
null
is returned.- Specified by:
executeAndGetScalarValueHolder
in interfaceIDbPreparedStatement
- Returns:
- A value holder that contains the value of the first column in the first
row of the result set, or
null
if the result set is empty. - Throws:
SQLException
-
executeAndGetScalarValue
public Object executeAndGetScalarValue(Object p_valueFallback) throws SQLException
Get the value of the first column in the first row of the result set.If the result set is empty, or the value is
null
,p_valueIfNull
is returned.- Specified by:
executeAndGetScalarValue
in interfaceIDbPreparedStatement
- Parameters:
p_valueFallback
- The return value if the query returns an empty result set ornull
.- Returns:
- The value of the first column in the first row of the result set,
or
p_valueIfNull
if the result set is empty, or the value isnull
. - Throws:
SQLException
-
executeAndGetScalarValue
public Object executeAndGetScalarValue() throws SQLException
Get the value of the first column in the first row of the result set.If the result set is empty,
null
is returned.- Specified by:
executeAndGetScalarValue
in interfaceIDbPreparedStatement
- Returns:
- The value of the first column in the first row of the result set,
or
null
if the result set is empty. - Throws:
SQLException
-
executeAndGetScalarBooleanValue
public Boolean executeAndGetScalarBooleanValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarBooleanValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarBooleanValue
public Boolean executeAndGetScalarBooleanValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarBooleanValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarByteValue
public Byte executeAndGetScalarByteValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarByteValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarByteValue
public Byte executeAndGetScalarByteValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarByteValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarShortValue
public Short executeAndGetScalarShortValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarShortValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarShortValue
public Short executeAndGetScalarShortValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarShortValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarIntValue
public Integer executeAndGetScalarIntValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarIntValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarIntValue
public Integer executeAndGetScalarIntValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarIntValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarLongValue
public Long executeAndGetScalarLongValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarLongValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarLongValue
public Long executeAndGetScalarLongValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarLongValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarFloatValue
public Float executeAndGetScalarFloatValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarFloatValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarFloatValue
public Float executeAndGetScalarFloatValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarFloatValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarDoubleValue
public Double executeAndGetScalarDoubleValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarDoubleValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarDoubleValue
public Double executeAndGetScalarDoubleValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarDoubleValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarBigDecimalValue
public BigDecimal executeAndGetScalarBigDecimalValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarBigDecimalValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarBigDecimalValue
public BigDecimal executeAndGetScalarBigDecimalValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarBigDecimalValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarStringValue
public String executeAndGetScalarStringValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarStringValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarStringValue
public String executeAndGetScalarStringValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarStringValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarTimestampValue
public Timestamp executeAndGetScalarTimestampValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarTimestampValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarTimestampValue
public Timestamp executeAndGetScalarTimestampValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarTimestampValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarDateValue
public Date executeAndGetScalarDateValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarDateValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarDateValue
public Date executeAndGetScalarDateValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarDateValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
executeAndGetScalarTimeValue
public Date executeAndGetScalarTimeValue(Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue(Object)
.- Specified by:
executeAndGetScalarTimeValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue(Object)
-
executeAndGetScalarTimeValue
public Date executeAndGetScalarTimeValue() throws SQLException, ValueCastException
Description copied from interface:IDbPreparedStatement
Typed version ofIDbPreparedStatement.executeAndGetScalarValue()
.- Specified by:
executeAndGetScalarTimeValue
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to the specific type.- See Also:
IDbPreparedStatement.executeAndGetScalarValue()
-
setBoolean
public void setBoolean(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given boolean value.- Specified by:
setBoolean
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setInt
public void setInt(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given integer number value.- Specified by:
setInt
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setLong
public void setLong(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given integer number value.- Specified by:
setLong
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setShort
public void setShort(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given integer number value.- Specified by:
setShort
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setByte
public void setByte(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given integer value.- Specified by:
setByte
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setBigDecimal
public void setBigDecimal(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given number value.- Specified by:
setBigDecimal
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setFloat
public void setFloat(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given floating point number value.- Specified by:
setFloat
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setDouble
public void setDouble(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given floating point number value.- Specified by:
setDouble
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setTimestamp
public void setTimestamp(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given timestamp value.A calendar with the time zone that is associated with the database connection that was used to create this statement is used to write the timestamp to the database.
- Specified by:
setTimestamp
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setTimestamp
public void setTimestamp(int p_iIdx, Object p_value, TimeZone p_tz) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given timestamp value.- Specified by:
setTimestamp
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.p_tz
- The time zone to be used when writing the timestamp to the database. If this parameter is omitted, the time zone that is associated with the database connection that was used to create this statement is used.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setTimestamp
public void setTimestamp(int p_iIdx, Object p_value, Calendar p_cal) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given timestamp value.- Specified by:
setTimestamp
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.p_cal
- The calendar to be used when writing the timestamp to the database. If this parameter is omitted, a calendar with the time zone that is associated with the database connection that was used to create this statement is used.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setTime
public void setTime(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given time value.A calendar with the time zone that is associated with the database connection that was used to create this statement is used to write the time value to the database.
- Specified by:
setTime
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setTime
public void setTime(int p_iIdx, Object p_value, TimeZone p_tz) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given time value.- Specified by:
setTime
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.p_tz
- The time zone to be used when writing the time value to the database. If this parameter is omitted, the time zone that is associated with the database connection that was used to create this statement is used.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setTime
public void setTime(int p_iIdx, Object p_value, Calendar p_cal) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given time value.- Specified by:
setTime
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.p_cal
- The calendar to be used when writing the time to the database. If this parameter is omitted, a calendar with the time zone that is associated with the database connection that was used to create this statement is used.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setDate
public void setDate(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given date value.A calendar with the time zone that is associated with the database connection that was used to create this statement is used to write the time value to the database.
- Specified by:
setDate
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setDate
public void setDate(int p_iIdx, Object p_value, TimeZone p_tz) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given date value.- Specified by:
setDate
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.p_tz
- The time zone to be used when writing the date value to the database. If this parameter is omitted, the time zone that is associated with the database connection that was used to create this statement is used.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setDate
public void setDate(int p_iIdx, Object p_value, Calendar p_cal) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given date value.- Specified by:
setDate
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.p_cal
- The calendar to be used when writing the date to the database. If this parameter is omitted, a calendar with the time zone that is associated with the database connection that was used to create this statement is used.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setString
public void setString(int p_iIdx, Object p_value) throws SQLException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the given string value.- Specified by:
setString
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.
-
setCharacterStream
public void setCharacterStream(int p_iIdx, Object p_value) throws SQLException, IOException
Description copied from interface:IDbPreparedStatement
Sets the designated parameter to the value given string value.- Specified by:
setCharacterStream
in interfaceIDbPreparedStatement
- Parameters:
p_iIdx
- The first parameter is 1, the second is 2, ...p_value
- The parameter value.- Throws:
SQLException
- If the parameter index does not correspond to a parameter marker in the SQL statement, if a database access error occurs, or this method is called on a closed statement.IOException
-
close
public void close() throws SQLException
Close this statement.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIDbPreparedStatement
- Throws:
SQLException
- If a database error occurred.
-
-