@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
SchemaUtilDao
createTable
in interface SchemaUtilDao
table
- Table to create.AlreadyExistsException
public void dropTable(SchemaTable table) throws NotFoundException
SchemaUtilDao
dropTable
in interface SchemaUtilDao
table
- Table to drop.NotFoundException
public boolean exists(SchemaTable table)
SchemaUtilDao
exists
in interface SchemaUtilDao
public int getCountExact(SchemaTable table)
SchemaUtilDao
Note: This can / will be slow for large tables.
getCountExact
in interface SchemaUtilDao
SchemaUtilDao.getCountEstimate(SchemaTable)
public int getCountEstimate(SchemaTable table)
SchemaUtilDao
Note: While not percise, this is fast for large tables
getCountEstimate
in interface SchemaUtilDao
SchemaUtilDao.getCountExact(SchemaTable)
public void dropUnitTestDatabases(java.lang.String className) throws java.net.UnknownHostException
dropUnitTestDatabases
in interface SchemaUtilDao
java.net.UnknownHostException
public void createUnitTestDatabases(java.lang.String className) throws java.net.UnknownHostException
createUnitTestDatabases
in interface SchemaUtilDao
java.net.UnknownHostException