|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DbSupport
Abstraction for database-specific functionality.
| Method Summary | |
|---|---|
SqlScript |
createCleanScript(java.lang.String schema)
Creates a new sql script which clean this schema, by dropping all objects. |
SqlScript |
createSqlScript(java.lang.String sqlScriptSource,
PlaceholderReplacer placeholderReplacer)
Creates a new sql script from this resource with these placeholders to replace. |
java.lang.String |
getBooleanFalse()
|
java.lang.String |
getBooleanTrue()
|
java.lang.String |
getCurrentSchema()
Retrieves the current schema. |
java.lang.String |
getCurrentUserFunction()
|
java.lang.String |
getScriptLocation()
Returns the location on the classpath where the scripts for this database reside. |
boolean |
isSchemaEmpty(java.lang.String schema)
Checks if this database schema is empty. |
void |
lockTable(java.lang.String schema,
java.lang.String table)
Locks this table in this schema using a read/write pessimistic lock until the end of the current transaction. |
boolean |
supportsDdlTransactions()
Checks whether ddl transactions are supported for this database. |
boolean |
tableExists(java.lang.String schema,
java.lang.String table)
Checks whether this table is already present in the database. |
| Method Detail |
|---|
SqlScript createSqlScript(java.lang.String sqlScriptSource,
PlaceholderReplacer placeholderReplacer)
sqlScriptSource - The sql script as a text block with all placeholders still present.placeholderReplacer - The placeholder replacer to apply to sql migration scripts.
java.lang.IllegalStateException - Thrown when the script could not be read from this resource.SqlScript createCleanScript(java.lang.String schema)
schema - The schema to clean.
java.lang.String getScriptLocation()
boolean isSchemaEmpty(java.lang.String schema)
schema - The schema to check.
true if it is empty, false if it is not.
boolean tableExists(java.lang.String schema,
java.lang.String table)
schema - The schema in which to look.table - The table to look for.
true if the table exists, false if it doesn't.java.lang.String getCurrentSchema()
java.lang.String getCurrentUserFunction()
boolean supportsDdlTransactions()
true if ddl transactions are supported, false if not.
void lockTable(java.lang.String schema,
java.lang.String table)
schema - The schema of the table to lock.table - The table to lock.java.lang.String getBooleanTrue()
true in a boolean column.java.lang.String getBooleanFalse()
false in a boolean column.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||