com.konakart.app
Class DbPortabilityImpl

java.lang.Object
  extended by com.konakart.app.DbPortabilityImpl
All Implemented Interfaces:
DbPortabilityIf
Direct Known Subclasses:
DbPortabilityDB2, DbPortabilityMSSql, DbPortabilityOracle, DbPortabilityPostgreSql

public class DbPortabilityImpl
extends java.lang.Object
implements DbPortabilityIf

Superclass for DBPortability implementations


Constructor Summary
DbPortabilityImpl()
           
 
Method Summary
protected  long DJBHash(java.lang.String str)
          A hashing function produced by Professor Daniel J.
 java.lang.String standardColumnName(java.lang.String columnName)
           
 java.lang.String standardIndexName(java.lang.String tableName, java.lang.String columnName)
           
 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
 

Constructor Detail

DbPortabilityImpl

public DbPortabilityImpl()
Method Detail

standardColumnName

public java.lang.String standardColumnName(java.lang.String columnName)
Specified by:
standardColumnName in interface DbPortabilityIf
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
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
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)
Specified by:
standardIndexName in interface DbPortabilityIf
Parameters:
tableName - the original table name.
columnName - the original column name.
Returns:
Returns the standardised index name.

DJBHash

protected long DJBHash(java.lang.String str)
A hashing function produced by Professor Daniel J. Bernstein and shown first to the world on the usenet newsgroup comp.lang.c. It is one of the most efficient hash functions ever published.

Parameters:
str - String to hash
Returns:
a long representing the hash value of the input String


Copyright © 2011 DS Data Systems UK Ltd.