Class DbQuery
- java.lang.Object
-
- de.uplanet.lucy.server.util.db.DbQuery
-
- All Implemented Interfaces:
IDbQuery,ICloseable,AutoCloseable
public final class DbQuery extends Object implements IDbQuery
This class provides a database API that is intended to be used in scripting environments.
-
-
Constructor Summary
Constructors Constructor Description DbQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close this database query object and all dependentDbPreparedStatementandDbResultSetobjects.BigDecimalexecuteAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).BigDecimalexecuteAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).BigDecimalexecuteAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).BigDecimalexecuteAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)BooleanexecuteAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).BooleanexecuteAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).BooleanexecuteAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).BooleanexecuteAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)ByteexecuteAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).ByteexecuteAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).ByteexecuteAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).ByteexecuteAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)DateexecuteAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).DateexecuteAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).DateexecuteAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).DateexecuteAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)DoubleexecuteAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).DoubleexecuteAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).DoubleexecuteAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).DoubleexecuteAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)FloatexecuteAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).FloatexecuteAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).FloatexecuteAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).FloatexecuteAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)IntegerexecuteAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).IntegerexecuteAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).IntegerexecuteAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).IntegerexecuteAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)LongexecuteAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).LongexecuteAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).LongexecuteAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).LongexecuteAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)ShortexecuteAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).ShortexecuteAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).ShortexecuteAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).ShortexecuteAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)StringexecuteAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).StringexecuteAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).StringexecuteAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).StringexecuteAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)TimestampexecuteAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).TimestampexecuteAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).TimestampexecuteAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).TimestampexecuteAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)DateexecuteAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).DateexecuteAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).DateexecuteAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).DateexecuteAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)ObjectexecuteAndGetScalarValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Get the value of the first column in the first row of the result set.ObjectexecuteAndGetScalarValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Get the value of the first column in the first row of the result set.ObjectexecuteAndGetScalarValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback)Get the value of the first column in the first row of the result set.ObjectexecuteAndGetScalarValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure)Get the value of the first column in the first row of the result set.IValueHolder<?>executeAndGetScalarValueHolder(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Get the value of the first column in the first row of the result set.intexecuteUpdate(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Execute anINSERTorUPDATEstatement.intexecuteUpdate(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure)Execute a preparedINSERTorUPDATEstatement.intgetDefaultFetchSize()Get the default fetch size.DbPreparedStatementprepare(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery)Prepares a statement.voidsetDefaultFetchSize(int p_iDefaultFetchSize)Set the default fetch size for prepared statements created by this class.
-
-
-
Method Detail
-
getDefaultFetchSize
public int getDefaultFetchSize()
Get the default fetch size. The default value is100.- Specified by:
getDefaultFetchSizein interfaceIDbQuery- Returns:
- The default fetch size.
-
setDefaultFetchSize
public void setDefaultFetchSize(int p_iDefaultFetchSize)
Set the default fetch size for prepared statements created by this class.- Specified by:
setDefaultFetchSizein interfaceIDbQuery- Parameters:
p_iDefaultFetchSize- The default fetch size.
-
executeAndGetScalarValueHolder
public IValueHolder<?> executeAndGetScalarValueHolder(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException
Description copied from interface:IDbQueryGet the value of the first column in the first row of the result set.If the result set is empty,
nullis returned.- Specified by:
executeAndGetScalarValueHolderin interfaceIDbQuery- Returns:
- A value holder that contains the value of the first column in the first
row of the result set, or
nullif the result set is empty. - Throws:
SQLException- If a database error occurred.
-
executeAndGetScalarValue
public Object executeAndGetScalarValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException
Description copied from interface:IDbQueryGet 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_valueIfNullis returned.Note: The type of the result depends on the database column's datatype. To coerce the result to a specific type use the respective
executeAndGetScalarValueXxxmethods.- Specified by:
executeAndGetScalarValuein interfaceIDbQuery- Parameters:
p_conn- The database connection to be used.p_strQuery- The query.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_valueIfNullif the result set is empty, or the value isnull. - Throws:
SQLException- If a database error occurred.
-
executeAndGetScalarValue
public Object executeAndGetScalarValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException
Description copied from interface:IDbQueryGet the value of the first column in the first row of the result set.If the result set is empty,
nullis returned.Note: The type of the result depends on the database column's datatype. To coerce the result to a specific type use the respective
executeAndGetScalarValueXxxmethods.- Specified by:
executeAndGetScalarValuein interfaceIDbQuery- Returns:
- The value of the first column in the first row of the result set,
or
nullif the result set is empty. - Throws:
SQLException- If a database error occurred.
-
executeAndGetScalarValue
public Object executeAndGetScalarValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException
Description copied from interface:IDbQueryGet 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_valueIfNullis returned.Note: The type of the result depends on the database column's datatype. To coerce the result to a specific type use the respective
executeAndGetScalarValueXxxmethods.- Specified by:
executeAndGetScalarValuein interfaceIDbQuery- Parameters:
p_conn- The database connection to be used.p_strQuery- The query.p_valueFallback- The return value if the query returns an empty result set, ornull.p_closure- The closure that prepares the statement.- Returns:
- The value of the first column in the first row of the result set,
or
p_valueIfNullif the result set is empty or the value isnull. - Throws:
SQLException- If a database error occurred.
-
executeAndGetScalarValue
public Object executeAndGetScalarValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException
Description copied from interface:IDbQueryGet 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_valueIfNullis returned.Note: The type of the result depends on the database column's datatype. To coerce the result to a specific type use the respective
executeAndGetScalarValueXxxmethods.- Specified by:
executeAndGetScalarValuein interfaceIDbQuery- Parameters:
p_conn- The database connection to be used.p_strQuery- The query.p_closure- The closure that prepares the statement.- Returns:
- The value of the first column in the first row of the result set,
or
p_valueIfNullif the result set is empty or the value isnull. - Throws:
SQLException- If a database error occurred.
-
executeAndGetScalarBooleanValue
public Boolean executeAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarBooleanValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarBooleanValue
public Boolean executeAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarBooleanValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarBooleanValue
public Boolean executeAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarBooleanValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarBooleanValue
public Boolean executeAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarBooleanValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarByteValue
public Byte executeAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarByteValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarByteValue
public Byte executeAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarByteValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarByteValue
public Byte executeAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarByteValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarByteValue
public Byte executeAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarByteValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarShortValue
public Short executeAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarShortValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarShortValue
public Short executeAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarShortValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarShortValue
public Short executeAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarShortValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarShortValue
public Short executeAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarShortValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarIntValue
public Integer executeAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarIntValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarIntValue
public Integer executeAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarIntValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarIntValue
public Integer executeAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarIntValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarIntValue
public Integer executeAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarIntValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarLongValue
public Long executeAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarLongValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarLongValue
public Long executeAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarLongValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarLongValue
public Long executeAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarLongValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarLongValue
public Long executeAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarLongValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarFloatValue
public Float executeAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarFloatValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarFloatValue
public Float executeAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarFloatValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarFloatValue
public Float executeAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarFloatValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarFloatValue
public Float executeAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarFloatValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarDoubleValue
public Double executeAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarDoubleValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarDoubleValue
public Double executeAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarDoubleValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarDoubleValue
public Double executeAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarDoubleValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarDoubleValue
public Double executeAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarDoubleValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarBigDecimalValue
public BigDecimal executeAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarBigDecimalValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarBigDecimalValue
public BigDecimal executeAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarBigDecimalValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarBigDecimalValue
public BigDecimal executeAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarBigDecimalValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarBigDecimalValue
public BigDecimal executeAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarBigDecimalValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarStringValue
public String executeAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarStringValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarStringValue
public String executeAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarStringValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarStringValue
public String executeAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarStringValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarStringValue
public String executeAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarStringValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarTimestampValue
public Timestamp executeAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarTimestampValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarTimestampValue
public Timestamp executeAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarTimestampValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarTimestampValue
public Timestamp executeAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarTimestampValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarTimestampValue
public Timestamp executeAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarTimestampValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarDateValue
public Date executeAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarDateValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarDateValue
public Date executeAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarDateValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarDateValue
public Date executeAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarDateValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarDateValue
public Date executeAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarDateValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeAndGetScalarTimeValue
public Date executeAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).- Specified by:
executeAndGetScalarTimeValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
-
executeAndGetScalarTimeValue
public Date executeAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).- Specified by:
executeAndGetScalarTimeValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String)
-
executeAndGetScalarTimeValue
public Date executeAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQuery- Specified by:
executeAndGetScalarTimeValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object, Closure)
-
executeAndGetScalarTimeValue
public Date executeAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLException, ValueCastException
Description copied from interface:IDbQueryTyped version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).- Specified by:
executeAndGetScalarTimeValuein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.ValueCastException- If the database value could not be cast to the specific type.- See Also:
IDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
-
executeUpdate
public int executeUpdate(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLExceptionDescription copied from interface:IDbQueryExecute anINSERTorUPDATEstatement.- Specified by:
executeUpdatein interfaceIDbQuery- Parameters:
p_conn- The database connection to be used.p_strQuery- The SQL statement to be executed.- Returns:
- The number of affected rows in the database, or
0. - Throws:
SQLException
-
executeUpdate
public int executeUpdate(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) throws SQLExceptionDescription copied from interface:IDbQueryExecute a preparedINSERTorUPDATEstatement.- Specified by:
executeUpdatein interfaceIDbQuery- Parameters:
p_conn- The database connection to be used.p_strQuery- The (prepared) SQL statement to be executed.p_closure- The closure that prepares the statement.- Returns:
- The number of affected rows in the database, or
0. - Throws:
SQLException
-
prepare
public DbPreparedStatement prepare(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException
Description copied from interface:IDbQueryPrepares a statement.- Specified by:
preparein interfaceIDbQuery- Parameters:
p_conn- The database connection to be used.p_strQuery- The (parameterized) SQL query.- Returns:
- A prepared statement object.
- Throws:
SQLException- If a database error occurred.
-
close
public void close() throws SQLExceptionDescription copied from interface:IDbQueryClose this database query object and all dependentDbPreparedStatementandDbResultSetobjects.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceIDbQuery- Throws:
SQLException- If a database error occurred.
-
-