com.konakart.app
Class DbPortabilityDB2
java.lang.Object
com.konakart.app.DbPortabilityImpl
com.konakart.app.DbPortabilityDB2
- All Implemented Interfaces:
- DbPortabilityIf
public class DbPortabilityDB2
- extends DbPortabilityImpl
- implements DbPortabilityIf
Standard rules for DB2
|
Method Summary |
java.lang.String |
standardColumnName(java.lang.String columnName)
|
java.lang.String |
standardIndexName(java.lang.String tableName,
java.lang.String columnName)
Return an index name for the table and column. |
java.lang.String |
standardSequenceName(java.lang.String tableName,
java.lang.String columnName)
|
java.lang.String |
standardTableName(java.lang.String tableName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DbPortabilityDB2
public DbPortabilityDB2()
standardColumnName
public java.lang.String standardColumnName(java.lang.String columnName)
- Specified by:
standardColumnName in interface DbPortabilityIf- Overrides:
standardColumnName in class DbPortabilityImpl
- Parameters:
columnName - the original column name.
- Returns:
- Returns the standardised column name.
standardTableName
public java.lang.String standardTableName(java.lang.String tableName)
- Specified by:
standardTableName in interface DbPortabilityIf- Overrides:
standardTableName in class DbPortabilityImpl
- Parameters:
tableName - the original table name.
- Returns:
- Returns the standardised table name.
standardSequenceName
public java.lang.String standardSequenceName(java.lang.String tableName,
java.lang.String columnName)
- Specified by:
standardSequenceName in interface DbPortabilityIf- Overrides:
standardSequenceName in class DbPortabilityImpl
- Parameters:
tableName - the original table name.columnName - the original column name.
- Returns:
- Returns the standardised sequence name.
standardIndexName
public java.lang.String standardIndexName(java.lang.String tableName,
java.lang.String columnName)
- Return an index name for the table and column. In DB these names have to be quite short - 18
characters in v7 - more in later versions. We'll keep to 18 characters here for greater
compatibility. We use a hash of the tableName to ensure we get unique index names that are
short enough! It's not 100% guaranteed to produce unique index names so some changes may be
required if we ever get a clash.
- Specified by:
standardIndexName in interface DbPortabilityIf- Overrides:
standardIndexName in class DbPortabilityImpl
- Parameters:
tableName - the original table name.columnName - the original column name.
- Returns:
- Returns the standardised index name.
Copyright © 2011 DS Data Systems UK Ltd.