Class DerbySchema
- java.lang.Object
-
- migratedb.v1.core.internal.database.base.BaseSchema
-
- migratedb.v1.core.internal.database.derby.DerbySchema
-
- All Implemented Interfaces:
Schema
public class DerbySchema extends BaseSchema
Derby implementation of Schema.
-
-
Field Summary
-
Fields inherited from class migratedb.v1.core.internal.database.base.BaseSchema
jdbcTemplate, name
-
-
Constructor Summary
Constructors Constructor Description DerbySchema(JdbcTemplate jdbcTemplate, DerbyDatabase database, String name)Creates a new Derby schema.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<DerbyTable>doAllTables()Retrieves all the tables in this schema.protected booleandoCheckIfEmpty()Checks whether this schema is empty.protected voiddoCreate()Creates this schema in the database.protected booleandoExists()Checks whether this schema exists.DerbyTablegetTable(String tableName)Retrieves the table with this name in this schema.-
Methods inherited from class migratedb.v1.core.internal.database.base.BaseSchema
allTables, create, equals, exists, getDatabase, getName, hashCode, isEmpty, toString
-
-
-
-
Constructor Detail
-
DerbySchema
public DerbySchema(JdbcTemplate jdbcTemplate, DerbyDatabase database, String name)
Creates a new Derby schema.- Parameters:
jdbcTemplate- The Jdbc Template for communicating with the DB.database- The database-specific support.name- The name of the schema.
-
-
Method Detail
-
doExists
protected boolean doExists() throws SQLExceptionDescription copied from class:BaseSchemaChecks whether this schema exists.- Specified by:
doExistsin classBaseSchema- Throws:
SQLException- when the check failed.
-
doCheckIfEmpty
protected boolean doCheckIfEmpty()
Description copied from class:BaseSchemaChecks whether this schema is empty.- Specified by:
doCheckIfEmptyin classBaseSchema
-
doCreate
protected void doCreate() throws SQLExceptionDescription copied from class:BaseSchemaCreates this schema in the database.- Specified by:
doCreatein classBaseSchema- Throws:
SQLException- when the creation failed.
-
doAllTables
protected List<DerbyTable> doAllTables() throws SQLException
Description copied from class:BaseSchemaRetrieves all the tables in this schema.- Specified by:
doAllTablesin classBaseSchema- Throws:
SQLException- when the retrieval failed.
-
getTable
public DerbyTable getTable(String tableName)
Description copied from interface:SchemaRetrieves the table with this name in this schema.
-
-