public abstract class EmbeddedDB extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EmbeddedDB.DBEngine |
protected static class |
EmbeddedDB.ResultSetJob |
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
allTables |
protected String |
databaseName |
protected String |
jdbcConnectionString |
protected static org.slf4j.Logger |
logger |
protected String |
password |
protected String |
username |
| Modifier | Constructor and Description |
|---|---|
protected |
EmbeddedDB(String databaseName,
String username,
String password,
String jdbcConnectionString) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupAllTables() |
void |
cleanupTable(String table) |
protected void |
execute(String query) |
protected void |
execute(String query,
EmbeddedDB.ResultSetJob job) |
protected void |
executeQuery(String query,
EmbeddedDB.ResultSetJob job) |
void |
executeScript(String script) |
protected int |
executeUpdate(String query) |
List<String> |
getAllTables() |
String |
getCmdLineConnectionString() |
protected Connection |
getConnection() |
String |
getDatabaseName() |
abstract DataSource |
getDataSource() |
abstract EmbeddedDB.DBEngine |
getDBEngine() |
String |
getJdbcConnectionString() |
String |
getPassword() |
protected int |
getPort() |
String |
getUsername() |
abstract void |
initialize() |
abstract void |
refreshTableNames() |
abstract void |
start() |
abstract void |
stop() |
protected static final org.slf4j.Logger logger
protected String databaseName
protected String username
protected String password
protected String jdbcConnectionString
public abstract EmbeddedDB.DBEngine getDBEngine()
public abstract void initialize()
throws IOException
IOExceptionpublic abstract void start()
throws IOException
IOExceptionpublic abstract void refreshTableNames()
throws IOException
IOExceptionpublic abstract DataSource getDataSource() throws IOException
IOExceptionpublic abstract void stop()
throws IOException
IOExceptionpublic String getCmdLineConnectionString()
public String getUsername()
public String getPassword()
public String getDatabaseName()
public String getJdbcConnectionString()
public void executeScript(String script) throws IOException
IOExceptionpublic void cleanupAllTables()
throws IOException
IOExceptionpublic void cleanupTable(String table) throws IOException
IOExceptionprotected void execute(String query) throws SQLException, IOException
SQLExceptionIOExceptionprotected void execute(String query, EmbeddedDB.ResultSetJob job) throws SQLException, IOException
SQLExceptionIOExceptionprotected int executeUpdate(String query) throws SQLException, IOException
SQLExceptionIOExceptionprotected void executeQuery(String query, EmbeddedDB.ResultSetJob job) throws SQLException, IOException
SQLExceptionIOExceptionprotected Connection getConnection() throws SQLException, IOException
SQLExceptionIOExceptionprotected int getPort()
Copyright © 2010-2015. All Rights Reserved.