Class DbQuery
- All Implemented Interfaces:
IDbQuery
,ICloseable
,AutoCloseable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close this database query object and all dependentDbPreparedStatement
andDbResultSet
objects.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.int
executeUpdate
(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery) Execute anINSERT
orUPDATE
statement.int
executeUpdate
(de.uplanet.jdbc.JdbcConnection p_conn, String p_strQuery, groovy.lang.Closure<?> p_closure) Execute a preparedINSERT
orUPDATE
statement.int
Get the default fetch size.Prepares a statement.void
setDefaultFetchSize
(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:
getDefaultFetchSize
in 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:
setDefaultFetchSize
in 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:IDbQuery
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 interfaceIDbQuery
- 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
- 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:IDbQuery
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.Note: The type of the result depends on the database column's datatype. To coerce the result to a specific type use the respective
executeAndGetScalarValueXxx
methods.- Specified by:
executeAndGetScalarValue
in 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_valueIfNull
if 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:IDbQuery
Get the value of the first column in the first row of the result set.If the result set is empty,
null
is 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
executeAndGetScalarValueXxx
methods.- Specified by:
executeAndGetScalarValue
in interfaceIDbQuery
- 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
- 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:IDbQuery
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.Note: The type of the result depends on the database column's datatype. To coerce the result to a specific type use the respective
executeAndGetScalarValueXxx
methods.- Specified by:
executeAndGetScalarValue
in 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_valueIfNull
if 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:IDbQuery
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.Note: The type of the result depends on the database column's datatype. To coerce the result to a specific type use the respective
executeAndGetScalarValueXxx
methods.- Specified by:
executeAndGetScalarValue
in 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_valueIfNull
if 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarBooleanValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarBooleanValue
in 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:
executeAndGetScalarBooleanValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarBooleanValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarByteValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarByteValue
in 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:
executeAndGetScalarByteValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarByteValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarShortValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarShortValue
in 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:
executeAndGetScalarShortValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarShortValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarIntValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarIntValue
in 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:
executeAndGetScalarIntValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarIntValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarLongValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarLongValue
in 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:
executeAndGetScalarLongValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarLongValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarFloatValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarFloatValue
in 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:
executeAndGetScalarFloatValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarFloatValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarDoubleValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarDoubleValue
in 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:
executeAndGetScalarDoubleValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarDoubleValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarBigDecimalValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarBigDecimalValue
in 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:
executeAndGetScalarBigDecimalValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarBigDecimalValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarStringValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarStringValue
in 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:
executeAndGetScalarStringValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarStringValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarTimestampValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarTimestampValue
in 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:
executeAndGetScalarTimestampValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarTimestampValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarDateValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarDateValue
in 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:
executeAndGetScalarDateValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarDateValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Object)
.- Specified by:
executeAndGetScalarTimeValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String)
.- Specified by:
executeAndGetScalarTimeValue
in 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:
executeAndGetScalarTimeValue
in 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:IDbQuery
Typed version ofIDbQuery.executeAndGetScalarValue(JdbcConnection, String, Closure)
.- Specified by:
executeAndGetScalarTimeValue
in 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:IDbQuery
Execute anINSERT
orUPDATE
statement.- Specified by:
executeUpdate
in 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:IDbQuery
Execute a preparedINSERT
orUPDATE
statement.- Specified by:
executeUpdate
in 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:IDbQuery
Prepares a statement.- Specified by:
prepare
in 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:IDbQuery
Close this database query object and all dependentDbPreparedStatement
andDbResultSet
objects.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIDbQuery
- Throws:
SQLException
- If a database error occurred.
-