| |
|
| java.lang.Object org.ow2.easybeans.tests.common.db.TableManager
TableManager | public class TableManager (Code) | | Manages a table in the database.
author: Gisele Pinheiro Souza author: Eduardo Studzinski Estima de Castro |
Field Summary | |
final protected static int | PRIMARY_KEY The primary key inserted in the table. |
Method Summary | |
public void | deleteTable(String tableName) Deletes the table test. | public void | insertTable(String tableName) Creates the table in the database done without make the commit after the
insertion. | public void | test(String tableName) Creates and deletes a table. | public void | verifyTable(String tableName) Verifies if the table was created. |
PRIMARY_KEY | final protected static int PRIMARY_KEY(Code) | | The primary key inserted in the table.
|
TableManager | public TableManager(String dbName) throws NamingException(Code) | | Creates a new instance of TableManager.
Parameters: dbName - the database name in the registry. throws: NamingException - if a lookup error occurs. |
TableManager | public TableManager(DataSource ds)(Code) | | Creates a new instance of TableManager.
Parameters: ds - the datasource. |
deleteTable | public void deleteTable(String tableName) throws SQLException(Code) | | Deletes the table test. This methods does not make the commit after
delete.
Parameters: tableName - the table name. throws: SQLException - if a database error occurs. |
insertTable | public void insertTable(String tableName) throws SQLException(Code) | | Creates the table in the database done without make the commit after the
insertion.
Parameters: tableName - the table name. throws: SQLException - if a database error occurs. |
test | public void test(String tableName) throws SQLException(Code) | | Creates and deletes a table.
Parameters: tableName - the table name. throws: SQLException - if a database error occurs or the table not exists. |
verifyTable | public void verifyTable(String tableName) throws SQLException(Code) | | Verifies if the table was created.
Parameters: tableName - the table name. throws: SQLException - if a database error occurs or the table not exists. |
|
|
|