@Test public void testGetXML() { OraBulkLoaderMeta oraBulkLoaderMeta = new OraBulkLoaderMeta(); oraBulkLoaderMeta.setFieldTable( new String[] { "fieldTable1", "fieldTable2" } ); oraBulkLoaderMeta.setFieldStream( new String[] { "fieldStreamValue1" } ); oraBulkLoaderMeta.setDateMask( new String[] {} ); oraBulkLoaderMeta.afterInjectionSynchronization(); oraBulkLoaderMeta.getXML(); Assert.assertEquals( oraBulkLoaderMeta.getFieldStream().length, oraBulkLoaderMeta.getDateMask().length ); }
public String getXML() { StringBuilder retval = new StringBuilder( 300 ); retval .append( " " ).append( XMLHandler.addTagValue( "connection", databaseMeta == null ? "" : databaseMeta.getName() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "commit", commitSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bind_size", bindSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "read_size", readSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "errors", maxErrors ) ); retval.append( " " ).append( XMLHandler.addTagValue( "schema", schemaName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "table", tableName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_method", loadMethod ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_action", loadAction ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sqlldr", sqlldr ) ); retval.append( " " ).append( XMLHandler.addTagValue( "control_file", controlFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "data_file", dataFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "log_file", logFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bad_file", badFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "discard_file", discardFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "direct_path", directPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "erase_files", eraseFiles ) ); retval.append( " " ).append( XMLHandler.addTagValue( "encoding", encoding ) ); retval.append( " " ).append( XMLHandler.addTagValue( "dbname_override", dbNameOverride ) ); retval.append( " " ).append( XMLHandler.addTagValue( "character_set", characterSetName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_warning", failOnWarning ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_error", failOnError ) ); retval.append( " " ).append( XMLHandler.addTagValue( "parallel", parallel ) ); retval.append( " " ).append( XMLHandler.addTagValue( "alt_rec_term", altRecordTerm ) ); for ( int i = 0; i < fieldTable.length; i++ ) { retval.append( " <mapping>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "stream_name", fieldTable[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "field_name", fieldStream[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "date_mask", dateMask[i] ) ); retval.append( " </mapping>" ).append( Const.CR ); } return retval.toString(); }
OraBulkLoaderMeta extends BaseStepMeta implements StepMetaInterface,
  ProvidesDatabaseConnectionInformation { public String getXML() { StringBuilder retval = new StringBuilder( 300 ); retval .append( " " ).append( XMLHandler.addTagValue( "connection", databaseMeta == null ? "" : databaseMeta.getName() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "commit", commitSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bind_size", bindSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "read_size", readSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "errors", maxErrors ) ); retval.append( " " ).append( XMLHandler.addTagValue( "schema", schemaName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "table", tableName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_method", loadMethod ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_action", loadAction ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sqlldr", sqlldr ) ); retval.append( " " ).append( XMLHandler.addTagValue( "control_file", controlFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "data_file", dataFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "log_file", logFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bad_file", badFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "discard_file", discardFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "direct_path", directPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "erase_files", eraseFiles ) ); retval.append( " " ).append( XMLHandler.addTagValue( "encoding", encoding ) ); retval.append( " " ).append( XMLHandler.addTagValue( "dbname_override", dbNameOverride ) ); retval.append( " " ).append( XMLHandler.addTagValue( "character_set", characterSetName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_warning", failOnWarning ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_error", failOnError ) ); retval.append( " " ).append( XMLHandler.addTagValue( "parallel", parallel ) ); retval.append( " " ).append( XMLHandler.addTagValue( "alt_rec_term", altRecordTerm ) ); for ( int i = 0; i < fieldTable.length; i++ ) { retval.append( " <mapping>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "stream_name", fieldTable[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "field_name", fieldStream[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "date_mask", dateMask[i] ) ); retval.append( " </mapping>" ).append( Const.CR ); } return retval.toString(); } }
OraBulkLoaderMeta extends BaseStepMeta implements StepMetaInterface,
  ProvidesDatabaseConnectionInformation { public String getXML() { StringBuilder retval = new StringBuilder( 300 ); retval .append( " " ).append( XMLHandler.addTagValue( "connection", databaseMeta == null ? "" : databaseMeta.getName() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "commit", commitSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bind_size", bindSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "read_size", readSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "errors", maxErrors ) ); retval.append( " " ).append( XMLHandler.addTagValue( "schema", schemaName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "table", tableName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_method", loadMethod ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_action", loadAction ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sqlldr", sqlldr ) ); retval.append( " " ).append( XMLHandler.addTagValue( "control_file", controlFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "data_file", dataFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "log_file", logFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bad_file", badFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "discard_file", discardFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "direct_path", directPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "erase_files", eraseFiles ) ); retval.append( " " ).append( XMLHandler.addTagValue( "encoding", encoding ) ); retval.append( " " ).append( XMLHandler.addTagValue( "dbname_override", dbNameOverride ) ); retval.append( " " ).append( XMLHandler.addTagValue( "character_set", characterSetName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_warning", failOnWarning ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_error", failOnError ) ); retval.append( " " ).append( XMLHandler.addTagValue( "parallel", parallel ) ); retval.append( " " ).append( XMLHandler.addTagValue( "alt_rec_term", altRecordTerm ) ); for ( int i = 0; i < fieldTable.length; i++ ) { retval.append( " <mapping>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "stream_name", fieldTable[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "field_name", fieldStream[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "date_mask", dateMask[i] ) ); retval.append( " </mapping>" ).append( Const.CR ); } return retval.toString(); } OraBulkLoaderMeta(); }
OraBulkLoaderMeta extends BaseStepMeta implements StepMetaInterface,
  ProvidesDatabaseConnectionInformation { public String getXML() { StringBuilder retval = new StringBuilder( 300 ); retval .append( " " ).append( XMLHandler.addTagValue( "connection", databaseMeta == null ? "" : databaseMeta.getName() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "commit", commitSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bind_size", bindSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "read_size", readSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "errors", maxErrors ) ); retval.append( " " ).append( XMLHandler.addTagValue( "schema", schemaName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "table", tableName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_method", loadMethod ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_action", loadAction ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sqlldr", sqlldr ) ); retval.append( " " ).append( XMLHandler.addTagValue( "control_file", controlFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "data_file", dataFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "log_file", logFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bad_file", badFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "discard_file", discardFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "direct_path", directPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "erase_files", eraseFiles ) ); retval.append( " " ).append( XMLHandler.addTagValue( "encoding", encoding ) ); retval.append( " " ).append( XMLHandler.addTagValue( "dbname_override", dbNameOverride ) ); retval.append( " " ).append( XMLHandler.addTagValue( "character_set", characterSetName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_warning", failOnWarning ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_error", failOnError ) ); retval.append( " " ).append( XMLHandler.addTagValue( "parallel", parallel ) ); retval.append( " " ).append( XMLHandler.addTagValue( "alt_rec_term", altRecordTerm ) ); for ( int i = 0; i < fieldTable.length; i++ ) { retval.append( " <mapping>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "stream_name", fieldTable[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "field_name", fieldStream[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "date_mask", dateMask[i] ) ); retval.append( " </mapping>" ).append( Const.CR ); } return retval.toString(); } OraBulkLoaderMeta(); @Injection( name = "CONNECTION_NAME" ) void setConnection( String connectionName ); int getCommitSizeAsInt( VariableSpace varSpace ); String getCommitSize(); void setCommitSize( String commitSize ); DatabaseMeta getDatabaseMeta(); void setDatabaseMeta( DatabaseMeta database ); String getTableName(); void setTableName( String tableName ); String getSqlldr(); void setSqlldr( String sqlldr ); String[] getFieldTable(); void setFieldTable( String[] updateLookup ); String[] getFieldStream(); void setFieldStream( String[] updateStream ); String[] getDateMask(); void setDateMask( String[] dateMask ); boolean isFailOnWarning(); void setFailOnWarning( boolean failOnWarning ); boolean isFailOnError(); void setFailOnError( boolean failOnError ); String getCharacterSetName(); void setCharacterSetName( String characterSetName ); String getAltRecordTerm(); void setAltRecordTerm( String altRecordTerm ); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void allocate( int nrvalues ); Object clone(); void setDefault(); String getXML(); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); void getFields( RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ); SQLStatement getSQLStatements( TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
    Repository repository, IMetaStore metaStore ); void analyseImpact( List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, Repository repository,
    IMetaStore metaStore ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
    TransMeta transMeta, Trans trans ); StepDataInterface getStepData(); DatabaseMeta[] getUsedDatabaseConnections(); boolean isDirectPath(); void setDirectPath( boolean directPath ); RowMetaInterface getRequiredFields( VariableSpace space ); String getSchemaName(); void setSchemaName( String schemaName ); String getBadFile(); void setBadFile( String badFile ); String getControlFile(); void setControlFile( String controlFile ); String getDataFile(); void setDataFile( String dataFile ); String getDiscardFile(); void setDiscardFile( String discardFile ); String getLogFile(); void setLogFile( String logFile ); void setLoadAction( String action ); String getLoadAction(); void setLoadMethod( String method ); String getLoadMethod(); String getEncoding(); void setEncoding( String encoding ); String getDelimiter(); String getEnclosure(); boolean isEraseFiles(); void setEraseFiles( boolean eraseFiles ); int getBindSizeAsInt( VariableSpace varSpace ); String getBindSize(); void setBindSize( String bindSize ); int getMaxErrorsAsInt( VariableSpace varSpace ); String getMaxErrors(); void setMaxErrors( String maxErrors ); int getReadSizeAsInt( VariableSpace varSpace ); String getReadSize(); void setReadSize( String readSize ); String getDbNameOverride(); void setDbNameOverride( String dbNameOverride ); boolean isParallel(); void setParallel( boolean parallel ); @Override String getMissingDatabaseConnectionInformationMessage(); @AfterInjection void afterInjectionSynchronization(); }
OraBulkLoaderMeta extends BaseStepMeta implements StepMetaInterface,
  ProvidesDatabaseConnectionInformation { public String getXML() { StringBuilder retval = new StringBuilder( 300 ); retval .append( " " ).append( XMLHandler.addTagValue( "connection", databaseMeta == null ? "" : databaseMeta.getName() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "commit", commitSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bind_size", bindSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "read_size", readSize ) ); retval.append( " " ).append( XMLHandler.addTagValue( "errors", maxErrors ) ); retval.append( " " ).append( XMLHandler.addTagValue( "schema", schemaName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "table", tableName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_method", loadMethod ) ); retval.append( " " ).append( XMLHandler.addTagValue( "load_action", loadAction ) ); retval.append( " " ).append( XMLHandler.addTagValue( "sqlldr", sqlldr ) ); retval.append( " " ).append( XMLHandler.addTagValue( "control_file", controlFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "data_file", dataFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "log_file", logFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "bad_file", badFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "discard_file", discardFile ) ); retval.append( " " ).append( XMLHandler.addTagValue( "direct_path", directPath ) ); retval.append( " " ).append( XMLHandler.addTagValue( "erase_files", eraseFiles ) ); retval.append( " " ).append( XMLHandler.addTagValue( "encoding", encoding ) ); retval.append( " " ).append( XMLHandler.addTagValue( "dbname_override", dbNameOverride ) ); retval.append( " " ).append( XMLHandler.addTagValue( "character_set", characterSetName ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_warning", failOnWarning ) ); retval.append( " " ).append( XMLHandler.addTagValue( "fail_on_error", failOnError ) ); retval.append( " " ).append( XMLHandler.addTagValue( "parallel", parallel ) ); retval.append( " " ).append( XMLHandler.addTagValue( "alt_rec_term", altRecordTerm ) ); for ( int i = 0; i < fieldTable.length; i++ ) { retval.append( " <mapping>" ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "stream_name", fieldTable[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "field_name", fieldStream[i] ) ); retval.append( " " ).append( XMLHandler.addTagValue( "date_mask", dateMask[i] ) ); retval.append( " </mapping>" ).append( Const.CR ); } return retval.toString(); } OraBulkLoaderMeta(); @Injection( name = "CONNECTION_NAME" ) void setConnection( String connectionName ); int getCommitSizeAsInt( VariableSpace varSpace ); String getCommitSize(); void setCommitSize( String commitSize ); DatabaseMeta getDatabaseMeta(); void setDatabaseMeta( DatabaseMeta database ); String getTableName(); void setTableName( String tableName ); String getSqlldr(); void setSqlldr( String sqlldr ); String[] getFieldTable(); void setFieldTable( String[] updateLookup ); String[] getFieldStream(); void setFieldStream( String[] updateStream ); String[] getDateMask(); void setDateMask( String[] dateMask ); boolean isFailOnWarning(); void setFailOnWarning( boolean failOnWarning ); boolean isFailOnError(); void setFailOnError( boolean failOnError ); String getCharacterSetName(); void setCharacterSetName( String characterSetName ); String getAltRecordTerm(); void setAltRecordTerm( String altRecordTerm ); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void allocate( int nrvalues ); Object clone(); void setDefault(); String getXML(); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); void getFields( RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ); SQLStatement getSQLStatements( TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
    Repository repository, IMetaStore metaStore ); void analyseImpact( List<DatabaseImpact> impact, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, Repository repository,
    IMetaStore metaStore ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
    TransMeta transMeta, Trans trans ); StepDataInterface getStepData(); DatabaseMeta[] getUsedDatabaseConnections(); boolean isDirectPath(); void setDirectPath( boolean directPath ); RowMetaInterface getRequiredFields( VariableSpace space ); String getSchemaName(); void setSchemaName( String schemaName ); String getBadFile(); void setBadFile( String badFile ); String getControlFile(); void setControlFile( String controlFile ); String getDataFile(); void setDataFile( String dataFile ); String getDiscardFile(); void setDiscardFile( String discardFile ); String getLogFile(); void setLogFile( String logFile ); void setLoadAction( String action ); String getLoadAction(); void setLoadMethod( String method ); String getLoadMethod(); String getEncoding(); void setEncoding( String encoding ); String getDelimiter(); String getEnclosure(); boolean isEraseFiles(); void setEraseFiles( boolean eraseFiles ); int getBindSizeAsInt( VariableSpace varSpace ); String getBindSize(); void setBindSize( String bindSize ); int getMaxErrorsAsInt( VariableSpace varSpace ); String getMaxErrors(); void setMaxErrors( String maxErrors ); int getReadSizeAsInt( VariableSpace varSpace ); String getReadSize(); void setReadSize( String readSize ); String getDbNameOverride(); void setDbNameOverride( String dbNameOverride ); boolean isParallel(); void setParallel( boolean parallel ); @Override String getMissingDatabaseConnectionInformationMessage(); @AfterInjection void afterInjectionSynchronization(); static final String ACTION_APPEND; static final String ACTION_INSERT; static final String ACTION_REPLACE; static final String ACTION_TRUNCATE; static final String METHOD_AUTO_CONCURRENT; static final String METHOD_AUTO_END; static final String METHOD_MANUAL; static final String DATE_MASK_DATE; static final String DATE_MASK_DATETIME; }