org.openi.jdbc
Class ResultAdapter

java.lang.Object
  extended by org.openi.jdbc.ResultAdapter

public class ResultAdapter
extends java.lang.Object


Constructor Summary
ResultAdapter(java.sql.Connection conn)
           
 
Method Summary
static java.util.List adaptResultset(java.sql.ResultSet results)
           
 void cleanupConnection()
           
 java.util.Map executeSegmentQuery(java.util.List bucketList, java.lang.String targetTable, java.lang.String targetColumn)
           
 java.util.List fetchColumnData(java.lang.String targetTable, java.lang.String targetColumn, float samplePercent)
           
 java.util.List fetchColumnData(java.lang.String targetTable, java.lang.String targetColumn, int sampleSize)
           
 java.util.Map fetchMinMax(java.lang.String targetTable, java.lang.String targetColumn)
           
 int fetchRowCount(java.lang.String targetTable)
           
 java.sql.Connection getConnection()
           
 java.util.List getDbColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tablePattern, java.lang.String columnPattern)
           
 SqlProvider getSqlProvider()
           
 java.util.List getTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tablePattern, java.lang.String[] types)
           
 void setConnection(java.sql.Connection conn)
           
 void setSqlProvider(SqlProvider sqlProvider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultAdapter

public ResultAdapter(java.sql.Connection conn)
Method Detail

getTables

public java.util.List getTables(java.lang.String catalog,
                                java.lang.String schemaPattern,
                                java.lang.String tablePattern,
                                java.lang.String[] types)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

getDbColumns

public java.util.List getDbColumns(java.lang.String catalog,
                                   java.lang.String schemaPattern,
                                   java.lang.String tablePattern,
                                   java.lang.String columnPattern)
                            throws java.lang.ClassNotFoundException,
                                   java.sql.SQLException
Throws:
java.lang.ClassNotFoundException
java.sql.SQLException

cleanupConnection

public void cleanupConnection()

adaptResultset

public static java.util.List adaptResultset(java.sql.ResultSet results)
                                     throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchColumnData

public java.util.List fetchColumnData(java.lang.String targetTable,
                                      java.lang.String targetColumn,
                                      float samplePercent)
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchColumnData

public java.util.List fetchColumnData(java.lang.String targetTable,
                                      java.lang.String targetColumn,
                                      int sampleSize)
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchRowCount

public int fetchRowCount(java.lang.String targetTable)
                  throws java.sql.SQLException
Throws:
java.sql.SQLException

executeSegmentQuery

public java.util.Map executeSegmentQuery(java.util.List bucketList,
                                         java.lang.String targetTable,
                                         java.lang.String targetColumn)
                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchMinMax

public java.util.Map fetchMinMax(java.lang.String targetTable,
                                 java.lang.String targetColumn)
                          throws java.sql.SQLException
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection()

setConnection

public void setConnection(java.sql.Connection conn)

getSqlProvider

public SqlProvider getSqlProvider()

setSqlProvider

public void setSqlProvider(SqlProvider sqlProvider)