|
||||||||||
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.OracleDatabase
public class OracleDatabase
Implementation of Database
for an Oracle database.
Field Summary |
---|
Fields inherited from class org.dbmaintain.database.Database |
---|
databaseConnection, identifierProcessor, schemaNames |
Constructor Summary | |
---|---|
OracleDatabase(DatabaseConnection databaseConnection,
IdentifierProcessor identifierProcessor)
|
Method Summary | |
---|---|
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 |
void |
dropMaterializedView(String schemaName,
String materializedViewName)
Removes the materialized view with the given name from the database Note: the view name is surrounded with quotes, making it case-sensitive. |
void |
dropTable(String schemaName,
String tableName)
Removes the table with the given name from the database. |
void |
dropType(String schemaName,
String typeName)
Drops the type with the given name from the database Note: the type name is surrounded with quotes, making it case-sensitive. |
void |
dropView(String schemaName,
String viewName)
Removes the view with the given name from the database Note: the view name is surrounded with quotes, making it case-sensitive. |
Set<String> |
getColumnNames(String schemaName,
String tableName)
Gets the names of all columns of the given table. |
String |
getLongDataType()
Gets the column type suitable to store values of the Java java.lang.Long type. |
Set<String> |
getMaterializedViewNames(String schemaName)
Retrieves the names of all materialized views in the database schema. |
protected Integer |
getOracleMajorVersionNumber()
|
Set<String> |
getSequenceNames(String schemaName)
Retrieves the names of all 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> |
getSynonymNames(String schemaName)
Retrieves the names of all synonyms in the database schema. |
Set<String> |
getTableNames(String schemaName)
Returns the names of all tables in the database. |
String |
getTextDataType(int length)
Gets the column type suitable to store text values. |
Set<String> |
getTriggerNames(String schemaName)
Retrieves the names of all triggers in the database schema. |
Set<String> |
getTypeNames(String schemaName)
Retrieves the names of all the types in the database schema. |
Set<String> |
getViewNames(String schemaName)
Retrieves the names of all views in the database 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. |
void |
setDatabaseDefaultSchema()
Sets the current schema of the database. |
boolean |
supportsCascade()
Cascade are supported. |
boolean |
supportsMaterializedViews()
Materialized views are supported |
protected boolean |
supportsPurge()
|
boolean |
supportsSequences()
Sequences are supported. |
boolean |
supportsSetDatabaseDefaultSchema()
Setting the default schema is supported. |
boolean |
supportsSynonyms()
Synonyms are supported |
boolean |
supportsTriggers()
Triggers are supported. |
boolean |
supportsTypes()
Types are supported |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OracleDatabase(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> getMaterializedViewNames(String schemaName)
getMaterializedViewNames
in class Database
schemaName
- The schema, not null
public Set<String> getSynonymNames(String schemaName)
getSynonymNames
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 Set<String> getTypeNames(String schemaName)
getTypeNames
in class Database
schemaName
- The schema, not null
public void dropTable(String schemaName, String tableName)
dropTable
in class Database
tableName
- The table to drop (case-sensitive), not nullschemaName
- The schema, not nullpublic void dropView(String schemaName, String viewName)
dropView
in class Database
viewName
- The view to drop (case-sensitive), not nullschemaName
- The schema, not nullpublic void dropMaterializedView(String schemaName, String materializedViewName)
dropMaterializedView
in class Database
materializedViewName
- The view to drop (case-sensitive), not nullschemaName
- The schema, not nullpublic void dropType(String schemaName, String typeName)
dropType
in class Database
typeName
- The type to drop (case-sensitive), not nullschemaName
- The schema, not nullpublic void disableReferentialConstraints(String schemaName)
disableReferentialConstraints
in class Database
schemaName
- The schema, not nullpublic void disableValueConstraints(String schemaName)
disableValueConstraints
in class Database
schemaName
- The schema, 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 void setDatabaseDefaultSchema()
setDatabaseDefaultSchema
in class Database
public String getLongDataType()
java.lang.Long
type.
getLongDataType
in class Database
public String getTextDataType(int length)
getTextDataType
in class Database
length
- The nr of characters.
public boolean supportsSynonyms()
supportsSynonyms
in class Database
public boolean supportsSequences()
supportsSequences
in class Database
public boolean supportsTriggers()
supportsTriggers
in class Database
public boolean supportsTypes()
supportsTypes
in class Database
public boolean supportsMaterializedViews()
supportsMaterializedViews
in class Database
public boolean supportsCascade()
supportsCascade
in class Database
public boolean supportsSetDatabaseDefaultSchema()
supportsSetDatabaseDefaultSchema
in class Database
protected boolean supportsPurge()
protected Integer getOracleMajorVersionNumber()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |