|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.dbreplicator.replication.DBHandler
Class SQLServerHandler
java.lang.Objectorg.dbreplicator.replication.DBHandler.AbstractDataBaseHandler
org.dbreplicator.replication.DBHandler.SQLServerHandler
public class SQLServerHandler
- extends AbstractDataBaseHandler
Method overrides specific to MSSQL Servere.
| Field Summary |
|---|
| Fields inherited from class org.dbreplicator.replication.DBHandler.AbstractDataBaseHandler |
|---|
ignoredColumns_Table, trackPrimaryKeyUpdation_Table, trackReplicationTablesUpdation_Table |
| Constructor Summary | |
|---|---|
SQLServerHandler()
|
|
SQLServerHandler(ConnectionPool connectionPool0)
|
|
| Method Summary | |
|---|---|
void |
createScheduleTable(java.lang.String subName)
|
void |
createShadowTable(java.lang.String pubsubName,
java.lang.String tableName,
java.lang.String allColSequence,
java.lang.String[] primaryColumns)
Creates Shadow Table as per the database. |
void |
createShadowTableTriggers(java.lang.String pubName,
java.lang.String tableName,
java.util.ArrayList colNameDataType,
java.lang.String[] primCols)
Creates ShadowTable triggers on different replication tables. |
void |
createShadowTableTriggers(java.lang.String pubName,
java.lang.String tableName,
java.util.HashMap colNameDataType,
java.lang.String[] primCols)
|
int |
getAppropriatePrecision(int columnSize,
java.lang.String datatypeName)
This method is implemented in child classes if precision exceed the maximum precision of the data type |
int |
getAppropriateScale(int columnScale)
|
AbstractColumnObject |
getColumnObject(TypeInfo typeInfo)
According to the sqlType, different column's for different databases are handled saperately. |
boolean |
getPrimaryKeyErrorCode(java.sql.SQLException ex)
|
java.lang.String |
getTableColumns(int VendorType,
java.lang.String ColumnName,
TypeInfo typeInfo,
int columnPrecision,
java.sql.ResultSet rs)
|
boolean |
isColumnSizeExceedMaximumSize(TypeInfo typeInfo)
|
boolean |
isDataTypeOptionalSizeSupported(TypeInfo typeInfo)
|
boolean |
isForeignKeyException(java.sql.SQLException ex)
To get the foreign key error code to resolve the Synchronization problem when tables have parent - child relationship. |
boolean |
isPrimaryKeyException(java.sql.SQLException ex)
isPrimaryKeyException |
boolean |
isSchemaSupported()
isSchemaSupported |
java.sql.PreparedStatement |
makePrimaryPreperedStatement(java.sql.Connection pub_sub_Connection,
java.lang.String[] primaryColumns,
java.lang.String shadowTable,
java.lang.String local_pub_sub_name)
|
java.sql.PreparedStatement |
makePrimaryPreperedStatementBackwardTraversing(java.lang.String[] primaryColumns,
long lastId,
java.lang.String local_pub_sub_name,
java.lang.String shadowTable)
|
void |
makeProvisionForLOBDataTypes(java.util.ArrayList dataTypeMap)
|
void |
makeProvisionForLOBDataTypes(java.util.HashMap dataTypeMap)
|
void |
setColumnPrecisionInTypeInfo(TypeInfo typeInfo,
java.sql.ResultSetMetaData rsmt,
int columnIndex)
|
void |
setTypeInfo(TypeInfo typeInfo,
java.sql.ResultSet rs)
This is a very important function which sets the parameter (instance of Class TypeInfo) with the corresponding typeName of the sqlType for different databases. |
java.lang.String |
updateDataType(java.lang.String dataType0)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
SQLServerHandler
public SQLServerHandler()
SQLServerHandler
public SQLServerHandler(ConnectionPool connectionPool0)
| Method Detail |
|---|
createShadowTable
public void createShadowTable(java.lang.String pubsubName, java.lang.String tableName, java.lang.String allColSequence, java.lang.String[] primaryColumns) throws RepException
- Description copied from class:
AbstractDataBaseHandler - Creates Shadow Table as per the database.
- Specified by:
createShadowTablein classAbstractDataBaseHandler
- Throws:
RepException
createScheduleTable
public void createScheduleTable(java.lang.String subName) throws java.sql.SQLException, RepException
- Throws:
java.sql.SQLExceptionRepException
createShadowTableTriggers
public void createShadowTableTriggers(java.lang.String pubName, java.lang.String tableName, java.util.HashMap colNameDataType, java.lang.String[] primCols) throws RepException
- Throws:
RepException
createShadowTableTriggers
public void createShadowTableTriggers(java.lang.String pubName, java.lang.String tableName, java.util.ArrayList colNameDataType, java.lang.String[] primCols) throws RepException
- Description copied from class:
AbstractDataBaseHandler - Creates ShadowTable triggers on different replication tables.
- Specified by:
createShadowTableTriggersin classAbstractDataBaseHandler
- Throws:
RepException
isDataTypeOptionalSizeSupported
public boolean isDataTypeOptionalSizeSupported(TypeInfo typeInfo)
- Specified by:
isDataTypeOptionalSizeSupportedin classAbstractDataBaseHandler
setTypeInfo
public void setTypeInfo(TypeInfo typeInfo, java.sql.ResultSet rs) throws RepException, java.sql.SQLException
- Description copied from class:
AbstractDataBaseHandler - This is a very important function which sets the parameter (instance of
Class TypeInfo) with the corresponding typeName of the sqlType for different
databases. So that we can make corresponding queries.
- Specified by:
setTypeInfoin classAbstractDataBaseHandler
- Throws:
RepExceptionjava.sql.SQLException
getColumnObject
public AbstractColumnObject getColumnObject(TypeInfo typeInfo) throws RepException
- Description copied from class:
AbstractDataBaseHandler - According to the sqlType, different column's for different databases are handled
saperately. It returns the object of AbstractColumnObject which is extended
by each type of column Object classes. This fundamental is used basically for
handeling Blob and Clob type of columns.
- Specified by:
getColumnObjectin classAbstractDataBaseHandler
- Throws:
RepException
makeProvisionForLOBDataTypes
public void makeProvisionForLOBDataTypes(java.util.HashMap dataTypeMap)
makeProvisionForLOBDataTypes
public void makeProvisionForLOBDataTypes(java.util.ArrayList dataTypeMap)
- Overrides:
makeProvisionForLOBDataTypesin classAbstractDataBaseHandler
updateDataType
public java.lang.String updateDataType(java.lang.String dataType0)
- Overrides:
updateDataTypein classAbstractDataBaseHandler
isColumnSizeExceedMaximumSize
public boolean isColumnSizeExceedMaximumSize(TypeInfo typeInfo)
getTableColumns
public java.lang.String getTableColumns(int VendorType, java.lang.String ColumnName, TypeInfo typeInfo, int columnPrecision, java.sql.ResultSet rs) throws RepException
- Overrides:
getTableColumnsin classAbstractDataBaseHandler
- Throws:
RepException
getPrimaryKeyErrorCode
public boolean getPrimaryKeyErrorCode(java.sql.SQLException ex) throws java.sql.SQLException
- Throws:
java.sql.SQLException
setColumnPrecisionInTypeInfo
public void setColumnPrecisionInTypeInfo(TypeInfo typeInfo, java.sql.ResultSetMetaData rsmt, int columnIndex) throws java.sql.SQLException
- Overrides:
setColumnPrecisionInTypeInfoin classAbstractDataBaseHandler
- Throws:
java.sql.SQLException
getAppropriateScale
public int getAppropriateScale(int columnScale) throws RepException
- Specified by:
getAppropriateScalein classAbstractDataBaseHandler
- Throws:
RepException
getAppropriatePrecision
public int getAppropriatePrecision(int columnSize, java.lang.String datatypeName)
- Description copied from class:
AbstractDataBaseHandler - This method is implemented in child classes if precision exceed the
maximum precision of the data type
- Overrides:
getAppropriatePrecisionin classAbstractDataBaseHandler
- Parameters:
columnSize- int- Returns:
- int
makePrimaryPreperedStatement
public java.sql.PreparedStatement makePrimaryPreperedStatement(java.sql.Connection pub_sub_Connection, java.lang.String[] primaryColumns, java.lang.String shadowTable, java.lang.String local_pub_sub_name) throws java.sql.SQLException, RepException
- Specified by:
makePrimaryPreperedStatementin classAbstractDataBaseHandler
- Throws:
java.sql.SQLExceptionRepException
isForeignKeyException
public boolean isForeignKeyException(java.sql.SQLException ex) throws java.sql.SQLException
- Description copied from class:
AbstractDataBaseHandler - To get the foreign key error code to resolve
the Synchronization problem when tables have
parent - child relationship.
- Specified by:
isForeignKeyExceptionin classAbstractDataBaseHandler
- Returns:
- String
- Throws:
java.sql.SQLException
isPrimaryKeyException
public boolean isPrimaryKeyException(java.sql.SQLException ex) throws java.sql.SQLException
- isPrimaryKeyException
- Specified by:
isPrimaryKeyExceptionin classAbstractDataBaseHandler
- Parameters:
ex- SQLException- Returns:
- boolean
- Throws:
java.sql.SQLException
makePrimaryPreperedStatementBackwardTraversing
public java.sql.PreparedStatement makePrimaryPreperedStatementBackwardTraversing(java.lang.String[] primaryColumns, long lastId, java.lang.String local_pub_sub_name, java.lang.String shadowTable) throws java.sql.SQLException, RepException
- Specified by:
makePrimaryPreperedStatementBackwardTraversingin classAbstractDataBaseHandler
- Throws:
java.sql.SQLExceptionRepException
isSchemaSupported
public boolean isSchemaSupported()
- isSchemaSupported
- Specified by:
isSchemaSupportedin classAbstractDataBaseHandler
- Returns:
- boolean
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||


