com.mizar.persistence.jdbc.convert
Class JdbcOracleToOtherRDBMS

java.lang.Object
  extended by com.mizar.persistence.jdbc.convert.JdbcOracleToOtherRDBMS
Direct Known Subclasses:
JdbcOracleToPostgres, JdbcOracleToSqlite

public abstract class JdbcOracleToOtherRDBMS
extends java.lang.Object


Field Summary
protected  java.util.Map<java.lang.String,java.util.Map<java.lang.String,ColumnMetaData>> oraColumnMetaData
           
protected  java.sql.Connection oraConn
           
protected  java.util.Map<java.lang.String,TableMetaData> oraTableMetaData
           
protected  java.lang.String oraUrl
           
protected  java.lang.String oraUser
           
protected  java.util.Map<java.lang.String,java.util.Map<java.lang.String,ColumnMetaData>> targetColumnMetaData
           
protected  java.sql.Connection targetConn
           
protected  java.util.Map<java.lang.String,TableMetaData> targetTableMetaData
           
protected  java.lang.String targetTablespaceName
           
protected  java.lang.String targetUrl
           
protected  java.lang.String targetUser
           
protected  boolean targetUsesLowerCaseMetadata
           
protected  boolean targetUsesMetadata
           
protected  boolean verbose
           
 
Constructor Summary
JdbcOracleToOtherRDBMS()
           
 
Method Summary
 void close()
           
 int copyTable(java.lang.String tableName)
           
 boolean createTargetTableLike(java.lang.String oraTableName)
           
 java.sql.ResultSet findAll(java.sql.Connection conn, java.lang.String tableName)
           
 int getCount(java.sql.Connection conn, java.lang.String tableName)
           
abstract  org.apache.commons.logging.Log getLogger()
           
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,ColumnMetaData>> getOraColumnMetaData()
           
 java.sql.Connection getOraConn()
           
 java.util.Map<java.lang.String,TableMetaData> getOraTableMetaData()
           
 java.lang.String getOraUrl()
           
 java.lang.String getOraUser()
           
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,ColumnMetaData>> getTargetColumnMetaData()
           
 java.sql.Connection getTargetConn()
           
 java.util.Map<java.lang.String,TableMetaData> getTargetTableMetaData()
           
 java.lang.String getTargetTablespaceName()
           
 java.lang.String getTargetUrl()
           
 java.lang.String getTargetUser()
           
 boolean isTargetUsesLowerCaseMetadata()
           
 boolean isTargetUsesMetadata()
           
 boolean isVerbose()
           
 java.sql.Connection oracleConnect(java.lang.String url, java.lang.String username, java.lang.String password)
           
 void setOraConn(java.sql.Connection oraConn)
           
 void setOraUrl(java.lang.String oraUrl)
           
 void setOraUser(java.lang.String oraUser)
           
 void setTargetConn(java.sql.Connection targetConn)
           
 void setTargetTablespaceName(java.lang.String targetTablespaceName)
           
 void setTargetUrl(java.lang.String posUrl)
           
 void setTargetUser(java.lang.String posUser)
           
 void setTargetUsesLowerCaseMetadata(boolean targetUsersLowerCaseMetadata)
           
 void setTargetUsesMetadata(boolean targetUsesMetadata)
           
 void setVerbose(boolean verbose)
           
abstract  java.sql.Connection targetConnect(java.lang.String url, java.lang.String username, java.lang.String password)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oraConn

protected java.sql.Connection oraConn

oraUrl

protected java.lang.String oraUrl

oraUser

protected java.lang.String oraUser

targetConn

protected java.sql.Connection targetConn

targetUrl

protected java.lang.String targetUrl

targetUser

protected java.lang.String targetUser

targetTablespaceName

protected java.lang.String targetTablespaceName

targetUsesLowerCaseMetadata

protected boolean targetUsesLowerCaseMetadata

targetUsesMetadata

protected boolean targetUsesMetadata

verbose

protected boolean verbose

oraTableMetaData

protected java.util.Map<java.lang.String,TableMetaData> oraTableMetaData

oraColumnMetaData

protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,ColumnMetaData>> oraColumnMetaData

targetTableMetaData

protected java.util.Map<java.lang.String,TableMetaData> targetTableMetaData

targetColumnMetaData

protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,ColumnMetaData>> targetColumnMetaData
Constructor Detail

JdbcOracleToOtherRDBMS

public JdbcOracleToOtherRDBMS()
Method Detail

getLogger

public abstract org.apache.commons.logging.Log getLogger()

targetConnect

public abstract java.sql.Connection targetConnect(java.lang.String url,
                                                  java.lang.String username,
                                                  java.lang.String password)
                                           throws java.sql.SQLException,
                                                  java.lang.ClassNotFoundException
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

oracleConnect

public java.sql.Connection oracleConnect(java.lang.String url,
                                         java.lang.String username,
                                         java.lang.String password)
                                  throws java.sql.SQLException,
                                         java.lang.ClassNotFoundException
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

createTargetTableLike

public boolean createTargetTableLike(java.lang.String oraTableName)
                              throws java.sql.SQLException
Throws:
java.sql.SQLException

copyTable

public int copyTable(java.lang.String tableName)
              throws java.sql.SQLException
Throws:
java.sql.SQLException

findAll

public java.sql.ResultSet findAll(java.sql.Connection conn,
                                  java.lang.String tableName)
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

getOraTableMetaData

public java.util.Map<java.lang.String,TableMetaData> getOraTableMetaData()
                                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

getTargetTableMetaData

public java.util.Map<java.lang.String,TableMetaData> getTargetTableMetaData()
                                                                     throws java.sql.SQLException
Throws:
java.sql.SQLException

getOraColumnMetaData

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,ColumnMetaData>> getOraColumnMetaData()
                                                                                                    throws java.sql.SQLException
Throws:
java.sql.SQLException

getTargetColumnMetaData

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,ColumnMetaData>> getTargetColumnMetaData()
                                                                                                       throws java.sql.SQLException
Throws:
java.sql.SQLException

getCount

public int getCount(java.sql.Connection conn,
                    java.lang.String tableName)
             throws java.sql.SQLException
Throws:
java.sql.SQLException

close

public void close()

setOraConn

public void setOraConn(java.sql.Connection oraConn)

getOraConn

public java.sql.Connection getOraConn()

setOraUrl

public void setOraUrl(java.lang.String oraUrl)

getOraUrl

public java.lang.String getOraUrl()

setOraUser

public void setOraUser(java.lang.String oraUser)

getOraUser

public java.lang.String getOraUser()

setTargetConn

public void setTargetConn(java.sql.Connection targetConn)

getTargetConn

public java.sql.Connection getTargetConn()

setTargetUrl

public void setTargetUrl(java.lang.String posUrl)

getTargetUrl

public java.lang.String getTargetUrl()

setTargetUser

public void setTargetUser(java.lang.String posUser)

getTargetUser

public java.lang.String getTargetUser()

setTargetTablespaceName

public void setTargetTablespaceName(java.lang.String targetTablespaceName)

getTargetTablespaceName

public java.lang.String getTargetTablespaceName()

setVerbose

public void setVerbose(boolean verbose)

isVerbose

public boolean isVerbose()

setTargetUsesLowerCaseMetadata

public void setTargetUsesLowerCaseMetadata(boolean targetUsersLowerCaseMetadata)

isTargetUsesLowerCaseMetadata

public boolean isTargetUsesLowerCaseMetadata()

setTargetUsesMetadata

public void setTargetUsesMetadata(boolean targetUsesMetadata)

isTargetUsesMetadata

public boolean isTargetUsesMetadata()