|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dbmaintain.database.Database
org.dbmaintain.database.impl.HsqldbDatabase
public class HsqldbDatabase
Implementation of Database
for a hsqldb database
Field Summary |
---|
Fields inherited from class org.dbmaintain.database.Database |
---|
databaseConnection, identifierProcessor, schemaNames |
Constructor Summary | |
---|---|
HsqldbDatabase(DatabaseConnection databaseConnection,
IdentifierProcessor identifierProcessor)
|
Method Summary | |
---|---|
protected void |
disableCheckAndUniqueConstraints(String schemaName)
Disables all check and unique constraints on all tables in the schema |
protected void |
disableNotNullConstraints(String schemaName)
Disables all not null constraints on all tables in the schema |
void |
disableReferentialConstraints(String schemaName)
Disables all referential constraints (e.g. foreign keys) on all table in the schema |
void |
disableValueConstraints(String schemaName)
Disables all value constraints (e.g. not null) on all tables in the schema |
Set<String> |
getColumnNames(String schemaName,
String tableName)
Gets the names of all columns of the given table. |
protected Integer |
getHsqldbMajorVersionNumber()
|
Set<String> |
getIdentityColumnNames(String schemaName,
String tableName)
Gets the names of all identity columns of the given table. |
Set<String> |
getSequenceNames(String schemaName)
Retrieves the names of all the sequences in the database schema. |
long |
getSequenceValue(String schemaName,
String sequenceName)
Returns the value of the sequence with the given name. |
String |
getSupportedDatabaseDialect()
|
Set<String> |
getTableNames(String schemaName)
Returns the names of all tables in the database. |
Set<String> |
getTriggerNames(String schemaName)
Retrieves the names of all the triggers in the database schema. |
Set<String> |
getViewNames(String schemaName)
Retrieves the names of all the views in the database schema. |
void |
incrementIdentityColumnToValue(String schemaName,
String tableName,
String identityColumnName,
long identityValue)
Increments the identity value for the specified identity column on the specified table to the given value. |
void |
incrementSequenceToValue(String schemaName,
String sequenceName,
long newSequenceValue)
Sets the next value of the sequence with the given sequence name to the given sequence value. |
void |
setDatabaseDefaultSchema()
Sets the current schema of the database. |
void |
setSettingIdentityColumnValueEnabled(String schemaName,
String tableName,
boolean enabled)
Enables or disables the setting of identity value in insert and update statements. |
boolean |
supportsCascade()
Cascade are supported. |
boolean |
supportsIdentityColumns()
Identity columns are supported. |
boolean |
supportsSequences()
Sequences are supported. |
boolean |
supportsSetDatabaseDefaultSchema()
Setting the default schema is supported. |
boolean |
supportsTriggers()
Triggers are supported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HsqldbDatabase(DatabaseConnection databaseConnection, IdentifierProcessor identifierProcessor)
Method Detail |
---|
public String getSupportedDatabaseDialect()
getSupportedDatabaseDialect
in class Database
public Set<String> getTableNames(String schemaName)
getTableNames
in class Database
schemaName
- The schema, not null
public Set<String> getColumnNames(String schemaName, String tableName)
getColumnNames
in class Database
tableName
- The table, not nullschemaName
- The schema, not null
public Set<String> getViewNames(String schemaName)
getViewNames
in class Database
schemaName
- The schema, not null
public Set<String> getSequenceNames(String schemaName)
getSequenceNames
in class Database
schemaName
- The schema, not null
public Set<String> getTriggerNames(String schemaName)
getTriggerNames
in class Database
schemaName
- The schema, not null
public void disableReferentialConstraints(String schemaName)
disableReferentialConstraints
in class Database
schemaName
- The schema name, not nullpublic void disableValueConstraints(String schemaName)
disableValueConstraints
in class Database
schemaName
- The schema name, not nullprotected void disableCheckAndUniqueConstraints(String schemaName)
schemaName
- The schema name, not nullprotected void disableNotNullConstraints(String schemaName)
schemaName
- The schema name, not nullpublic long getSequenceValue(String schemaName, String sequenceName)
getSequenceValue
in class Database
sequenceName
- The sequence, not nullschemaName
- The schema, not null
public void incrementSequenceToValue(String schemaName, String sequenceName, long newSequenceValue)
incrementSequenceToValue
in class Database
sequenceName
- The sequence, not nullnewSequenceValue
- The value to setschemaName
- The schema, not nullpublic Set<String> getIdentityColumnNames(String schemaName, String tableName)
getIdentityColumnNames
in class Database
tableName
- The table, not nullschemaName
- The schema, not null
public void incrementIdentityColumnToValue(String schemaName, String tableName, String identityColumnName, long identityValue)
incrementIdentityColumnToValue
in class Database
tableName
- The table with the identity column, not nullidentityColumnName
- The column, not nullidentityValue
- The new valueschemaName
- The schema, not nullpublic void setDatabaseDefaultSchema()
setDatabaseDefaultSchema
in class Database
public void setSettingIdentityColumnValueEnabled(String schemaName, String tableName, boolean enabled)
setSettingIdentityColumnValueEnabled
in class Database
schemaName
- The schema name, not nulltableName
- The table with the identity column, not nullenabled
- True to enable, false to disablepublic boolean supportsSequences()
supportsSequences
in class Database
public boolean supportsTriggers()
supportsTriggers
in class Database
public boolean supportsIdentityColumns()
supportsIdentityColumns
in class Database
public boolean supportsCascade()
supportsCascade
in class Database
public boolean supportsSetDatabaseDefaultSchema()
supportsSetDatabaseDefaultSchema
in class Database
protected Integer getHsqldbMajorVersionNumber()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |