org.webdocwf.util.loader
Class CounterColumns

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

public class CounterColumns
extends java.lang.Object

CounterColumns - insert auto increment values in target counter columns.


Constructor Summary
CounterColumns()
          Empty constructor of CounterColumns class
 
Method Summary
 void counterColumnTypes(java.lang.String tableName, java.lang.String tableID, java.sql.Connection c, int firstColumn, boolean columnsSuportedTarget, ConfigReader configReaderTarget)
          Method counterColumnTypes is used to put types of constant columns into global vector sorted in target tables.
 java.util.Vector getCounterIncrement(java.lang.String tableName, java.lang.String tableID)
          This method read value of counterIncrement parameter
 java.util.Vector getCounterName(java.lang.String tableName, java.lang.String tableID)
          This method read value of counterNames parameter
 java.lang.String getCounterNameColumn()
          This method read value of counterNameColumn parameter
 java.util.Vector getCounterStartValue(java.lang.String tableName, java.lang.String tableID)
          This method read value of counterStartValue parameter
 java.util.Vector getCounterStartValueReset(java.lang.String tableName, java.lang.String tableID)
          This method read value of counterStartValueReset parameter
 java.lang.String getCounterTableName()
          This method read value of counterTableName parameter
 java.util.Vector getCounterValue(java.lang.String tableName, java.lang.String tableID)
          This method set values for currentCounterValue parameter
 java.lang.String getCounterValueColumn()
          This method read value of counterValueColumn parameter
 java.util.Vector getSubCounterIncrement(java.lang.String tableName, java.lang.String tableID)
          This method read value of getSubCounterIncrement parameter
 java.util.Vector getSubCounterKeyColumns(java.lang.String tableName, java.lang.String tableID)
          This method read value of subCounterKeyColumns parameter
 java.util.Vector getSubCounterKeyColumnsTyp(java.lang.String tableName, java.lang.String tableID)
          This method read value of subCounterKeyColumnsTyp parameter
 java.util.Vector getSubCounterKeyValues(java.lang.String tableName, java.lang.String tableID)
          This method read value of subCounterKeyValues parameter
 java.util.Vector getSubCounterName(java.lang.String tableName, java.lang.String tableID)
          This method read value of subCounterName parameter
 java.util.Vector getSubCounterStartValue(java.lang.String tableName, java.lang.String tableID)
          This method read value of getSubCounterStartValue parameter
 java.util.Vector getSubTargetColumnName(java.lang.String tableName, java.lang.String tableID)
          This method read value of subTargetColumnName parameter
 java.util.Vector getSubTargetColumnTyp(java.lang.String tableName, java.lang.String tableID)
          This method read value of subTargetColumnTyp parameter
 java.util.Vector getSubValueMode(java.lang.String tableName, java.lang.String tableID)
          This method read value of subValueMode parameter
 java.util.Vector getTargetColumnName(java.lang.String tableName, java.lang.String tableID)
          This method read value of targetColumnName parameter
 java.util.Vector getTargetColumnTyp(java.lang.String tableName, java.lang.String tableID)
          This method read value of targetColumnTyp parameter
 java.util.Vector getValueMode(java.lang.String tableName, java.lang.String tableID)
          This method read value of valueMode parameter
 void readConstantColumnAttributes(org.w3c.dom.Document doc, int importJob)
          This method sets the value of: counterTableName, counterNameColumn and counterValueColumn parameters
 void readConstantColumnsParameters(org.w3c.dom.Document doc, int importJob)
          This method sets the value of next parameters: vecCounterName, vecCounterIncrement, vecCounterStartValue, vecTargetColumnName, vecValueMode, vecCounterStartValueReset, vecTargetTableName, vecTargetTableID, vecSubCounterName, vecSubCounterIncrement, vecSubCounterStartValue, vecSubTargetTableName, vecSubTargetTableID, vecSubTargetColumnName, vecSubValueMode and vecSubKeyColumns
 java.util.Vector readSubCounterValue(java.lang.String tableName, java.lang.String tableID, java.sql.Connection conn, int firstColumn, java.lang.String tableMode, ConfigReader targetConfigReader)
          This method read value of sub counter parameter
 void reset()
          This method reset all variables
 void resetSubCounterCache()
          This method reset cach for subcounter
 void setConstantColumnsParameters(java.lang.String tableName, java.lang.String tableID)
          This method sets the value of Constant Columns parameters
 void setCounterNameColumn(java.lang.String nameColumn)
          This method sets the value of counterNameColumn parameter
 void setCounterTableName(java.lang.String tableName)
          This method sets the value of counterTableName parameter
 void setCounterValue(java.lang.String tableName, java.lang.String tableID)
          This method set values for Counter columns
 void setCounterValueColumn(java.lang.String valueColumn)
          This method sets the value of counterValueColumn parameter
 void setLogger(Logger logger)
          This method set logger object
 void setSubCounterKeyValues(java.lang.String tableName, java.lang.String tableID, java.util.Hashtable values)
          This method set value of subCounterKeyValues parameter
 void setTargetColumnStartValues(java.lang.String tableName, java.lang.String tableID, java.sql.Connection conn, int firstColumn)
          This method set values for currentCounterValue parameter
 void updateCounter(java.sql.Connection conn)
          This method check the update operation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CounterColumns

public CounterColumns()
Empty constructor of CounterColumns class

Method Detail

setLogger

public void setLogger(Logger logger)
This method set logger object


getCounterTableName

public java.lang.String getCounterTableName()
This method read value of counterTableName parameter

Returns:
string name of counter table

getCounterValueColumn

public java.lang.String getCounterValueColumn()
This method read value of counterValueColumn parameter

Returns:
String name of column in counter table with current values of each counter

getCounterNameColumn

public java.lang.String getCounterNameColumn()
This method read value of counterNameColumn parameter

Returns:
String name of column in counter table with counter names.

setCounterNameColumn

public void setCounterNameColumn(java.lang.String nameColumn)
This method sets the value of counterNameColumn parameter

Parameters:
nameColumn - is name of the column

setCounterValueColumn

public void setCounterValueColumn(java.lang.String valueColumn)
This method sets the value of counterValueColumn parameter

Parameters:
valueColumn - is value of the column

setCounterTableName

public void setCounterTableName(java.lang.String tableName)
This method sets the value of counterTableName parameter

Parameters:
tableName - is table name

readConstantColumnAttributes

public void readConstantColumnAttributes(org.w3c.dom.Document doc,
                                         int importJob)
This method sets the value of: counterTableName, counterNameColumn and counterValueColumn parameters

Parameters:
doc - represents Object document
importJob - represents current import job

readConstantColumnsParameters

public void readConstantColumnsParameters(org.w3c.dom.Document doc,
                                          int importJob)
This method sets the value of next parameters: vecCounterName, vecCounterIncrement, vecCounterStartValue, vecTargetColumnName, vecValueMode, vecCounterStartValueReset, vecTargetTableName, vecTargetTableID, vecSubCounterName, vecSubCounterIncrement, vecSubCounterStartValue, vecSubTargetTableName, vecSubTargetTableID, vecSubTargetColumnName, vecSubValueMode and vecSubKeyColumns

Parameters:
doc - represents Object document
importJob - represents current import job

setConstantColumnsParameters

public void setConstantColumnsParameters(java.lang.String tableName,
                                         java.lang.String tableID)
This method sets the value of Constant Columns parameters

Parameters:
tableName - is table name
tableID - is table ID

getCounterName

public java.util.Vector getCounterName(java.lang.String tableName,
                                       java.lang.String tableID)
This method read value of counterNames parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getCounterIncrement

public java.util.Vector getCounterIncrement(java.lang.String tableName,
                                            java.lang.String tableID)
This method read value of counterIncrement parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
Vector of increment values for all counter columns in table tableName.

getCounterStartValue

public java.util.Vector getCounterStartValue(java.lang.String tableName,
                                             java.lang.String tableID)
This method read value of counterStartValue parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
Vector of start values for all counter columns in table tableName.

getTargetColumnName

public java.util.Vector getTargetColumnName(java.lang.String tableName,
                                            java.lang.String tableID)
This method read value of targetColumnName parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
Vector of counter column names for all counter columns in table tableName.

getTargetColumnTyp

public java.util.Vector getTargetColumnTyp(java.lang.String tableName,
                                           java.lang.String tableID)
This method read value of targetColumnTyp parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
Vector of counter column types for all counter columns in table tableName.

getValueMode

public java.util.Vector getValueMode(java.lang.String tableName,
                                     java.lang.String tableID)
This method read value of valueMode parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getCounterStartValueReset

public java.util.Vector getCounterStartValueReset(java.lang.String tableName,
                                                  java.lang.String tableID)
This method read value of counterStartValueReset parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getSubCounterName

public java.util.Vector getSubCounterName(java.lang.String tableName,
                                          java.lang.String tableID)
This method read value of subCounterName parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getSubCounterIncrement

public java.util.Vector getSubCounterIncrement(java.lang.String tableName,
                                               java.lang.String tableID)
This method read value of getSubCounterIncrement parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getSubCounterStartValue

public java.util.Vector getSubCounterStartValue(java.lang.String tableName,
                                                java.lang.String tableID)
This method read value of getSubCounterStartValue parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getSubTargetColumnName

public java.util.Vector getSubTargetColumnName(java.lang.String tableName,
                                               java.lang.String tableID)
This method read value of subTargetColumnName parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getSubTargetColumnTyp

public java.util.Vector getSubTargetColumnTyp(java.lang.String tableName,
                                              java.lang.String tableID)
This method read value of subTargetColumnTyp parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getSubValueMode

public java.util.Vector getSubValueMode(java.lang.String tableName,
                                        java.lang.String tableID)
This method read value of subValueMode parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getSubCounterKeyColumns

public java.util.Vector getSubCounterKeyColumns(java.lang.String tableName,
                                                java.lang.String tableID)
This method read value of subCounterKeyColumns parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getSubCounterKeyColumnsTyp

public java.util.Vector getSubCounterKeyColumnsTyp(java.lang.String tableName,
                                                   java.lang.String tableID)
This method read value of subCounterKeyColumnsTyp parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

getSubCounterKeyValues

public java.util.Vector getSubCounterKeyValues(java.lang.String tableName,
                                               java.lang.String tableID)
This method read value of subCounterKeyValues parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
vector

setSubCounterKeyValues

public void setSubCounterKeyValues(java.lang.String tableName,
                                   java.lang.String tableID,
                                   java.util.Hashtable values)
This method set value of subCounterKeyValues parameter

Parameters:
tableName - defines table name
tableID - defines table ID
values - is hashtable new key values

setCounterValue

public void setCounterValue(java.lang.String tableName,
                            java.lang.String tableID)
This method set values for Counter columns

Parameters:
tableName - is table name
tableID - is table ID

getCounterValue

public java.util.Vector getCounterValue(java.lang.String tableName,
                                        java.lang.String tableID)
This method set values for currentCounterValue parameter

Parameters:
tableName - is table name
tableID - is table ID
Returns:
Vector of current counter values for table - tableName

setTargetColumnStartValues

public void setTargetColumnStartValues(java.lang.String tableName,
                                       java.lang.String tableID,
                                       java.sql.Connection conn,
                                       int firstColumn)
                                throws java.sql.SQLException
This method set values for currentCounterValue parameter

Parameters:
tableName - is table name
tableID - is table ID
conn - is connection to target database
firstColumn - is first column
Throws:
java.sql.SQLException

updateCounter

public void updateCounter(java.sql.Connection conn)
                   throws java.sql.SQLException
This method check the update operation

Parameters:
conn - is connection
Throws:
java.sql.SQLException

readSubCounterValue

public java.util.Vector readSubCounterValue(java.lang.String tableName,
                                            java.lang.String tableID,
                                            java.sql.Connection conn,
                                            int firstColumn,
                                            java.lang.String tableMode,
                                            ConfigReader targetConfigReader)
                                     throws java.sql.SQLException,
                                            LoaderException
This method read value of sub counter parameter

Parameters:
tableName - is table name
tableID - is table ID
conn - is connection
firstColumn - is first column
Returns:
vector
Throws:
java.sql.SQLException
LoaderException

resetSubCounterCache

public void resetSubCounterCache()
This method reset cach for subcounter


counterColumnTypes

public void counterColumnTypes(java.lang.String tableName,
                               java.lang.String tableID,
                               java.sql.Connection c,
                               int firstColumn,
                               boolean columnsSuportedTarget,
                               ConfigReader configReaderTarget)
                        throws java.sql.SQLException,
                               java.lang.NullPointerException
Method counterColumnTypes is used to put types of constant columns into global vector sorted in target tables. If there is an error, Exception "SQLException" or "NullPointerException" is thrown.

Parameters:
c - Connection to target database.
tableName - is table name
tableID - is table ID
firstColumn - is first column
Throws:
java.sql.SQLException - Constructs an SQLException object with a reason.
java.lang.NullPointerException - Constructs a NullPointerException with the specified detail message.

reset

public void reset()
This method reset all variables



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