com.groupdocs.annotation.data.connector.db.updater
Interface IStorageSchemaUpdater

All Known Implementing Classes:
CommonStorageSchemaUpdater, MssqlStorageSchemaUpdater, MysqlStorageSchemaUpdater, PostgresqlStorageSchemaUpdater, SqliteStorageSchemaUpdater

public interface IStorageSchemaUpdater

Author:
Aleksey Permyakov on 16.10.2014.

Method Summary
 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
 

Method Detail

getStorageSchemaVersion

int getStorageSchemaVersion()
Getter for property 'storageSchemaVersion'.

Returns:
Value for property 'storageSchemaVersion'.

onDeleteColumn

boolean onDeleteColumn(String tableName,
                       String fieldName)
                       throws AnnotationException
Delete column from table

Parameters:
tableName - table name
fieldName - column name
Returns:
success or fail
Throws:
AnnotationException

onRenameColumn

boolean onRenameColumn(String tableName,
                       String fieldName,
                       String newFieldName)
                       throws AnnotationException
Rename table column

Parameters:
tableName - table name
fieldName - column name
newFieldName - new column name
Returns:
success or fail
Throws:
AnnotationException

onCreateColumn

boolean onCreateColumn(String tableName,
                       String fieldName,
                       Class fieldType)
                       throws AnnotationException
Create column in table

Parameters:
tableName - table name
fieldName - column name
fieldType - column type
Returns:
success or fail
Throws:
AnnotationException

onDeleteTable

boolean onDeleteTable(String tableName)
                      throws AnnotationException
Delete table from database

Parameters:
tableName - table name for delete
Returns:
success or fail
Throws:
AnnotationException

onRenameTable

boolean onRenameTable(String tableName,
                      String newTableName)
                      throws AnnotationException
Rename table

Parameters:
tableName - table name
newTableName - new table name
Returns:
success or fail
Throws:
AnnotationException

setStorageSchemaVersion

boolean setStorageSchemaVersion(int storageSchemaVersion)
                                throws AnnotationException
Set database schema version

Parameters:
storageSchemaVersion - database schema version
Returns:
success or fail
Throws:
AnnotationException


Copyright © 2014. All rights reserved.