Interface IDatabaseTarget
-
- All Known Implementing Classes:
ConnectionProviderTarget
,JdbcTarget
,NopTarget
,PrintTarget
public interface IDatabaseTarget
Abstraction of the ability to execute statements against a database. This allows for better unit testing, especially those functions which are not supported by Derby.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
runStatement(IDatabaseTranslator translator, java.lang.String ddl)
Run the given DDL statement against the connection managed by the implementation of this interfacevoid
runStatement(IDatabaseTranslator translator, IDatabaseStatement statement)
Run the statement using the resources (e.g.<T> T
runStatement(IDatabaseTranslator translator, IDatabaseSupplier<T> supplier)
Run a statement returning a value of type T.void
runStatementWithInt(IDatabaseTranslator translator, java.lang.String sql, int value)
Convenience method for running a SQL statement requiring a single int parameter
-
-
-
Method Detail
-
runStatement
void runStatement(IDatabaseTranslator translator, java.lang.String ddl)
Run the given DDL statement against the connection managed by the implementation of this interface- Parameters:
ddl
-
-
runStatementWithInt
void runStatementWithInt(IDatabaseTranslator translator, java.lang.String sql, int value)
Convenience method for running a SQL statement requiring a single int parameter- Parameters:
translator
-sql
-value
-
-
runStatement
void runStatement(IDatabaseTranslator translator, IDatabaseStatement statement)
Run the statement using the resources (e.g. connection) held by the implementation of this interface- Parameters:
statement
-
-
runStatement
<T> T runStatement(IDatabaseTranslator translator, IDatabaseSupplier<T> supplier)
Run a statement returning a value of type T.- Parameters:
supplier
-- Returns:
-
-