| java.lang.Object org.webdocwf.util.loader.generator.LoaderGenerator
LoaderGenerator | public class LoaderGenerator (Code) | | LoaderGenerator class dinamicly generates the xml files (LoaderJob.xml and ImportDefinition.xml)
from the input data and source database.
Also LoaderGenerator creates SQL statements for building and loading an SQL target database.
author: Radoslav Dutina version: 1.0 |
Constructor Summary | |
public | LoaderGenerator(String sourceType, String sourceDataBase, String valueMode, String generatorOutput, String sourceDriverName, String targetDriverName, String targetDataBase, String targetType, String sourceUser, String sourcePassword, String targetUser, String targetPassword, String domlPath, String packageName, String generateDropTableStmt, String generateDropIntegrityStmt, String generateCreateTableStmt, String generateCreatePKStmt, String generateCreateFKStmt, String generateCreateIndexStmt, String generateSqlForAllVendors, String generateXml, String generateDoml, String fullMode, String includeTableList, String confJarStructure) Construct object LoaderGenerator with associated parameters.
Parameters: sourceType - defines the type of the source data. Parameters: targetType - defines the type of the target data. Parameters: sourceDriverName - is driver of defined source database. Parameters: targetDriverName - is driver of defined target database. Parameters: sourceDataBase - defines the place where you're put the database tables. Parameters: targetDataBase - defines the place where the target database tables are. Parameters: valueMode - defines the difference from overwrite and update attribute.Default valueMode is Overwrite. Parameters: generatorOutput - is optional. | public | LoaderGenerator(String sourceType, String sourceDataBase, String valueMode, String generatorOutput, String sourceDriverName, String targetDriverName, String targetDataBase, String targetType, String sourceUser, String sourcePassword, String targetUser, String targetPassword, String domlPath, String packageName, String generateDropTableStmt, String generateDropIntegrityStmt, String generateCreateTableStmt, String generateCreatePKStmt, String generateCreateFKStmt, String generateCreateIndexStmt, String generateSqlForAllVendors, String generateXml, String generateDoml, String fullMode, String restoreMode, String includeTableList, String confJarStructure) Construct object LoaderGenerator with associated parameters.
Parameters: sourceType - defines the type of the source data. Parameters: targetType - defines the type of the target data. Parameters: sourceDriverName - is driver of defined source database. Parameters: targetDriverName - is driver of defined target database. Parameters: sourceDataBase - defines the place where you're put the database tables. Parameters: targetDataBase - defines the place where the target database tables are. Parameters: valueMode - defines the difference from overwrite and update attribute.Default valueMode is Overwrite. Parameters: generatorOutput - is optional. | public | LoaderGenerator(String sourceType, String sourceDataBase, String valueMode, String generatorOutput, String sourceDriverName, String targetDriverName, String targetDataBase, String targetType, String sourceUser, String sourcePassword, String targetUser, String targetPassword, String domlPath, String packageName, String generateDropTableStmt, String generateDropIntegrityStmt, String generateCreateTableStmt, String generateCreatePKStmt, String generateCreateFKStmt, String generateCreateIndexStmt, String generateSqlForAllVendors, String generateXml, String generateDoml, String fullMode, String restoreMode, String includeTableList, String confJarStructure, String logMode, String logDirName, String logFileName) Construct object LoaderGenerator with associated parameters.
Parameters: sourceType - defines the type of the source data. Parameters: targetType - defines the type of the target data. Parameters: sourceDriverName - is driver of defined source database. Parameters: targetDriverName - is driver of defined target database. Parameters: sourceDataBase - defines the place where you're put the database tables. Parameters: targetDataBase - defines the place where the target database tables are. Parameters: valueMode - defines the difference from overwrite and update attribute.Default valueMode is Overwrite. Parameters: generatorOutput - is optional. | public | LoaderGenerator(String sourceDataBase, String targetDataBase, String sourceType, String targetType) Public constructor of LoaderGenerator class. | public | LoaderGenerator(String sourceDataBase, String targetDataBase, String sourceType, String targetType, String confJarStructure) Public constructor of LoaderGenerator class. |
LoaderGenerator | public LoaderGenerator(String sourceType, String sourceDataBase, String valueMode, String generatorOutput, String sourceDriverName, String targetDriverName, String targetDataBase, String targetType, String sourceUser, String sourcePassword, String targetUser, String targetPassword, String domlPath, String packageName, String generateDropTableStmt, String generateDropIntegrityStmt, String generateCreateTableStmt, String generateCreatePKStmt, String generateCreateFKStmt, String generateCreateIndexStmt, String generateSqlForAllVendors, String generateXml, String generateDoml, String fullMode, String includeTableList, String confJarStructure) throws LoaderException(Code) | | Construct object LoaderGenerator with associated parameters.
Parameters: sourceType - defines the type of the source data. Parameters: targetType - defines the type of the target data. Parameters: sourceDriverName - is driver of defined source database. Parameters: targetDriverName - is driver of defined target database. Parameters: sourceDataBase - defines the place where you're put the database tables. Parameters: targetDataBase - defines the place where the target database tables are. Parameters: valueMode - defines the difference from overwrite and update attribute.Default valueMode is Overwrite. Parameters: generatorOutput - is optional. That represents the directory, where theOctopus place created files. If this argument don't exists, Octopus placecreated files in to current directory! Parameters: sourceUser - defines the user of the source database. Parameters: sourcePassword - defines user password for the source database. Parameters: targetUser - defines the user of the target database. Parameters: targetPassword - defines user password for the target database. Parameters: domlPath - defines if the doml file exists. Default value is falseall, application generates xml, sql and doml files as ouput files. If the generateDoc has valuedoml, application generates only the doml file, and if generateDoc has the value wdoml, applicationgenerates xml and sql files. Parameters: packageName - defines the package name for the generated doml file. Parameters: generateDropTableStmt - defines if you want to generate only Sql statement for DROP TABLE Parameters: generateCreateTableStmt - defines if you want to generate only Sql statement for CREATE TABLE Parameters: generateCreatePKStmt - defines if you want to generate only Sql statement for ALTER TABLE Parameters: generateCreateFKStmt - defines if you want to generate only Sql statement for ALTER TABLE Parameters: generateCreateIndexStmt - defines if you want to generate only Sql statement for ALTER TABLE Parameters: generateSqlForAllVendors - defines if you want to generate Sql statements for all nameddatabase vendors Parameters: generateXml - defines if you want to generate xml file as output files Parameters: generateDoml - defines if you want to generate doml file as output file Parameters: fullMode - defines in which mode you want to generate xml files. Parameters: includeTableList - defines the list of tables which you want to include intoGenerator process Parameters: confJarStructure - defines the structure of jar file in which are conffiles placed throws: LoaderException - |
LoaderGenerator | public LoaderGenerator(String sourceType, String sourceDataBase, String valueMode, String generatorOutput, String sourceDriverName, String targetDriverName, String targetDataBase, String targetType, String sourceUser, String sourcePassword, String targetUser, String targetPassword, String domlPath, String packageName, String generateDropTableStmt, String generateDropIntegrityStmt, String generateCreateTableStmt, String generateCreatePKStmt, String generateCreateFKStmt, String generateCreateIndexStmt, String generateSqlForAllVendors, String generateXml, String generateDoml, String fullMode, String restoreMode, String includeTableList, String confJarStructure) throws LoaderException(Code) | | Construct object LoaderGenerator with associated parameters.
Parameters: sourceType - defines the type of the source data. Parameters: targetType - defines the type of the target data. Parameters: sourceDriverName - is driver of defined source database. Parameters: targetDriverName - is driver of defined target database. Parameters: sourceDataBase - defines the place where you're put the database tables. Parameters: targetDataBase - defines the place where the target database tables are. Parameters: valueMode - defines the difference from overwrite and update attribute.Default valueMode is Overwrite. Parameters: generatorOutput - is optional. That represents the directory, where theOctopus place created files. If this argument don't exists, Octopus placecreated files in to current directory! Parameters: sourceUser - defines the user of the source database. Parameters: sourcePassword - defines user password for the source database. Parameters: targetUser - defines the user of the target database. Parameters: targetPassword - defines user password for the target database. Parameters: domlPath - defines if the doml file exists. Default value is falseall, application generates xml, sql and doml files as ouput files. If the generateDoc has valuedoml, application generates only the doml file, and if generateDoc has the value wdoml, applicationgenerates xml and sql files. Parameters: packageName - defines the package name for the generated doml file. Parameters: generateDropTableStmt - defines if you want to generate only Sql statement for DROP TABLE Parameters: generateCreateTableStmt - defines if you want to generate only Sql statement for CREATE TABLE Parameters: generateCreatePKStmt - defines if you want to generate only Sql statement for ALTER TABLE Parameters: generateCreateFKStmt - defines if you want to generate only Sql statement for ALTER TABLE Parameters: generateCreateIndexStmt - defines if you want to generate only Sql statement for ALTER TABLE Parameters: generateSqlForAllVendors - defines if you want to generate Sql statements for all nameddatabase vendors Parameters: generateXml - defines if you want to generate xml file as output files Parameters: generateDoml - defines if you want to generate doml file as output file Parameters: fullMode - defines in which mode you want to generate xml files. Parameters: restoreMode - defines if we use application for restoring the database Parameters: includeTableList - defines the list of tables which you want to include intoGenerator process Parameters: confJarStructure - defines the structure of jar file in which are conf filesplaced. throws: LoaderException - |
LoaderGenerator | public LoaderGenerator(String sourceType, String sourceDataBase, String valueMode, String generatorOutput, String sourceDriverName, String targetDriverName, String targetDataBase, String targetType, String sourceUser, String sourcePassword, String targetUser, String targetPassword, String domlPath, String packageName, String generateDropTableStmt, String generateDropIntegrityStmt, String generateCreateTableStmt, String generateCreatePKStmt, String generateCreateFKStmt, String generateCreateIndexStmt, String generateSqlForAllVendors, String generateXml, String generateDoml, String fullMode, String restoreMode, String includeTableList, String confJarStructure, String logMode, String logDirName, String logFileName) throws LoaderException(Code) | | Construct object LoaderGenerator with associated parameters.
Parameters: sourceType - defines the type of the source data. Parameters: targetType - defines the type of the target data. Parameters: sourceDriverName - is driver of defined source database. Parameters: targetDriverName - is driver of defined target database. Parameters: sourceDataBase - defines the place where you're put the database tables. Parameters: targetDataBase - defines the place where the target database tables are. Parameters: valueMode - defines the difference from overwrite and update attribute.Default valueMode is Overwrite. Parameters: generatorOutput - is optional. That represents the directory, where theOctopus place created files. If this argument don't exists, Octopus placecreated files in to current directory! Parameters: sourceUser - defines the user of the source database. Parameters: sourcePassword - defines user password for the source database. Parameters: targetUser - defines the user of the target database. Parameters: targetPassword - defines user password for the target database. Parameters: domlPath - defines if the doml file exists. Default value is falseall, application generates xml, sql and doml files as ouput files. If the generateDoc has valuedoml, application generates only the doml file, and if generateDoc has the value wdoml, applicationgenerates xml and sql files. Parameters: packageName - defines the package name for the generated doml file. Parameters: generateDropTableStmt - defines if you want to generate only Sql statement for DROP TABLE Parameters: generateCreateTableStmt - defines if you want to generate only Sql statement for CREATE TABLE Parameters: generateCreatePKStmt - defines if you want to generate only Sql statement for ALTER TABLE Parameters: generateCreateFKStmt - defines if you want to generate only Sql statement for ALTER TABLE Parameters: generateCreateIndexStmt - defines if you want to generate only Sql statement for ALTER TABLE Parameters: generateSqlForAllVendors - defines if you want to generate Sql statements for all nameddatabase vendors Parameters: generateXml - defines if you want to generate xml file as output files Parameters: generateDoml - defines if you want to generate doml file as output file Parameters: fullMode - defines in which mode you want to generate xml files. Parameters: restoreMode - defines if we use application for restoring the database Parameters: includeTableList - defines the list of tables which you want to include intoGenerator process Parameters: confJarStructure - defines the structure of jar file in which are conf files Parameters: logMode - defines logging level Parameters: logDirName - defines logging directory Parameters: logFileName - defines logging file nameplaced. throws: LoaderException - |
LoaderGenerator | public LoaderGenerator(String sourceDataBase, String targetDataBase, String sourceType, String targetType) throws LoaderException(Code) | | Public constructor of LoaderGenerator class. Constructor set value for sourceDataBase and
targetDataBase attribute. Class set all other attributes to the default values.
Parameters: sourceDataBase - defines the place where you're put the database tables. Parameters: targetDataBase - defines the place where the target database tables are. Parameters: sourceType - defines the type of the source database. Parameters: targetType - defines the type of the target database. throws: LoaderException - |
LoaderGenerator | public LoaderGenerator(String sourceDataBase, String targetDataBase, String sourceType, String targetType, String confJarStructure) throws LoaderException(Code) | | Public constructor of LoaderGenerator class. Constructor set value for sourceDataBase and
targetDataBase attribute. Class set all other attributes to the default values.
Parameters: sourceDataBase - defines the place where you're put the database tables. Parameters: targetDataBase - defines the place where the target database tables are. Parameters: sourceType - defines the type of the source database. Parameters: targetType - defines the type of the target database. throws: LoaderException - |
generate | public void generate() throws LoaderException(Code) | | Method generate is main method in class LoaderGenerator. It is used to load data from the source
table, and starts LoadJobWriter,CreateIncludeFiles and CreateIncludeDomlFiles methods.
throws: LoaderException - |
getGenerateCreateIndexStmt | public boolean getGenerateCreateIndexStmt() throws LoaderException(Code) | | This method return generateCreateIndexStmt
CreateIndexes throws: LoaderException - |
getGenerateCreateTableStmt | public boolean getGenerateCreateTableStmt() throws LoaderException(Code) | | This method will return boolean which represents if user set "Create Tables" or not
boolean value throws: LoaderException - |
getGenerateDropIntegrityStmt | public boolean getGenerateDropIntegrityStmt() throws LoaderException(Code) | | This method return generateDropIntegrityStmt
generateDropIntegrityStmt throws: LoaderException - |
getGenerateDropTableStmt | public boolean getGenerateDropTableStmt() throws LoaderException(Code) | | This method return generateDropTableStmt
generateDropTableStmt throws: LoaderException - |
getGenerateSqlForAllVendors | public boolean getGenerateSqlForAllVendors() throws LoaderException(Code) | | This method return GenerateSqlForAllVendors
GenerateSqlForAllVendors throws: LoaderException - |
getLogMode | public String getLogMode()(Code) | | This method return logMode
logMode |
getStrLogDirName | public String getStrLogDirName()(Code) | | This method return strLogDirName
strLogDirName |
getStrLogFileName | public String getStrLogFileName()(Code) | | This method return strLogFileName
strLogFileName |
main | public static void main(String args)(Code) | | Main method controls parameters, it they are OK starts load method, but if they aren't makes alert.
Parameters: args - represents the input parametersUsage: java org.webdocwf.util.loader.generator.Generator [options]Options:-st sourceType, defines the type of the source database.-tt targetType, defines the type of the target database.-sdn sourceDriverName, defines the driver of defined source database.-tdn targetDriverName, defines the driver of defined target database.-sdb sourceDataBase, defines the place where you're put the source database tables.-tdb targetDataBase, defines the place where you're put the target database tables.-m valueMode, defines the difference from overwrite and update attribute. If the valueModehas value 'copy', attribute has value 'Overwrite', or if the valueMode has value 'sync', attributehas value 'Update'. Default value of valueMode is 'copy'.-o generatorOutput, is optional. That represent the directory, where the Octopus place created files.If this argument don't exists, Octopus place created files in to current directory!-su sourceUser, defines the user of the source database.-sp sourcePassword, defines the user password for the source database.-tu targetUser, defines the user of the target database.-tp targetPassword, defines the user password for the target database.-doml domlUrl, defines the place where the doml file is placed.-pack packageName, defines the package name for the generated doml file.-xml -xml generateXml, defines if you want to generate xml files as output files-gdoml generateDoml, defines if you want to generate doml file as output file.-sqlCT generateCreateTables defines if you want to generate only Sql statement for CREATE TABLE.-sqlDT generateDropTableStmt defines if you want to generate only Sql statement for DROP TABLE.-sqlCPK generateCreatePrimaryKeys defines if you want to generate only Sql statement for ALTER TABLE ADD CONSTRAINT (PRIMARY KEY).-sqlCFK generateCreateForeigKeys defines if you want to generate only Sql statement for ALTER TABLE ADD CONSTRAINT (FOREIGN KEY).-sqlCI generateCreateIndex defines if you want to generate only Sql statement for CREATE INDEX.-sqlAll generateSqlForAllVendors defines if you want to generate sql statements for all named database vendors.-fm fullMode defines the mode of output xml files. Possible values are true and false.-lm logMode defines logging level-l logDirName defines logging directory-f logFileName defines logging file name |
printUsage | static void printUsage()(Code) | | |
setGenerateCreateFKStmt | public void setGenerateCreateFKStmt(boolean generateCreateFKStmt) throws LoaderException(Code) | | This method set generateCreateFKStmt
Parameters: generateCreateFKStmt - throws: LoaderException - |
setGenerateCreateIndexStmt | public void setGenerateCreateIndexStmt(boolean generateCreateIndexStmt) throws LoaderException(Code) | | This method set generateCreateIndexStmt
Parameters: generateCreateIndexStmt - throws: LoaderException - |
setGenerateCreatePKStmt | public void setGenerateCreatePKStmt(boolean generateCreatePKStmt) throws LoaderException(Code) | | This method set generateCreatePKStmt
Parameters: generateCreatePKStmt - throws: LoaderException - |
setGenerateCreateTableStmt | public void setGenerateCreateTableStmt(boolean generateCreateTableStmt) throws LoaderException(Code) | | This method set generateCreateTableStmt
Parameters: generateCreateTableStmt - throws: LoaderException - |
setGenerateDropIntegrityStmt | public void setGenerateDropIntegrityStmt(boolean generateDropIntegrityStmt) throws LoaderException(Code) | | This method set generateDropIntegrityStmt
Parameters: generateDropIntegrityStmt - throws: LoaderException - |
setGenerateDropTableStmt | public void setGenerateDropTableStmt(boolean generateDropTableStmt) throws LoaderException(Code) | | This method set generateDropTableStmt
Parameters: generateDropTableStmt - throws: LoaderException - |
setGenerateSqlForAllVendors | public void setGenerateSqlForAllVendors(boolean generateSqlForAllVendors) throws LoaderException(Code) | | This method set generateSqlForAllVendors
Parameters: generateSqlForAllVendors - throws: LoaderException - |
setLogMode | public void setLogMode(String logMode)(Code) | | This method set logMode
Parameters: logMode - |
setStrLogDirName | public void setStrLogDirName(String strLogDirName)(Code) | | This method set strLogDirName
Parameters: strLogDirName - |
setStrLogFileName | public void setStrLogFileName(String strLogFileName)(Code) | | This method set strLogFileName
Parameters: strLogFileName - |
|
|