|
||||||||||
| 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.MsSqlDatabase
public class MsSqlDatabase
Implementation of Database for a MsSQL database.
| Field Summary |
|---|
| Fields inherited from class org.dbmaintain.database.Database |
|---|
databaseConnection, identifierProcessor, schemaNames |
| Constructor Summary | |
|---|---|
MsSqlDatabase(DatabaseConnection databaseConnection,
IdentifierProcessor identifierProcessor)
|
|
| Method Summary | |
|---|---|
void |
disableCheckConstraints(String schemaName)
Drops all check constraints from the given schema |
void |
disableNotNullConstraints(String schemaName)
Drops not-null constraints on the given table. |
void |
disableReferentialConstraints(String schemaName)
Disables all referential constraints (e.g. foreign keys) on all table in the schema |
void |
disableUniqueConstraints(String schemaName)
Drops all unique constraints from the given schema (not the primary key constraints) |
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. |
Set<String> |
getIdentityColumnNames(String schemaName,
String tableName)
Gets the names of all identity columns of the given table. |
Set<String> |
getRuleNames(String schemaName)
Retrieves the names of all the rules in the database schema. |
Set<String> |
getStoredProcedureNames(String schemaName)
Retrieves the names of all the stored procedures in the database schema. |
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. |
protected Map<String,Set<String>> |
getTablePrimaryKeyColumnsMap(String schemaName)
|
Set<String> |
getTriggerNames(String schemaName)
Retrieves the names of all the 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 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 |
setSettingIdentityColumnValueEnabled(String schemaName,
String tableName,
boolean enabled)
Enables or disables the setting of identity value in insert and update statements. |
boolean |
supportsIdentityColumns()
Identity columns are supported. |
boolean |
supportsRules()
Rules are supported |
boolean |
supportsStoredProcedures()
Stored procedures are 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 MsSqlDatabase(DatabaseConnection databaseConnection,
IdentifierProcessor identifierProcessor)
| Method Detail |
|---|
public String getSupportedDatabaseDialect()
getSupportedDatabaseDialect in class Databasepublic Set<String> getTableNames(String schemaName)
getTableNames in class DatabaseschemaName - The schema, not null
public Set<String> getColumnNames(String schemaName,
String tableName)
getColumnNames in class DatabasetableName - The table, not nullschemaName - The schema, not null
public Set<String> getViewNames(String schemaName)
getViewNames in class DatabaseschemaName - The schema, not null
public Set<String> getSynonymNames(String schemaName)
getSynonymNames in class DatabaseschemaName - The schema, not null
public Set<String> getTriggerNames(String schemaName)
getTriggerNames in class DatabaseschemaName - The schema, not null
public Set<String> getStoredProcedureNames(String schemaName)
getStoredProcedureNames in class DatabaseschemaName - The schema, not null
public Set<String> getTypeNames(String schemaName)
getTypeNames in class DatabaseschemaName - The schema, not null
public Set<String> getRuleNames(String schemaName)
getRuleNames in class DatabaseschemaName - The schema, not null
public Set<String> getIdentityColumnNames(String schemaName,
String tableName)
getIdentityColumnNames in class DatabasetableName - The table, not nullschemaName - The schema, not null
public void incrementIdentityColumnToValue(String schemaName,
String tableName,
String identityColumnName,
long identityValue)
incrementIdentityColumnToValue in class DatabasetableName - The table with the identity column, not nullidentityColumnName - The column, not nullidentityValue - The new valueschemaName - The schema, not nullpublic void disableReferentialConstraints(String schemaName)
disableReferentialConstraints in class DatabaseschemaName - The schema, not nullpublic void disableValueConstraints(String schemaName)
disableValueConstraints in class DatabaseschemaName - The schema name, not nullpublic void disableUniqueConstraints(String schemaName)
schemaName - the schema name, not nullpublic void disableCheckConstraints(String schemaName)
schemaName - the schema name, not nullpublic void disableNotNullConstraints(String schemaName)
schemaName - the schema name, not nullprotected Map<String,Set<String>> getTablePrimaryKeyColumnsMap(String schemaName)
schemaName - the schema name, not null
public void setSettingIdentityColumnValueEnabled(String schemaName,
String tableName,
boolean enabled)
setSettingIdentityColumnValueEnabled in class DatabaseschemaName - The schema name, not nulltableName - The table with the identity column, not nullenabled - True to enable, false to disablepublic boolean supportsSynonyms()
supportsSynonyms in class Databasepublic boolean supportsTriggers()
supportsTriggers in class Databasepublic boolean supportsStoredProcedures()
supportsStoredProcedures in class Databasepublic boolean supportsTypes()
supportsTypes in class Databasepublic boolean supportsRules()
supportsRules in class Databasepublic boolean supportsIdentityColumns()
supportsIdentityColumns in class Database
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||