org.dbmaintain.database
Class Database

java.lang.Object
  extended by org.dbmaintain.database.Database
Direct Known Subclasses:
Db2Database, DerbyDatabase, HsqldbDatabase, InformixDatabase, MsSqlDatabase, MySqlDatabase, OracleDatabase, PostgreSqlDatabase

public abstract class Database
extends Object

Helper class that implements a number of common operations on a database schema. Operations that can be implemented using general JDBC or ANSI SQL constructs, are implemented in this base abstract class. Operations that are DBMS specific are abstract, and their implementation is left to DBMS specific subclasses.

Author:
Filip Neven, Tim Ducheyne, Frederick Beernaert

Field Summary
protected  DatabaseConnection databaseConnection
           
protected  IdentifierProcessor identifierProcessor
           
protected  Set<String> schemaNames
           
 
Constructor Summary
protected Database(DatabaseConnection databaseConnection, IdentifierProcessor identifierProcessor)
           
 
Method Summary
 void disableReferentialConstraints()
          Disables all referential constraints (e.g. foreign keys) on all table in the default schema
abstract  void disableReferentialConstraints(String schemaName)
          Disables all referential constraints (e.g. foreign keys) on all table in the given schema
 void disableValueConstraints()
          Disables all value constraints (e.g. not null) on all tables in the default schema
abstract  void disableValueConstraints(String schemaName)
          Disables all value constraints (e.g. not null) on all tables in the given schema
 void dropMaterializedView(String viewName)
          Removes the materialized view with the given name from the default schema Note: the view name is surrounded with quotes, making it case-sensitive.
 void dropMaterializedView(String schemaName, String viewName)
          Removes the materialized view with the given name from the given schema Note: the view name is surrounded with quotes, making it case-sensitive.
 void dropRule(String schemaName, String ruleName)
          Drops the rule with the given name from the given schema Note: the rule name is surrounded with quotes, making it case-sensitive.
 void dropSequence(String sequenceName)
          Drops the sequence with the given name from the default schema Note: the sequence name is surrounded with quotes, making it case-sensitive.
 void dropSequence(String schemaName, String sequenceName)
          Drops the sequence with the given name from the given schema Note: the sequence name is surrounded with quotes, making it case-sensitive.
 void dropStoredProcedure(String storedProcedureName)
          Drops the stored procedure with the given name from the default schema Note: the stored procedure name is surrounded with quotes, making it case-sensitive.
 void dropStoredProcedure(String schemaName, String storedProcedureName)
          Drops the stored procedure with the given name from the given schema Note: the stored procedure name is surrounded with quotes, making it case-sensitive.
 void dropSynonym(String synonymName)
          Removes the synonym with the given name from the default schema Note: the synonym name is surrounded with quotes, making it case-sensitive.
 void dropSynonym(String schemaName, String synonymName)
          Removes the synonym with the given name from the given schema Note: the synonym name is surrounded with quotes, making it case-sensitive.
 void dropTable(String tableName)
          Removes the table with the given name from the default schema.
 void dropTable(String schemaName, String tableName)
          Removes the table with the given name from the given schema.
 void dropTrigger(String triggerName)
          Drops the trigger with the given name from the default schema Note: the trigger name is surrounded with quotes, making it case-sensitive.
 void dropTrigger(String schemaName, String triggerName)
          Drops the trigger with the given name from the given schema Note: the trigger name is surrounded with quotes, making it case-sensitive.
 void dropType(String typeName)
          Drops the type with the given name from the default schema Note: the type name is surrounded with quotes, making it case-sensitive.
 void dropType(String schemaName, String typeName)
          Drops the type with the given name from the given schema Note: the type name is surrounded with quotes, making it case-sensitive.
 void dropView(String viewName)
          Removes the view with the given name from the default schema Note: the view name is surrounded with quotes, making it case-sensitive.
 void dropView(String schemaName, String viewName)
          Removes the view with the given name from the given schema Note: the view name is surrounded with quotes, making it case-sensitive.
 Set<String> getColumnNames(String tableName)
          Gets the names of all columns of the given table in the default schema.
abstract  Set<String> getColumnNames(String schemaName, String tableName)
          Gets the names of all columns of the given table.
 DatabaseInfo getDatabaseInfo()
           
 String getDatabaseName()
           
 DataSource getDataSource()
          Gets the data source.
 String getDefaultSchemaName()
           
 String getIdentifierQuoteString()
           
 Set<String> getIdentityColumnNames(String tableName)
          Gets the names of all identity columns of the given table in the default schema.
 Set<String> getIdentityColumnNames(String schemaName, String tableName)
          Gets the names of all identity columns of the given table in the given schema.
 String getLongDataType()
          Gets the column type suitable to store values of the Java java.lang.Long type.
 Set<String> getMaterializedViewNames()
          Retrieves the names of all materialized views in the default schema.
 Set<String> getMaterializedViewNames(String schemaName)
          Retrieves the names of all materialized views in the given schema.
 Set<String> getRuleNames(String schemaName)
          Retrieves the names of all rules in the given schema.
 Set<String> getSchemaNames()
           
 Set<String> getSequenceNames()
          Retrieves the names of all sequences in the default schema.
 Set<String> getSequenceNames(String schemaName)
          Retrieves the names of all sequences in the given schema.
 long getSequenceValue(String sequenceName)
          Returns the value of the sequence with the given name from the default schema.
 long getSequenceValue(String schemaName, String sequenceName)
          Returns the value of the sequence with the given name from the given schema.
 SQLHandler getSQLHandler()
          Gets the sql handler.
 StoredIdentifierCase getStoredIdentifierCase()
           
 Set<String> getStoredProcedureNames()
          Retrieves the names of all stored procedures in the default schema.
 Set<String> getStoredProcedureNames(String schemaName)
          Retrieves the names of all stored procedures in the given schema.
abstract  String getSupportedDatabaseDialect()
           
 Set<String> getSynonymNames()
          Retrieves the names of all synonyms in the default schema.
 Set<String> getSynonymNames(String schemaName)
          Retrieves the names of all synonyms in the given schema.
 Set<String> getTableNames()
          Returns the names of all tables in the default schema.
abstract  Set<String> getTableNames(String schemaName)
          Returns the names of all tables in the given schema.
 String getTextDataType(int length)
          Gets the column type suitable to store text values.
 Set<String> getTriggerNames()
          Retrieves the names of all triggers in the default schema.
 Set<String> getTriggerNames(String schemaName)
          Retrieves the names of all triggers in the given schema.
 Set<String> getTypeNames()
          Retrieves the names of all types in the default schema.
 Set<String> getTypeNames(String schemaName)
          Retrieves the names of all types in the given schema.
 Set<String> getViewNames()
          Retrieves the names of all the views in the default schema.
abstract  Set<String> getViewNames(String schemaName)
          Retrieves the names of all the views in the database schema.
 void incrementIdentityColumnToValue(String tableName, String identityColumnName, long identityValue)
          Increments the identity value for the specified identity column on the specified table to the given value in the default 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 in the given schema.
 void incrementSequenceToValue(String sequenceName, long newSequenceValue)
          Sets the next value of the sequence with the given name to the given sequence value in the default schema.
 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 in the given schema.
 boolean isQuoted(String identifier)
           
 String qualified(String databaseObjectName)
          Qualifies the given database object name with the name of the default schema.
 String qualified(String schemaName, String databaseObjectName)
          Qualifies the given database object name with the name of the given schema.
 String quoted(String databaseObjectName)
          Put quotes around the given databaseObjectName, if the underlying DBMS supports quoted database object names.
 String removeIdentifierQuotes(String identifier)
           
 void setDatabaseDefaultSchema()
          Sets the current schema of the database.
 void setSettingIdentityColumnValueEnabled(String tableName, boolean enabled)
          Enables or disables the setting of identity value in insert and update statements in the default schema.
 void setSettingIdentityColumnValueEnabled(String schemaName, String tableName, boolean enabled)
          Enables or disables the setting of identity value in insert and update statements in the given schema.
 boolean supportsCascade()
          Indicates whether the underlying DBMS supports the cascade option for dropping tables and views.
 boolean supportsIdentityColumns()
          Indicates whether the underlying DBMS supports identity columns
 boolean supportsMaterializedViews()
          Indicates whether the underlying DBMS supports materialized views
 boolean supportsRules()
          Indicates whether the underlying DBMS supports database rules
 boolean supportsSequences()
          Indicates whether the underlying DBMS supports sequences
 boolean supportsSetDatabaseDefaultSchema()
          Indicates whether the underlying DBMS supports the setting of the current schema.
 boolean supportsStoredProcedures()
          Indicates whether the underlying DBMS supports stored procedures
 boolean supportsSynonyms()
          Indicates whether the underlying DBMS supports synonyms
 boolean supportsTriggers()
          Indicates whether the underlying DBMS supports triggers
 boolean supportsTypes()
          Indicates whether the underlying DBMS supports database types
 String toCorrectCaseIdentifier(String identifier)
          Converts the given identifier to uppercase/lowercase depending on the DBMS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

databaseConnection

protected DatabaseConnection databaseConnection

schemaNames

protected Set<String> schemaNames

identifierProcessor

protected IdentifierProcessor identifierProcessor
Constructor Detail

Database

protected Database(DatabaseConnection databaseConnection,
                   IdentifierProcessor identifierProcessor)
Method Detail

getSupportedDatabaseDialect

public abstract String getSupportedDatabaseDialect()
Returns:
the database dialect supported by this db support class, not null

getStoredIdentifierCase

public StoredIdentifierCase getStoredIdentifierCase()

getIdentifierQuoteString

public String getIdentifierQuoteString()

getDatabaseInfo

public DatabaseInfo getDatabaseInfo()

getDatabaseName

public String getDatabaseName()

getDataSource

public DataSource getDataSource()
Gets the data source.

Returns:
the data source, not null

getSQLHandler

public SQLHandler getSQLHandler()
Gets the sql handler.

Returns:
the data source, not null

getDefaultSchemaName

public String getDefaultSchemaName()

getSchemaNames

public Set<String> getSchemaNames()

getTableNames

public Set<String> getTableNames()
Returns the names of all tables in the default schema.

Returns:
The names of all tables in the database

getTableNames

public abstract Set<String> getTableNames(String schemaName)
Returns the names of all tables in the given schema.

Parameters:
schemaName - The schema, not null
Returns:
The names of all tables in the database

getColumnNames

public Set<String> getColumnNames(String tableName)
Gets the names of all columns of the given table in the default schema.

Parameters:
tableName - The table, not null
Returns:
The names of the columns of the table with the given name

getColumnNames

public abstract Set<String> getColumnNames(String schemaName,
                                           String tableName)
Gets the names of all columns of the given table.

Parameters:
schemaName - The schema, not null
tableName - The table, not null
Returns:
The names of the columns of the table with the given name

getViewNames

public Set<String> getViewNames()
Retrieves the names of all the views in the default schema.

Returns:
The names of all views in the database

getViewNames

public abstract Set<String> getViewNames(String schemaName)
Retrieves the names of all the views in the database schema.

Parameters:
schemaName - The schema, not null
Returns:
The names of all views in the database

getMaterializedViewNames

public Set<String> getMaterializedViewNames()
Retrieves the names of all materialized views in the default schema.

Returns:
The names of all materialized views in the database

getMaterializedViewNames

public Set<String> getMaterializedViewNames(String schemaName)
Retrieves the names of all materialized views in the given schema.

Parameters:
schemaName - The schema, not null
Returns:
The names of all materialized views in the database

getSynonymNames

public Set<String> getSynonymNames()
Retrieves the names of all synonyms in the default schema.

Returns:
The names of all synonyms in the database

getSynonymNames

public Set<String> getSynonymNames(String schemaName)
Retrieves the names of all synonyms in the given schema.

Parameters:
schemaName - The schema, not null
Returns:
The names of all synonyms in the database

getSequenceNames

public Set<String> getSequenceNames()
Retrieves the names of all sequences in the default schema.

Returns:
The names of all sequences in the database, not null

getSequenceNames

public Set<String> getSequenceNames(String schemaName)
Retrieves the names of all sequences in the given schema.

Parameters:
schemaName - The schema, not null
Returns:
The names of all sequences in the database, not null

getTriggerNames

public Set<String> getTriggerNames()
Retrieves the names of all triggers in the default schema.

Returns:
The names of all triggers in the database, not null

getTriggerNames

public Set<String> getTriggerNames(String schemaName)
Retrieves the names of all triggers in the given schema.

Parameters:
schemaName - The schema, not null
Returns:
The names of all triggers in the database, not null

getStoredProcedureNames

public Set<String> getStoredProcedureNames()
Retrieves the names of all stored procedures in the default schema.

Returns:
The names of all stored procedures in the database, not null

getStoredProcedureNames

public Set<String> getStoredProcedureNames(String schemaName)
Retrieves the names of all stored procedures in the given schema.

Parameters:
schemaName - The schema, not null
Returns:
The names of all stored procedures in the database, not null

getTypeNames

public Set<String> getTypeNames()
Retrieves the names of all types in the default schema.

Returns:
The names of all types in the database, not null

getTypeNames

public Set<String> getTypeNames(String schemaName)
Retrieves the names of all types in the given schema.

Parameters:
schemaName - The schema, not null
Returns:
The names of all types in the database, not null

getRuleNames

public Set<String> getRuleNames(String schemaName)
Retrieves the names of all rules in the given schema.

Parameters:
schemaName - The schema, not null
Returns:
The names of all rules in the database, not null

dropTable

public void dropTable(String tableName)
Removes the table with the given name from the default schema. Note: the table name is surrounded with quotes, making it case-sensitive.

Parameters:
tableName - The table to drop (case-sensitive), not null

dropTable

public void dropTable(String schemaName,
                      String tableName)
Removes the table with the given name from the given schema. Note: the table name is surrounded with quotes, making it case-sensitive.

Parameters:
schemaName - The schema, not null
tableName - The table to drop (case-sensitive), not null

dropView

public void dropView(String viewName)
Removes the view with the given name from the default schema Note: the view name is surrounded with quotes, making it case-sensitive.

Parameters:
viewName - The view to drop (case-sensitive), not null

dropView

public void dropView(String schemaName,
                     String viewName)
Removes the view with the given name from the given schema Note: the view name is surrounded with quotes, making it case-sensitive.

Parameters:
schemaName - The schema, not null
viewName - The view to drop (case-sensitive), not null

dropMaterializedView

public void dropMaterializedView(String viewName)
Removes the materialized view with the given name from the default schema Note: the view name is surrounded with quotes, making it case-sensitive.

Parameters:
viewName - The view to drop (case-sensitive), not null

dropMaterializedView

public void dropMaterializedView(String schemaName,
                                 String viewName)
Removes the materialized view with the given name from the given schema Note: the view name is surrounded with quotes, making it case-sensitive.

Parameters:
schemaName - The schema, not null
viewName - The view to drop (case-sensitive), not null

dropSynonym

public void dropSynonym(String synonymName)
Removes the synonym with the given name from the default schema Note: the synonym name is surrounded with quotes, making it case-sensitive.

Parameters:
synonymName - The synonym to drop (case-sensitive), not null

dropSynonym

public void dropSynonym(String schemaName,
                        String synonymName)
Removes the synonym with the given name from the given schema Note: the synonym name is surrounded with quotes, making it case-sensitive.

Parameters:
schemaName - The schema, not null
synonymName - The synonym to drop (case-sensitive), not null

dropSequence

public void dropSequence(String sequenceName)
Drops the sequence with the given name from the default schema Note: the sequence name is surrounded with quotes, making it case-sensitive.

Parameters:
sequenceName - The sequence to drop (case-sensitive), not null

dropSequence

public void dropSequence(String schemaName,
                         String sequenceName)
Drops the sequence with the given name from the given schema Note: the sequence name is surrounded with quotes, making it case-sensitive.

Parameters:
schemaName - The schema, not null
sequenceName - The sequence to drop (case-sensitive), not null

dropTrigger

public void dropTrigger(String triggerName)
Drops the trigger with the given name from the default schema Note: the trigger name is surrounded with quotes, making it case-sensitive.

Parameters:
triggerName - The trigger to drop (case-sensitive), not null

dropTrigger

public void dropTrigger(String schemaName,
                        String triggerName)
Drops the trigger with the given name from the given schema Note: the trigger name is surrounded with quotes, making it case-sensitive.

Parameters:
schemaName - The schema, not null
triggerName - The trigger to drop (case-sensitive), not null

dropStoredProcedure

public void dropStoredProcedure(String storedProcedureName)
Drops the stored procedure with the given name from the default schema Note: the stored procedure name is surrounded with quotes, making it case-sensitive.

Parameters:
storedProcedureName - The stored procedure to drop (case-sensitive), not null

dropStoredProcedure

public void dropStoredProcedure(String schemaName,
                                String storedProcedureName)
Drops the stored procedure with the given name from the given schema Note: the stored procedure name is surrounded with quotes, making it case-sensitive.

Parameters:
schemaName - The schema, not null
storedProcedureName - The stored procedure to drop (case-sensitive), not null

dropType

public void dropType(String typeName)
Drops the type with the given name from the default schema Note: the type name is surrounded with quotes, making it case-sensitive.

Parameters:
typeName - The type to drop (case-sensitive), not null

dropType

public void dropType(String schemaName,
                     String typeName)
Drops the type with the given name from the given schema Note: the type name is surrounded with quotes, making it case-sensitive.

Parameters:
schemaName - The schema, not null
typeName - The type to drop (case-sensitive), not null

dropRule

public void dropRule(String schemaName,
                     String ruleName)
Drops the rule with the given name from the given schema Note: the rule name is surrounded with quotes, making it case-sensitive.

Parameters:
schemaName - The schema, not null
ruleName - The rule to drop (case-sensitive), not null

disableReferentialConstraints

public void disableReferentialConstraints()
Disables all referential constraints (e.g. foreign keys) on all table in the default schema


disableReferentialConstraints

public abstract void disableReferentialConstraints(String schemaName)
Disables all referential constraints (e.g. foreign keys) on all table in the given schema

Parameters:
schemaName - The schema, not null

disableValueConstraints

public void disableValueConstraints()
Disables all value constraints (e.g. not null) on all tables in the default schema


disableValueConstraints

public abstract void disableValueConstraints(String schemaName)
Disables all value constraints (e.g. not null) on all tables in the given schema

Parameters:
schemaName - The schema, not null

getSequenceValue

public long getSequenceValue(String sequenceName)
Returns the value of the sequence with the given name from the default schema.

Note: this can have the side-effect of increasing the sequence value.

Parameters:
sequenceName - The sequence, not null
Returns:
The value of the sequence with the given name

getSequenceValue

public long getSequenceValue(String schemaName,
                             String sequenceName)
Returns the value of the sequence with the given name from the given schema.

Note: this can have the side-effect of increasing the sequence value.

Parameters:
schemaName - The schema, not null
sequenceName - The sequence, not null
Returns:
The value of the sequence with the given name

incrementSequenceToValue

public void incrementSequenceToValue(String sequenceName,
                                     long newSequenceValue)
Sets the next value of the sequence with the given name to the given sequence value in the default schema.

Parameters:
sequenceName - The sequence, not null
newSequenceValue - The value to set

incrementSequenceToValue

public 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 in the given schema.

Parameters:
schemaName - The schema, not null
sequenceName - The sequence, not null
newSequenceValue - The value to set

getIdentityColumnNames

public Set<String> getIdentityColumnNames(String tableName)
Gets the names of all identity columns of the given table in the default schema.

Parameters:
tableName - The table, not null
Returns:
The names of the identity columns of the table with the given name

getIdentityColumnNames

public Set<String> getIdentityColumnNames(String schemaName,
                                          String tableName)
Gets the names of all identity columns of the given table in the given schema.

Parameters:
schemaName - The schema, not null
tableName - The table, not null
Returns:
The names of the identity columns of the table with the given name

incrementIdentityColumnToValue

public void incrementIdentityColumnToValue(String tableName,
                                           String identityColumnName,
                                           long identityValue)
Increments the identity value for the specified identity column on the specified table to the given value in the default schema. If there is no identity specified on the given primary key, the method silently finishes without effect.

Parameters:
tableName - The table with the identity column, not null
identityColumnName - The column, not null
identityValue - The new value

incrementIdentityColumnToValue

public 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 in the given schema. If there is no identity specified on the given primary key, the method silently finishes without effect.

Parameters:
schemaName - The schema, not null
tableName - The table with the identity column, not null
identityColumnName - The column, not null
identityValue - The new value

setDatabaseDefaultSchema

public void setDatabaseDefaultSchema()
Sets the current schema of the database. If a current schema is set, it does not need to be specified explicitly in the scripts.


getLongDataType

public String getLongDataType()
Gets the column type suitable to store values of the Java java.lang.Long type.

Returns:
The column type

getTextDataType

public String getTextDataType(int length)
Gets the column type suitable to store text values.

Parameters:
length - The nr of characters.
Returns:
The column type, not null

qualified

public String qualified(String databaseObjectName)
Qualifies the given database object name with the name of the default schema. Quotes are put around both schemaname and object name. If the schemaName is not supplied, the database object is returned surrounded with quotes. If the DBMS doesn't support quoted database object names, no quotes are put around neither schema name nor database object name.

Parameters:
databaseObjectName - The database object name to be qualified
Returns:
The qualified database object name

qualified

public String qualified(String schemaName,
                        String databaseObjectName)
Qualifies the given database object name with the name of the given schema. Quotes are put around both schemaname and object name. If the schemaName is not supplied, the database object is returned surrounded with quotes. If the DBMS doesn't support quoted database object names, no quotes are put around neither schema name nor database object name.

Parameters:
schemaName - The schema, not null
databaseObjectName - The database object name to be qualified
Returns:
The qualified database object name

quoted

public String quoted(String databaseObjectName)
Put quotes around the given databaseObjectName, if the underlying DBMS supports quoted database object names. If not, the databaseObjectName is returned unchanged.

Parameters:
databaseObjectName - The name, not null
Returns:
Quoted version of the given databaseObjectName, if supported by the underlying DBMS

toCorrectCaseIdentifier

public String toCorrectCaseIdentifier(String identifier)
Converts the given identifier to uppercase/lowercase depending on the DBMS. If a value is surrounded with double quotes (") and the DBMS supports quoted database object names, the case is left untouched and the double quotes are stripped. These values are treated as case sensitive names.

Identifiers can be prefixed with schema names. These schema names will be converted in the same way as described above. Quoting the schema name will make it case sensitive. Examples:

mySchema.myTable -> MYSCHEMA.MYTABLE "mySchema".myTable -> mySchema.MYTABLE "mySchema"."myTable" -> mySchema.myTable

Parameters:
identifier - The identifier, not null
Returns:
The name converted to correct case if needed, not null

isQuoted

public boolean isQuoted(String identifier)
Parameters:
identifier - The identifier, not null
Returns:
True if the identifier starts and ends with identifier quotes

removeIdentifierQuotes

public String removeIdentifierQuotes(String identifier)
Parameters:
identifier - The identifier, not null
Returns:
The identifier, removing identifier quotes if necessary, not null

setSettingIdentityColumnValueEnabled

public void setSettingIdentityColumnValueEnabled(String tableName,
                                                 boolean enabled)
Enables or disables the setting of identity value in insert and update statements in the default schema. By default some databases do not allow to set values of identity columns directly from insert/update statements. If supported, this method will enable/disable this behavior.

Parameters:
tableName - The table with the identity column, not null
enabled - True to enable, false to disable

setSettingIdentityColumnValueEnabled

public void setSettingIdentityColumnValueEnabled(String schemaName,
                                                 String tableName,
                                                 boolean enabled)
Enables or disables the setting of identity value in insert and update statements in the given schema. By default some databases do not allow to set values of identity columns directly from insert/update statements. If supported, this method will enable/disable this behavior.

Parameters:
schemaName - The schema name, not null
tableName - The table with the identity column, not null
enabled - True to enable, false to disable

supportsSynonyms

public boolean supportsSynonyms()
Indicates whether the underlying DBMS supports synonyms

Returns:
True if synonyms are supported, false otherwise

supportsSequences

public boolean supportsSequences()
Indicates whether the underlying DBMS supports sequences

Returns:
True if sequences are supported, false otherwise

supportsTriggers

public boolean supportsTriggers()
Indicates whether the underlying DBMS supports triggers

Returns:
True if triggers are supported, false otherwise

supportsStoredProcedures

public boolean supportsStoredProcedures()
Indicates whether the underlying DBMS supports stored procedures

Returns:
True if stored procedures are supported, false other

supportsTypes

public boolean supportsTypes()
Indicates whether the underlying DBMS supports database types

Returns:
True if types are supported, false otherwise

supportsRules

public boolean supportsRules()
Indicates whether the underlying DBMS supports database rules

Returns:
True if rules are supported, false otherwise

supportsIdentityColumns

public boolean supportsIdentityColumns()
Indicates whether the underlying DBMS supports identity columns

Returns:
True if identity is supported, false otherwise

supportsMaterializedViews

public boolean supportsMaterializedViews()
Indicates whether the underlying DBMS supports materialized views

Returns:
True if materialized views are supported, false otherwise

supportsCascade

public boolean supportsCascade()
Indicates whether the underlying DBMS supports the cascade option for dropping tables and views.

Returns:
True if cascade is supported, false otherwise

supportsSetDatabaseDefaultSchema

public boolean supportsSetDatabaseDefaultSchema()
Indicates whether the underlying DBMS supports the setting of the current schema. If a current schema is set, it does not need to be explicitly specified in the scripts.

Returns:
True if setting the current schema is supported, false otherwise


Copyright © 2011. All Rights Reserved.