Class DbQuery
- All Implemented Interfaces:
IDbQuery,de.uplanet.util.ICloseable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this database query object and all dependentDbPreparedStatementandDbResultSetobjects.executeAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarBigDecimalValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarBooleanValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarByteValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarDateValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarDoubleValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarFloatValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarIntValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarLongValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarShortValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarStringValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarTimestampValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String).executeAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure).executeAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback) Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object).executeAndGetScalarTimeValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, Object p_valueFallback, groovy.lang.Closure<?> p_closure) executeAndGetScalarValue(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Get the value of the first column in the first row of the result set.executeAndGetScalarValue(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.executeAndGetScalarValue(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.executeAndGetScalarValue(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.intGet the default fetch size.Prepares a statement.voidsetDefaultFetchSize(int p_iDefaultFetchSize) Set the default fetch size for prepared statements created by this class.
-
Constructor Details
-
DbQuery
public DbQuery()
-
-
Method Details
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
executeUpdate
public int executeUpdate(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) throws SQLException Description 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 SQLException Description 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
Description 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.
-