org.webdocwf.util.loader
Class DataTransmition

java.lang.Object
  extended byorg.webdocwf.util.loader.DataTransmition

public class DataTransmition
extends java.lang.Object

DataTransmition class is used for handling the operation with ‘restore counter table’.

Version:
1.0
Author:
Radoslav Dutina

Constructor Summary
DataTransmition(ImportDefinitionElement importDefinitionElement)
           
 
Method Summary
 java.math.BigDecimal checkDataTransmition(java.sql.Connection c, java.sql.ResultSet rset, java.lang.String jobName, int iTargetFirstColumnResult)
          This method is used for checking the restart counter table
 void createRestartCounterTable(java.sql.Connection conn)
          This method create restore counter table
 void insertCounter(java.lang.String jobName, java.math.BigDecimal bdecCount, java.sql.Connection conn)
          This method is used for inserting the appropriate values into restart counter table
 void resetRestartCounter(java.sql.Connection conn, java.lang.String jobName)
          This method is used to set '0' into counter column from counter table, if the current import job was finished successfuly
 void setLogger(Logger logger)
          This method is used to set current Looger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTransmition

public DataTransmition(ImportDefinitionElement importDefinitionElement)
Method Detail

createRestartCounterTable

public void createRestartCounterTable(java.sql.Connection conn)
                               throws LoaderException
This method create restore counter table

Parameters:
conn - defines the connection object of target database
Throws:
LoaderException

checkDataTransmition

public java.math.BigDecimal checkDataTransmition(java.sql.Connection c,
                                                 java.sql.ResultSet rset,
                                                 java.lang.String jobName,
                                                 int iTargetFirstColumnResult)
                                          throws java.sql.SQLException
This method is used for checking the restart counter table

Parameters:
c - defines the connection object to target database
rset - defines the ResultSet object of source database
jobName - defines the current import job name
iTargetFirstColumnResult - is parameter from conf file
Returns:
value of counter field from restart counter table
Throws:
java.sql.SQLException

insertCounter

public void insertCounter(java.lang.String jobName,
                          java.math.BigDecimal bdecCount,
                          java.sql.Connection conn)
                   throws java.sql.SQLException
This method is used for inserting the appropriate values into restart counter table

Parameters:
jobName - defines the current import job name
bdecCount - defines the number of rows which are commited
conn - defines the connection object to target database
Throws:
java.sql.SQLException

resetRestartCounter

public void resetRestartCounter(java.sql.Connection conn,
                                java.lang.String jobName)
                         throws java.sql.SQLException
This method is used to set '0' into counter column from counter table, if the current import job was finished successfuly

Parameters:
conn - defines the connection object of target database
jobName - defines the current import job name
Throws:
java.sql.SQLException

setLogger

public void setLogger(Logger logger)
This method is used to set current Looger

Parameters:
logger - is the currently used logger


Copyright © 2002-2007 Together - the Workgroup. All Rights Reserved.