@Repository public class JdbcSchemaUtilDao extends java.lang.Object implements SchemaUtilDao
| Constructor and Description |
|---|
JdbcSchemaUtilDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
createTable(SchemaTable table)
Creates a single table.
|
void |
createUnitTestDatabases(java.lang.String className) |
void |
dropTable(SchemaTable table)
Drops a single table.
|
void |
dropUnitTestDatabases(java.lang.String className) |
boolean |
exists(SchemaTable table)
Returns whether the specified table exists in the database
|
int |
getCountEstimate(SchemaTable table)
Returns an estimated row count for the specified table.
|
int |
getCountExact(SchemaTable table)
Returns an exact row count for the specified table.
|
public void createTable(SchemaTable table) throws AlreadyExistsException
SchemaUtilDaocreateTable in interface SchemaUtilDaotable - Table to create.AlreadyExistsExceptionpublic void dropTable(SchemaTable table) throws NotFoundException
SchemaUtilDaodropTable in interface SchemaUtilDaotable - Table to drop.NotFoundExceptionpublic boolean exists(SchemaTable table)
SchemaUtilDaoexists in interface SchemaUtilDaopublic int getCountExact(SchemaTable table)
SchemaUtilDaoNote: This can / will be slow for large tables.
getCountExact in interface SchemaUtilDaoSchemaUtilDao.getCountEstimate(SchemaTable)public int getCountEstimate(SchemaTable table)
SchemaUtilDaoNote: While not percise, this is fast for large tables
getCountEstimate in interface SchemaUtilDaoSchemaUtilDao.getCountExact(SchemaTable)public void dropUnitTestDatabases(java.lang.String className)
throws java.net.UnknownHostException
dropUnitTestDatabases in interface SchemaUtilDaojava.net.UnknownHostExceptionpublic void createUnitTestDatabases(java.lang.String className)
throws java.net.UnknownHostException
createUnitTestDatabases in interface SchemaUtilDaojava.net.UnknownHostException