Java Doc for Loader.java in  » Database-JDBC-Connection-Pool » octopus » org » webdocwf » util » loader » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » octopus » org.webdocwf.util.loader 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.webdocwf.util.loader.Loader

Loader
public class Loader (Code)

Loader class loads data from source database into target database using criteria set in XML file which is used as parameter. Also Loader can execute SQL statements which import from XML file.
All loading rolls are set in XML file. Some capabilities of this loader are: there could be more then one importDefinition and number of them is not limited, source and target database could be different, source database could be ASCII,Excel or Access file too, operator (the person or application which starts Loader) have to define. Restart mode with second parameter (optional).

There are two possible ways to start Loader. The first is as stand alone application, the sintaxs is:
java org.webdocwf.util.loader.Loader [-options] urlOfTheXmlFile.xml
urlOfTheXmlFile.xml is URL of the XML file with loading criteria,

The second way is to start Loader as package, the sintax is:
public Loader(String loadJobFileName, String mode, String userID, String logDirName, String logFileName, boolean restartIndicator, Map variableValues, String vendorFileName, boolean onErrorContinue, String additionalPaths, int commitCount, int returnCode);
ldr.load();

If we want to execute Loader class without last for parameters, we must put null as these arguments

When the Loader is started the log file is generated. Log file is txt file and its name defines date and time when the Loader is started. There are three Log modes: none - report only begining and finishing the application, and exceptions if there are any, normal - add to log importing blocks and full - with detailed report to operator.

Another big adventage of Loader is its possibility to execute any SQL statements in target database. (creating database; creating, modifying and deleting tables...)

XML file is the key part for loading criteria. XML tags define how the loading job will be done.


author:
   Milosevic Sinisa
author:
   Radoslav Dutina
author:
   Zoran Milakovic


Field Summary
 VectorImportDefinitionSourceColumnName
    
 VectorImportDefinitionTargetColumnName
    
final public static  StringLOGMODE_FULL
    
final public static  StringLOGMODE_NONE
    
final public static  StringLOGMODE_NORMAL
    
 HashtableallSourceColumnNameNoMap
    
 HashtableallSourceColumnTypeNoMap
    
 HashtableallSourceColumnValueNoMap
    
 booleanbOnErrorContinue
    
 booleanbReplaceInData
    
 booleanbRestartIndicator
    
 BigDecimalbdecOidNumber
    
 BigDecimalbdecOidNumber2000
    
 CheckRowCachecheckRowCache
    
 StringconfJarStructure
    
 DataTransmitiondataTransmition
    
 ByteArrayOutputStreamfoStreamTmp
    
 booleanhasRestartCounter
    
 booleanhasUserID
    
 intiColumnsInSourceTable
    
 intiConstantColumns
    
 intiFirstColumnResult
    
 intiRelationColumns
    
 intiTables
    
 intiTargetFirstColumnResult
    
 intiValueColumns
    
 HashtableindexConstantDValue
    
 HashtableindexDConstantNull
    
 HashtableindexDConstantOver
    
 HashtableindexDOverwrite
    
 HashtableindexDRelationValue
    
 HashtableindexDSetNull
    
 HashtableindexDTransformationNull
    
 HashtableindexDTransformationOver
    
 HashtableindexDTransformationUpdate
    
 HashtableindexDTransformationValue
    
 HashtableindexDValue
    
 HashtableindexDVariableValue
    
 HashtableindexIsNotRelationsColumns
    
 booleanisDefaultJdbc
    
 ArrayListlogModes
    
 MapmapVariableValues
    
 HashtablepstmtColumnNames
    
 HashtablepstmtForInsert
    
 VectorpstmtKeys
    
 QueryConstantSetqueryConstantSet
    
 HashtablequeryInsertRow
    
 HashtablequeryStatement
    
 QueryTransformationSetqueryTransformationSet
    
 QueryWhereSetqueryWhereSet
    
 RelationsCacherelationsCache
    
 HashtableresultVector
    
 StringstrAdditionalPaths
    
 StringstrLoaderJobFileName
    
 StringstrLogDirName
    
 StringstrLogFileName
    
 StringstrSourceDriverName
    
 StringstrTargetDriverName
    
 StringstrUserID
    
 StringstrVendorFileName
    
 VectortransformationValues
    
 HashtableupdateConstantStatement
    
 HashtableupdateStatement
    
 HashtableupdateTransformationStatement
    
 booleanuserIDExists
    
 VectorvecBlobVector
    
 VectorvecCTAutoMapp
    
 VectorvecCTDefaultMode
    
 VectorvecConstantColumnTargetTableID
    
 VectorvecConstantColumnTargetTableName
    
 VectorvecConstantColumnType
    
 VectorvecConstantConstantValue
    
 VectorvecConstantTargetColumnName
    
 VectorvecConstantValueMode
    
 VectorvecDefaultRelationValue
    
 VectorvecDefaultValue
    
 VectorvecDefaultVariableName
    
 VectorvecDefaultVariableValue
    
 VectorvecFromHex
    
 VectorvecRelationColumnRelationMode
    
 VectorvecRelationColumnSourceColumnName
    
 VectorvecRelationColumnSourceTableID
    
 VectorvecRelationColumnSourceTableName
    
 VectorvecRelationColumnTargetColumnName
    
 VectorvecRelationColumnTargetTableID
    
 VectorvecRelationColumnTargetTableName
    
 VectorvecRelationKeyColumns
    
 VectorvecRelationKeyTypes
    
 VectorvecRelationSourceType
    
 VectorvecRelationSourceValue
    
 VectorvecReplaceInConstants
    
 VectorvecReplaceInData
    
 VectorvecReplaceInJDBC
    
 VectorvecReplaceInSQL
    
 VectorvecSortValues
    
 VectorvecSourceColumnName
    
 VectorvecSqlStmt
    
 VectorvecTableInsert
    
 VectorvecTableOidLogic
    
 VectorvecTableTableID
    
 VectorvecTableTableMode
    
 VectorvecTableTableName
    
 VectorvecTargetColumnName
    
 VectorvecTargetColumnType
    
 VectorvecTargetColumnValue
    
 VectorvecTargetKeyColumnName
    
 VectorvecTempUserID
    
 VectorvecToHex
    
 VectorvecValueColumnsTargetTables
    
 VectorvecValueMode
    
 VectorvecVariableColumnName
    
 VectorvecVariableColumnTargetColumnName
    
 VectorvecVariableColumnTargetTableID
    
 VectorvecVariableColumnTargetTableName
    
 VectorvecVariableColumnTypes
    
 VectorvecVariableColumnValueMode
    
 VectorvecVariableName
    
 VectorvecVariableOverride
    
 VectorvecVariablePrefix
    
 VectorvecVariableSufix
    
 VectorvecVariableTimesColumnName
    
 VectorvecVariableTimesTableID
    
 VectorvecVariableTimesTableName
    
 VectorvecVariableTimesValueMode
    
 VectorvecVariableUseIDColumnName
    
 VectorvecVariableUseIDTableID
    
 VectorvecVariableUseIDTableName
    
 VectorvecVariableUseIDValueMode
    
 VectorvecVariableValue
    

Constructor Summary
public  Loader(String loadJobFileName, String mode, String userID, String logDirName, String logFileName, boolean restartIndicator, Map variableValues, String vendorFileName, boolean onErrorContinue, String additionalPaths, int commitCount, int returnCode, String[] includeTables, String confJarStructure)
     Construct object Loader with an associated parameters.
Parameters:
  loadJobFileName - defines xml input file.
Parameters:
  mode - defines the default logmode.
public  Loader(String loadJobFileName, String mode, String userID, String logDirName, String logFileName, boolean restartIndicator, Map variableValues, String vendorFileName, boolean onErrorContinue, String additionalPaths, int commitCount, int returnCode)
     Construct object Loader with an associated parameters.
Parameters:
  loadJobFileName - defines xml input file.
Parameters:
  mode - defines the default logmode.
public  Loader(String loadJobFileName, String mode, String userID, String logDirName, String logFileName, boolean restartIndicator, Map variableValues, String vendorFileName, boolean onErrorContinue, String additionalPaths, int commitCount, int returnCode, String[] includeTables)
     Construct object Loader with an associated parameters.
Parameters:
  loadJobFileName - defines xml input file.
Parameters:
  mode - defines the default logmode.
public  Loader(String loadJobFileName, String mode, String userID, String logDirName, String logFileName, boolean restartIndicator, Map variableValues, String vendorFileName, boolean onErrorContinue, String additionalPaths, int commitCount, int returnCode, String confJarStructure)
     Construct object Loader with an associated parameters.
Parameters:
  loadJobFileName - defines xml input file.
Parameters:
  mode - defines the default logmode.
public  Loader(String loadJobFileName)
     Public constructor of Loader class.
public  Loader(String loadJobFileName, String confJarStructure)
     Public constructor of Loader class.

Method Summary
public  StringgetAdditionalPaths()
     Read value of additionalPaths attribute.
public  intgetCommitCount()
     Read value of commitCount attribute.
public  StringgetConfJarStructure()
    
protected  java.util.DategetDateFromString(String date)
    
public  StringgetDefaultLogMode()
    
public  intgetDefaultReturnCode()
     Read value of default error return code attribute.
public  String[]getIncludedJobs()
    
public  StringgetLoadJobFileName()
     Read value of loadJobFileName attribute.
public  StringgetLogDirName()
    
public  StringgetLogFileName()
     Read value of logFileName attribute.
public  booleangetOnErrorContinue()
     read value of onErrorContinue attribute.
public  booleangetRestartIndicator()
     Read value of restartIndicator attribute.
protected  StringgetSQLRelationString(ResultSet rs)
    
public  StringgetUserID()
     Read value of userID attribute.
public  MapgetVariableValues()
     Read value of variableValues attribute.
public  StringgetVendorFileName()
     Read value of vendorFileName.
public  StringinputToString()
    
public  voidload()
     Method load is main method in class Loader.
public static  voidmain(String argv)
     Main method Loader with an associated XML, restart mode (optional) i user (optional).
public  voidparseInputData(Object readValueObject, Vector vecVektor, ResultSet rsetSource, int i, String columnName, int blobCount, boolean isMicrosoftDriver, Hashtable columnValuesMicrosoft, Hashtable sourceColumnTypes)
    
static  voidprintUsage()
    
public  voidsetAdditionalPaths(String additionalPaths)
     This method sets value of additionalPaths attribute.
 VectorsetAfter(Vector vecOrder, int iIndexCurrent, int iIndexTarget)
     Method setAfter changes order of vecOrder's elements.
public  voidsetCommitCount(int commitCount)
     This method sets value of commitCount attribute.
public  voidsetDefaultReturnCode(int code)
     This method sets value of default error return code attribute.
public  voidsetIncludedJobs(String include_Tables)
    
public  voidsetLoadJobFileName(String loadJobFileName)
     This method sets value of loadJobFileName attribute.
public  voidsetLogDirName(String logDirName)
     This method sets value of logDirName attribute.
public  voidsetLogFileName(String logFileName)
     This method sets value of logFileName attribute.
public  voidsetOnErrorContinue(boolean onErrorContinue)
     This method sets value of onErrorContinue attribute.
public  voidsetRestartIndicator(boolean restartIndicator)
     This method sets value of restartIndicator attribute.
public  voidsetUserID(String userID)
     This method sets value of userID attribute.
protected  voidsetValueOnStatement(String value, int javaTypeInt, int i, PreparedStatement pstmt)
    
public  voidsetVariableValues(Map variableValue)
     This method sets value of variableValues attribute.
public  voidsetVendorFileName(String vendorFileName)
     This method sets value of vendorFileName attribute.

Field Detail
ImportDefinitionSourceColumnName
Vector ImportDefinitionSourceColumnName(Code)



ImportDefinitionTargetColumnName
Vector ImportDefinitionTargetColumnName(Code)



LOGMODE_FULL
final public static String LOGMODE_FULL(Code)



LOGMODE_NONE
final public static String LOGMODE_NONE(Code)



LOGMODE_NORMAL
final public static String LOGMODE_NORMAL(Code)



allSourceColumnNameNoMap
Hashtable allSourceColumnNameNoMap(Code)



allSourceColumnTypeNoMap
Hashtable allSourceColumnTypeNoMap(Code)



allSourceColumnValueNoMap
Hashtable allSourceColumnValueNoMap(Code)



bOnErrorContinue
boolean bOnErrorContinue(Code)



bReplaceInData
boolean bReplaceInData(Code)



bRestartIndicator
boolean bRestartIndicator(Code)



bdecOidNumber
BigDecimal bdecOidNumber(Code)



bdecOidNumber2000
BigDecimal bdecOidNumber2000(Code)



checkRowCache
CheckRowCache checkRowCache(Code)



confJarStructure
String confJarStructure(Code)



dataTransmition
DataTransmition dataTransmition(Code)



foStreamTmp
ByteArrayOutputStream foStreamTmp(Code)



hasRestartCounter
boolean hasRestartCounter(Code)



hasUserID
boolean hasUserID(Code)



iColumnsInSourceTable
int iColumnsInSourceTable(Code)



iConstantColumns
int iConstantColumns(Code)



iFirstColumnResult
int iFirstColumnResult(Code)



iRelationColumns
int iRelationColumns(Code)



iTables
int iTables(Code)



iTargetFirstColumnResult
int iTargetFirstColumnResult(Code)



iValueColumns
int iValueColumns(Code)



indexConstantDValue
Hashtable indexConstantDValue(Code)



indexDConstantNull
Hashtable indexDConstantNull(Code)



indexDConstantOver
Hashtable indexDConstantOver(Code)



indexDOverwrite
Hashtable indexDOverwrite(Code)



indexDRelationValue
Hashtable indexDRelationValue(Code)



indexDSetNull
Hashtable indexDSetNull(Code)



indexDTransformationNull
Hashtable indexDTransformationNull(Code)



indexDTransformationOver
Hashtable indexDTransformationOver(Code)



indexDTransformationUpdate
Hashtable indexDTransformationUpdate(Code)



indexDTransformationValue
Hashtable indexDTransformationValue(Code)



indexDValue
Hashtable indexDValue(Code)



indexDVariableValue
Hashtable indexDVariableValue(Code)



indexIsNotRelationsColumns
Hashtable indexIsNotRelationsColumns(Code)



isDefaultJdbc
boolean isDefaultJdbc(Code)



logModes
ArrayList logModes(Code)



mapVariableValues
Map mapVariableValues(Code)



pstmtColumnNames
Hashtable pstmtColumnNames(Code)



pstmtForInsert
Hashtable pstmtForInsert(Code)



pstmtKeys
Vector pstmtKeys(Code)



queryConstantSet
QueryConstantSet queryConstantSet(Code)



queryInsertRow
Hashtable queryInsertRow(Code)



queryStatement
Hashtable queryStatement(Code)



queryTransformationSet
QueryTransformationSet queryTransformationSet(Code)



queryWhereSet
QueryWhereSet queryWhereSet(Code)



relationsCache
RelationsCache relationsCache(Code)



resultVector
Hashtable resultVector(Code)



strAdditionalPaths
String strAdditionalPaths(Code)



strLoaderJobFileName
String strLoaderJobFileName(Code)



strLogDirName
String strLogDirName(Code)



strLogFileName
String strLogFileName(Code)



strSourceDriverName
String strSourceDriverName(Code)



strTargetDriverName
String strTargetDriverName(Code)



strUserID
String strUserID(Code)



strVendorFileName
String strVendorFileName(Code)



transformationValues
Vector transformationValues(Code)



updateConstantStatement
Hashtable updateConstantStatement(Code)



updateStatement
Hashtable updateStatement(Code)



updateTransformationStatement
Hashtable updateTransformationStatement(Code)



userIDExists
boolean userIDExists(Code)



vecBlobVector
Vector vecBlobVector(Code)



vecCTAutoMapp
Vector vecCTAutoMapp(Code)



vecCTDefaultMode
Vector vecCTDefaultMode(Code)



vecConstantColumnTargetTableID
Vector vecConstantColumnTargetTableID(Code)



vecConstantColumnTargetTableName
Vector vecConstantColumnTargetTableName(Code)



vecConstantColumnType
Vector vecConstantColumnType(Code)



vecConstantConstantValue
Vector vecConstantConstantValue(Code)



vecConstantTargetColumnName
Vector vecConstantTargetColumnName(Code)



vecConstantValueMode
Vector vecConstantValueMode(Code)



vecDefaultRelationValue
Vector vecDefaultRelationValue(Code)



vecDefaultValue
Vector vecDefaultValue(Code)



vecDefaultVariableName
Vector vecDefaultVariableName(Code)



vecDefaultVariableValue
Vector vecDefaultVariableValue(Code)



vecFromHex
Vector vecFromHex(Code)



vecRelationColumnRelationMode
Vector vecRelationColumnRelationMode(Code)



vecRelationColumnSourceColumnName
Vector vecRelationColumnSourceColumnName(Code)



vecRelationColumnSourceTableID
Vector vecRelationColumnSourceTableID(Code)



vecRelationColumnSourceTableName
Vector vecRelationColumnSourceTableName(Code)



vecRelationColumnTargetColumnName
Vector vecRelationColumnTargetColumnName(Code)



vecRelationColumnTargetTableID
Vector vecRelationColumnTargetTableID(Code)



vecRelationColumnTargetTableName
Vector vecRelationColumnTargetTableName(Code)



vecRelationKeyColumns
Vector vecRelationKeyColumns(Code)



vecRelationKeyTypes
Vector vecRelationKeyTypes(Code)



vecRelationSourceType
Vector vecRelationSourceType(Code)



vecRelationSourceValue
Vector vecRelationSourceValue(Code)



vecReplaceInConstants
Vector vecReplaceInConstants(Code)



vecReplaceInData
Vector vecReplaceInData(Code)



vecReplaceInJDBC
Vector vecReplaceInJDBC(Code)



vecReplaceInSQL
Vector vecReplaceInSQL(Code)



vecSortValues
Vector vecSortValues(Code)



vecSourceColumnName
Vector vecSourceColumnName(Code)



vecSqlStmt
Vector vecSqlStmt(Code)



vecTableInsert
Vector vecTableInsert(Code)



vecTableOidLogic
Vector vecTableOidLogic(Code)



vecTableTableID
Vector vecTableTableID(Code)



vecTableTableMode
Vector vecTableTableMode(Code)



vecTableTableName
Vector vecTableTableName(Code)



vecTargetColumnName
Vector vecTargetColumnName(Code)



vecTargetColumnType
Vector vecTargetColumnType(Code)



vecTargetColumnValue
Vector vecTargetColumnValue(Code)



vecTargetKeyColumnName
Vector vecTargetKeyColumnName(Code)



vecTempUserID
Vector vecTempUserID(Code)



vecToHex
Vector vecToHex(Code)



vecValueColumnsTargetTables
Vector vecValueColumnsTargetTables(Code)



vecValueMode
Vector vecValueMode(Code)



vecVariableColumnName
Vector vecVariableColumnName(Code)



vecVariableColumnTargetColumnName
Vector vecVariableColumnTargetColumnName(Code)



vecVariableColumnTargetTableID
Vector vecVariableColumnTargetTableID(Code)



vecVariableColumnTargetTableName
Vector vecVariableColumnTargetTableName(Code)



vecVariableColumnTypes
Vector vecVariableColumnTypes(Code)



vecVariableColumnValueMode
Vector vecVariableColumnValueMode(Code)



vecVariableName
Vector vecVariableName(Code)



vecVariableOverride
Vector vecVariableOverride(Code)



vecVariablePrefix
Vector vecVariablePrefix(Code)



vecVariableSufix
Vector vecVariableSufix(Code)



vecVariableTimesColumnName
Vector vecVariableTimesColumnName(Code)



vecVariableTimesTableID
Vector vecVariableTimesTableID(Code)



vecVariableTimesTableName
Vector vecVariableTimesTableName(Code)



vecVariableTimesValueMode
Vector vecVariableTimesValueMode(Code)



vecVariableUseIDColumnName
Vector vecVariableUseIDColumnName(Code)



vecVariableUseIDTableID
Vector vecVariableUseIDTableID(Code)



vecVariableUseIDTableName
Vector vecVariableUseIDTableName(Code)



vecVariableUseIDValueMode
Vector vecVariableUseIDValueMode(Code)



vecVariableValue
Vector vecVariableValue(Code)




Constructor Detail
Loader
public Loader(String loadJobFileName, String mode, String userID, String logDirName, String logFileName, boolean restartIndicator, Map variableValues, String vendorFileName, boolean onErrorContinue, String additionalPaths, int commitCount, int returnCode, String[] includeTables, String confJarStructure)(Code)
Construct object Loader with an associated parameters.
Parameters:
  loadJobFileName - defines xml input file.
Parameters:
  mode - defines the default logmode. Possible values are "none","normal" (is the default) and "full". Is "normal" otherwise -mnone
Parameters:
  userID - String which is name of user. This argument is used forwriting userID into variable columns. If it is 'null' there isno define userID columns.
Parameters:
  logDirName - defines the logfile directory. The default is the currentworking directory.
Parameters:
  logFileName - defines the logfile name. The default is"LoaderLog-YYYY-MM-DD-HH-mm-SS.txt".
Parameters:
  restartIndicator - which is true if "restart" mode and false if "new" mode.
Parameters:
  variableValues - Map defines variables used in variable columns.
Parameters:
  vendorFileName - the filename of the XML DB-vendor configuration file. Thedefault is "OctopusDBVendors.xml".
Parameters:
  onErrorContinue - defines to set the default of "onErrorContinue" to "true". Isfalse otherwise.
Parameters:
  additionalPaths - Extend the classpath with additional paths.
Parameters:
  commitCount - Sets the default commit count. System default is "100".
Parameters:
  returnCode - Sets the default error return code. System default is "1".
Parameters:
  includeTables - defines tables which will be processed



Loader
public Loader(String loadJobFileName, String mode, String userID, String logDirName, String logFileName, boolean restartIndicator, Map variableValues, String vendorFileName, boolean onErrorContinue, String additionalPaths, int commitCount, int returnCode)(Code)
Construct object Loader with an associated parameters.
Parameters:
  loadJobFileName - defines xml input file.
Parameters:
  mode - defines the default logmode. Possible values are "none","normal" (is the default) and "full". Is "normal" otherwise -mnone
Parameters:
  userID - String which is name of user. This argument is used forwriting userID into variable columns. If it is 'null' there isno define userID columns.
Parameters:
  logDirName - defines the logfile directory. The default is the currentworking directory.
Parameters:
  logFileName - defines the logfile name. The default is"LoaderLog-YYYY-MM-DD-HH-mm-SS.txt".
Parameters:
  restartIndicator - which is true if "restart" mode and false if "new" mode.
Parameters:
  variableValues - Map defines variables used in variable columns.
Parameters:
  vendorFileName - the filename of the XML DB-vendor configuration file. Thedefault is "OctopusDBVendors.xml".
Parameters:
  onErrorContinue - defines to set the default of "onErrorContinue" to "true". Isfalse otherwise.
Parameters:
  additionalPaths - Extend the classpath with additional paths.
Parameters:
  commitCount - Sets the default commit count. System default is "100".
Parameters:
  returnCode - Sets the default error return code. System default is "1".



Loader
public Loader(String loadJobFileName, String mode, String userID, String logDirName, String logFileName, boolean restartIndicator, Map variableValues, String vendorFileName, boolean onErrorContinue, String additionalPaths, int commitCount, int returnCode, String[] includeTables)(Code)
Construct object Loader with an associated parameters.
Parameters:
  loadJobFileName - defines xml input file.
Parameters:
  mode - defines the default logmode. Possible values are "none","normal" (is the default) and "full". Is "normal" otherwise -mnone
Parameters:
  userID - String which is name of user. This argument is used forwriting userID into variable columns. If it is 'null' there isno define userID columns.
Parameters:
  logDirName - defines the logfile directory. The default is the currentworking directory.
Parameters:
  logFileName - defines the logfile name. The default is"LoaderLog-YYYY-MM-DD-HH-mm-SS.txt".
Parameters:
  restartIndicator - which is true if "restart" mode and false if "new" mode.
Parameters:
  variableValues - Map defines variables used in variable columns.
Parameters:
  vendorFileName - the filename of the XML DB-vendor configuration file. Thedefault is "OctopusDBVendors.xml".
Parameters:
  onErrorContinue - defines to set the default of "onErrorContinue" to "true". Isfalse otherwise.
Parameters:
  additionalPaths - Extend the classpath with additional paths.
Parameters:
  commitCount - Sets the default commit count. System default is "100".
Parameters:
  returnCode - Sets the default error return code. System default is "1".



Loader
public Loader(String loadJobFileName, String mode, String userID, String logDirName, String logFileName, boolean restartIndicator, Map variableValues, String vendorFileName, boolean onErrorContinue, String additionalPaths, int commitCount, int returnCode, String confJarStructure)(Code)
Construct object Loader with an associated parameters.
Parameters:
  loadJobFileName - defines xml input file.
Parameters:
  mode - defines the default logmode. Possible values are "none","normal" (is the default) and "full". Is "normal" otherwise -mnone
Parameters:
  userID - String which is name of user. This argument is used forwriting userID into variable columns. If it is 'null' there isno define userID columns.
Parameters:
  logDirName - defines the logfile directory. The default is the currentworking directory.
Parameters:
  logFileName - defines the logfile name. The default is"LoaderLog-YYYY-MM-DD-HH-mm-SS.txt".
Parameters:
  restartIndicator - which is true if "restart" mode and false if "new" mode.
Parameters:
  variableValues - Map defines variables used in variable columns.
Parameters:
  vendorFileName - the filename of the XML DB-vendor configuration file. Thedefault is "OctopusDBVendors.xml".
Parameters:
  onErrorContinue - defines to set the default of "onErrorContinue" to "true". Isfalse otherwise.
Parameters:
  additionalPaths - Extend the classpath with additional paths.
Parameters:
  commitCount - Sets the default commit count. System default is "100".
Parameters:
  returnCode - Sets the default error return code. System default is "1".



Loader
public Loader(String loadJobFileName)(Code)
Public constructor of Loader class. Constructor set value for loadJobFileName attribute. Class set all other attributes to the default values.
Parameters:
  loadJobFileName - Name of loadJob import XML file.



Loader
public Loader(String loadJobFileName, String confJarStructure)(Code)
Public constructor of Loader class. Constructor set value for loadJobFileName attribute. Class set all other attributes to the default values.
Parameters:
  loadJobFileName - Name of loadJob import XML file.




Method Detail
getAdditionalPaths
public String getAdditionalPaths()(Code)
Read value of additionalPaths attribute. value of attribute.



getCommitCount
public int getCommitCount()(Code)
Read value of commitCount attribute. value of attribute.



getConfJarStructure
public String getConfJarStructure()(Code)
This method read value of confJarStructure parameter value of parameter



getDateFromString
protected java.util.Date getDateFromString(String date) throws Exception(Code)



getDefaultLogMode
public String getDefaultLogMode()(Code)
This method read value of defaultLogMode parameter value of parameter



getDefaultReturnCode
public int getDefaultReturnCode()(Code)
Read value of default error return code attribute. value of attribute.



getIncludedJobs
public String[] getIncludedJobs()(Code)
This method read value of includeJobs parameter value of parameter



getLoadJobFileName
public String getLoadJobFileName()(Code)
Read value of loadJobFileName attribute. String value of loadFileName attribute



getLogDirName
public String getLogDirName()(Code)
Read value of logDirName attribute value of attribute



getLogFileName
public String getLogFileName()(Code)
Read value of logFileName attribute. value of attribute.



getOnErrorContinue
public boolean getOnErrorContinue()(Code)
read value of onErrorContinue attribute. value of attribute.



getRestartIndicator
public boolean getRestartIndicator()(Code)
Read value of restartIndicator attribute. value of attribute.



getSQLRelationString
protected String getSQLRelationString(ResultSet rs)(Code)



getUserID
public String getUserID()(Code)
Read value of userID attribute. value of attribute.



getVariableValues
public Map getVariableValues()(Code)
Read value of variableValues attribute. value of attribute.



getVendorFileName
public String getVendorFileName()(Code)
Read value of vendorFileName. value of attribute.



inputToString
public String inputToString() throws LoaderException(Code)
This method write values for all input parameters to log file when log level is full
throws:
  LoaderException -



load
public void load() throws LoaderException(Code)
Method load is main method in class Loader. It is used to load data from the source table into target tables and(or) execute SQL statements. Loading parameters are set in XML file. During loading, load status is printed on the screen and also put into log file. If there is an error Exception "LoaderException" is thrown.
throws:
  LoaderException -



main
public static void main(String argv)(Code)
Main method Loader with an associated XML, restart mode (optional) i user (optional). Main method controls parameters, it they are OK starts load method, but if they aren't makes alert. Usage: java org.webdocwf.util.loader.Loader [options] loadJob_xml_filename"); Options: -m defines the default logmode. Possible values are 'none', 'normal' (is the default) and 'full'. -r starts the Loader in restart mode after abnormal termination in a prior execution. -u defines the current UserID used in UserID value columns. -v defines variables used in variable columns. -l defines the logfile directory. The default is the current working directory. -f defines the logfile name. The default is 'LoaderLog-YYYY-MM-DD-HH-mm-SS.txt'. -d the filename of the XML DB-vendor configuration file. The default is 'OctopusDBVendors.xml'. -e defines to set the default of 'onErrorContinue' to 'true'. Is false otherwise. -p Extend the classpath with additional paths. -c Sets the default commit count. System default is '100'. -rc Sets the default error return code. System default is '1'. -it Sets the table names which will be proccesed
Parameters:
  argv - represents input parmeters



parseInputData
public void parseInputData(Object readValueObject, Vector vecVektor, ResultSet rsetSource, int i, String columnName, int blobCount, boolean isMicrosoftDriver, Hashtable columnValuesMicrosoft, Hashtable sourceColumnTypes) throws LoaderException(Code)
This method read data from source table
Parameters:
  readValue - is data value which is reed
Parameters:
  vecVektor - defines vector
Parameters:
  rsetSource - defines ResultSet object
Parameters:
  i - is interger
Parameters:
  columnName - defines source column name
Parameters:
  blobCount - defines counter for blob object
Parameters:
  isMicrosoftDriver - defines if we use microsoft driver
Parameters:
  columnValuesMicrosoft - defines column values which is read with microsoft driver



printUsage
static void printUsage()(Code)
put your documentation comment here



setAdditionalPaths
public void setAdditionalPaths(String additionalPaths)(Code)
This method sets value of additionalPaths attribute.
Parameters:
  additionalPaths - value of attribute.



setAfter
Vector setAfter(Vector vecOrder, int iIndexCurrent, int iIndexTarget)(Code)
Method setAfter changes order of vecOrder's elements. Element at iIndexCurrent position will be removed and inserted after element at iIndexTarget position.
Parameters:
  vecOrder - Vector - order of relation tags
Parameters:
  iIndexCurrent - integer - position of element in Vector which changes itsposition.
Parameters:
  iIndexTarget - integer - position of 'target' element in Vector . Vector - order of relation tags after changing element'spositions.



setCommitCount
public void setCommitCount(int commitCount)(Code)
This method sets value of commitCount attribute.
Parameters:
  commitCount - value of attribute.



setDefaultReturnCode
public void setDefaultReturnCode(int code)(Code)
This method sets value of default error return code attribute.
Parameters:
  code - is value of attribute.



setIncludedJobs
public void setIncludedJobs(String include_Tables)(Code)
This method set value of includeJobs parameter
Parameters:
  include_Tables - is value of parameter



setLoadJobFileName
public void setLoadJobFileName(String loadJobFileName)(Code)
This method sets value of loadJobFileName attribute.
Parameters:
  loadJobFileName - loadJob XML file name



setLogDirName
public void setLogDirName(String logDirName)(Code)
This method sets value of logDirName attribute.
Parameters:
  logDirName - value of attribute.



setLogFileName
public void setLogFileName(String logFileName)(Code)
This method sets value of logFileName attribute.
Parameters:
  logFileName - value of attribute.



setOnErrorContinue
public void setOnErrorContinue(boolean onErrorContinue)(Code)
This method sets value of onErrorContinue attribute.
Parameters:
  onErrorContinue - value of attribute.



setRestartIndicator
public void setRestartIndicator(boolean restartIndicator)(Code)
This method sets value of restartIndicator attribute.
Parameters:
  restartIndicator - value of attribute.



setUserID
public void setUserID(String userID)(Code)
This method sets value of userID attribute.
Parameters:
  userID - attribute.



setValueOnStatement
protected void setValueOnStatement(String value, int javaTypeInt, int i, PreparedStatement pstmt) throws Exception(Code)



setVariableValues
public void setVariableValues(Map variableValue)(Code)
This method sets value of variableValues attribute.
Parameters:
  variableValue - value of attribute.



setVendorFileName
public void setVendorFileName(String vendorFileName)(Code)
This method sets value of vendorFileName attribute.
Parameters:
  vendorFileName - value of attribute.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.