|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.groupdocs.annotation.data.connector.db.updater.CommonStorageSchemaUpdater
public class CommonStorageSchemaUpdater
Common storage schema updated for all databases
| Field Summary | |
|---|---|
protected Map<Class,String> |
javaType2dbType
|
| Constructor Summary | |
|---|---|
CommonStorageSchemaUpdater(String dbDriver,
String dbConnectionString)
Create updater instance |
|
| Method Summary | |
|---|---|
protected void |
executeSQL(String sql)
Execute SQL |
protected Connection |
getSchemaUpdateConnection()
Create connection for update database schema |
int |
getStorageSchemaVersion()
Getter for property 'storageSchemaVersion'. |
boolean |
onCreateColumn(String tableName,
String fieldName,
Class fieldType)
Create column in table |
boolean |
onDeleteColumn(String tableName,
String fieldName)
Delete column from table |
boolean |
onDeleteTable(String tableName)
Delete table from database |
boolean |
onRenameColumn(String tableName,
String fieldName,
String newFieldName)
Rename table column |
boolean |
onRenameTable(String tableName,
String newTableName)
Rename table |
boolean |
setStorageSchemaVersion(int storageSchemaVersion)
Set database schema version |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<Class,String> javaType2dbType
| Constructor Detail |
|---|
public CommonStorageSchemaUpdater(String dbDriver,
String dbConnectionString)
dbDriver - driver namedbConnectionString - connection string| Method Detail |
|---|
public int getStorageSchemaVersion()
getStorageSchemaVersion in interface IStorageSchemaUpdater
protected Connection getSchemaUpdateConnection()
throws AnnotationException
AnnotationException
protected void executeSQL(String sql)
throws AnnotationException
sql - SQL to execute
AnnotationException
public boolean onDeleteColumn(String tableName,
String fieldName)
throws AnnotationException
onDeleteColumn in interface IStorageSchemaUpdatertableName - table namefieldName - column name
AnnotationException
public boolean onRenameColumn(String tableName,
String fieldName,
String newFieldName)
throws AnnotationException
onRenameColumn in interface IStorageSchemaUpdatertableName - table namefieldName - column namenewFieldName - new column name
AnnotationException
public boolean onCreateColumn(String tableName,
String fieldName,
Class fieldType)
throws AnnotationException
onCreateColumn in interface IStorageSchemaUpdatertableName - table namefieldName - column namefieldType - column type
AnnotationException
public boolean onDeleteTable(String tableName)
throws AnnotationException
onDeleteTable in interface IStorageSchemaUpdatertableName - table name for delete
AnnotationException
public boolean onRenameTable(String tableName,
String newTableName)
throws AnnotationException
onRenameTable in interface IStorageSchemaUpdatertableName - table namenewTableName - new table name
AnnotationException
public boolean setStorageSchemaVersion(int storageSchemaVersion)
throws AnnotationException
setStorageSchemaVersion in interface IStorageSchemaUpdaterstorageSchemaVersion - database schema version
AnnotationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||