|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.tck.util.MuleDerbyTestDatabase
public class MuleDerbyTestDatabase
Helper class for creating a derby database.
Field Summary | |
---|---|
static String |
DERBY_PROPERTIES_FILE
|
Constructor Summary | |
---|---|
MuleDerbyTestDatabase(String databaseNameProperty)
|
Method Summary | |
---|---|
void |
emptyTestTable()
Remove all the rows from TEST table. |
List |
execSqlQuery(String sql)
Executes a query against the database. |
int |
execSqlUpdate(String sql)
Executes an SQL statement against the database. |
Connection |
getConnection()
|
void |
insertIntoTest(String data,
int type)
Inserts a record in the TEST table. |
void |
startDatabase()
Creates an empty database with a table named TEST. |
void |
stopDatabase()
Stops the created database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DERBY_PROPERTIES_FILE
Constructor Detail |
---|
public MuleDerbyTestDatabase(String databaseNameProperty)
databaseNameProperty
- name of the property with the database name in derby.properties file.
To add a new database change derby.properties file.Method Detail |
---|
public void startDatabase() throws Exception
Exception
public void stopDatabase() throws SQLException
SQLException
public void emptyTestTable() throws Exception
SQLException
Exception
public void insertIntoTest(String data, int type)
public Connection getConnection() throws Exception
Exception
public List execSqlQuery(String sql) throws Exception
sql
- SQL query
Exception
public int execSqlUpdate(String sql) throws Exception
sql
- SQL query
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |