Class DerbyTable
- java.lang.Object
-
- migratedb.v1.core.internal.database.base.BaseSchemaObject
-
- migratedb.v1.core.internal.database.base.BaseTable
-
- migratedb.v1.core.internal.database.derby.DerbyTable
-
- All Implemented Interfaces:
SchemaObject,Table
public class DerbyTable extends BaseTable
Derby-specific table.
-
-
Field Summary
-
Fields inherited from class migratedb.v1.core.internal.database.base.BaseSchemaObject
jdbcTemplate
-
-
Constructor Summary
Constructors Constructor Description DerbyTable(JdbcTemplate jdbcTemplate, DerbyDatabase database, DerbySchema schema, String name)Creates a new Derby table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandoExists()Checks whether this table exists.protected voiddoLock()Locks this table in this schema using a read/write pessimistic lock until the end of the current transaction.-
Methods inherited from class migratedb.v1.core.internal.database.base.BaseTable
doUnlock, exists, exists, lock, unlock
-
Methods inherited from class migratedb.v1.core.internal.database.base.BaseSchemaObject
getDatabase, getName, getSchema, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface migratedb.v1.core.api.internal.database.base.SchemaObject
getDatabase, getName, getSchema, toString
-
-
-
-
Constructor Detail
-
DerbyTable
public DerbyTable(JdbcTemplate jdbcTemplate, DerbyDatabase database, DerbySchema schema, String name)
Creates a new Derby table.- Parameters:
jdbcTemplate- The Jdbc Template for communicating with the DB.database- The database-specific support.schema- The schema this table lives in.name- The name of the table.
-
-
Method Detail
-
doExists
protected boolean doExists() throws SQLExceptionDescription copied from class:BaseTableChecks whether this table exists.- Specified by:
doExistsin classBaseTable- Throws:
SQLException- when the check failed.
-
doLock
protected void doLock() throws SQLExceptionDescription copied from class:BaseTableLocks this table in this schema using a read/write pessimistic lock until the end of the current transaction. Note thatunlock()still needs to be called even if your database unlocks the table implicitly (in which casedoUnlock()may be a no-op) in order to maintain the lock count correctly.- Specified by:
doLockin classBaseTable- Throws:
SQLException- when this table in this schema could not be locked.
-
-