net.sourceforge.jdbcimporter.engine
Class ImportEngineHelper

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.engine.ImportEngineHelper

Deprecated. Use net.sourceforge.jdbcimporter.util.JDBCHelper

public class ImportEngineHelper
extends java.lang.Object

Helper class for ImportEngines.

Version:
0.6
Author:
Chris Nagy

Field Summary
protected  JDBCParameterHelper helper
          Deprecated. The helper.
 
Constructor Summary
ImportEngineHelper()
          Deprecated.  
 
Method Summary
 boolean compareResultSet(java.sql.ResultSet rset, ImportColumnDef[] columns, int[] compareIndices, ColumnValue[] values)
          Deprecated. Compares the values in the result set with the list of column values.
 ColumnValue getColumn(java.sql.ResultSet resultSet, int column, ColumnDef def)
          Deprecated. Returns column value at the given column location.
 int[] resolveRowStates(java.sql.Connection con, ImportEntityDef entityDef, java.util.List rows, int[] keyIndices, int[] compareIndices)
          Deprecated. Resolve the states of the rows.
 void setColumn(java.sql.PreparedStatement pstmt, int column, ColumnDef def, ColumnValue val)
          Deprecated. Set the column value in the prepared statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helper

protected JDBCParameterHelper helper
Deprecated. 
The helper.

Constructor Detail

ImportEngineHelper

public ImportEngineHelper()
Deprecated. 
Method Detail

setColumn

public void setColumn(java.sql.PreparedStatement pstmt,
                      int column,
                      ColumnDef def,
                      ColumnValue val)
               throws MalformedDataException
Deprecated. 
Set the column value in the prepared statement.

Parameters:
pstmt - the prepared statement
column - the column index
def - the column definition
val - the column value
Throws:
MalformedDataException

resolveRowStates

public int[] resolveRowStates(java.sql.Connection con,
                              ImportEntityDef entityDef,
                              java.util.List rows,
                              int[] keyIndices,
                              int[] compareIndices)
Deprecated. 
Resolve the states of the rows.

Parameters:
con - the connection
entityDef - the entity definition
rows - list of rows
keyIndices - the indices of column values that make up the primary key
compareIndices - the indices of column values that should be compared
Returns:
the row states

compareResultSet

public boolean compareResultSet(java.sql.ResultSet rset,
                                ImportColumnDef[] columns,
                                int[] compareIndices,
                                ColumnValue[] values)
                         throws java.sql.SQLException
Deprecated. 
Compares the values in the result set with the list of column values.

Parameters:
rset - the result set
columns - the column definitions
compareIndices - the indices of column values that should be compared
values - the column values
Returns:
flag indicating that the rows match
Throws:
java.sql.SQLException - if an error occurred while retrieving a column value from the result set

getColumn

public ColumnValue getColumn(java.sql.ResultSet resultSet,
                             int column,
                             ColumnDef def)
                      throws java.sql.SQLException
Deprecated. 
Returns column value at the given column location.

Parameters:
resultSet - the result set
column - the column index
def - the column definition
Returns:
column value the column value
Throws:
java.sql.SQLException - if an error occurred while retrieving the column value from the result set