@Test public void testRoundTrip() throws KettleException { List<String> attributes = Arrays.asList( "schema", "table", "encoding", "delimiter", "enclosure", "escape_char", "replace", "ignore", "local", "fifo_file_name", "bulk_size", "stream_name", "field_name", "field_format_ok" ); Map<String, String> getterMap = new HashMap<String, String>(); getterMap.put( "schema", "getSchemaName" ); getterMap.put( "table", "getTableName" ); getterMap.put( "encoding", "getEncoding" ); getterMap.put( "delimiter", "getDelimiter" ); getterMap.put( "enclosure", "getEnclosure" ); getterMap.put( "escape_char", "getEscapeChar" ); getterMap.put( "replace", "isReplacingData" ); getterMap.put( "ignore", "isIgnoringErrors" ); getterMap.put( "local", "isLocalFile" ); getterMap.put( "fifo_file_name", "getFifoFileName" ); getterMap.put( "bulk_size", "getBulkSize" ); getterMap.put( "stream_name", "getFieldTable" ); getterMap.put( "field_name", "getFieldStream" ); getterMap.put( "field_format_ok", "getFieldFormatType" ); Map<String, String> setterMap = new HashMap<String, String>(); setterMap.put( "schema", "setSchemaName" ); setterMap.put( "table", "setTableName" ); setterMap.put( "encoding", "setEncoding" ); setterMap.put( "delimiter", "setDelimiter" ); setterMap.put( "enclosure", "setEnclosure" ); setterMap.put( "escape_char", "setEscapeChar" ); setterMap.put( "replace", "setReplacingData" ); setterMap.put( "ignore", "setIgnoringErrors" ); setterMap.put( "local", "setLocalFile" ); setterMap.put( "fifo_file_name", "setFifoFileName" ); setterMap.put( "bulk_size", "setBulkSize" ); setterMap.put( "stream_name", "setFieldTable" ); setterMap.put( "field_name", "setFieldStream" ); setterMap.put( "field_format_ok", "setFieldFormatType" ); Map<String, FieldLoadSaveValidator<?>> fieldLoadSaveValidatorAttributeMap = new HashMap<String, FieldLoadSaveValidator<?>>(); FieldLoadSaveValidator<String[]> stringArrayLoadSaveValidator = new ArrayLoadSaveValidator<String>( new StringLoadSaveValidator(), 25 ); FieldLoadSaveValidator<int[]> fieldFormatTypeArrayLoadSaveValidator = new PrimitiveIntArrayLoadSaveValidator( new IntLoadSaveValidator( MySQLBulkLoaderMeta.getFieldFormatTypeCodes().length ), 25 ); fieldLoadSaveValidatorAttributeMap.put( "stream_name", stringArrayLoadSaveValidator ); fieldLoadSaveValidatorAttributeMap.put( "field_name", stringArrayLoadSaveValidator ); fieldLoadSaveValidatorAttributeMap.put( "field_format_ok", fieldFormatTypeArrayLoadSaveValidator ); LoadSaveTester loadSaveTester = new LoadSaveTester( MySQLBulkLoaderMeta.class, attributes, getterMap, setterMap, fieldLoadSaveValidatorAttributeMap, new HashMap<String, FieldLoadSaveValidator<?>>() ); loadSaveTester.testSerialization(); }
public static String[] getFieldFormatTypeCodes() { return fieldFormatTypeCodes; }
MySQLBulkLoaderMeta extends BaseStepMeta implements StepMetaInterface,
    ProvidesDatabaseConnectionInformation { public static String[] getFieldFormatTypeCodes() { return fieldFormatTypeCodes; } }
MySQLBulkLoaderMeta extends BaseStepMeta implements StepMetaInterface,
    ProvidesDatabaseConnectionInformation { public static String[] getFieldFormatTypeCodes() { return fieldFormatTypeCodes; }  }
MySQLBulkLoaderMeta extends BaseStepMeta implements StepMetaInterface,
    ProvidesDatabaseConnectionInformation { public static String[] getFieldFormatTypeCodes() { return fieldFormatTypeCodes; }  DatabaseMeta getDatabaseMeta(); void setDatabaseMeta( DatabaseMeta database ); String getTableName(); void setTableName( String tableName ); String[] getFieldTable(); void setFieldTable( String[] fieldTable ); String[] getFieldStream(); void setFieldStream( String[] fieldStream ); 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(); RowMetaInterface getRequiredFields( VariableSpace space ); String getSchemaName(); void setSchemaName( String schemaName ); String getEncoding(); void setEncoding( String encoding ); String getDelimiter(); void setDelimiter( String delimiter ); String getEnclosure(); void setEnclosure( String enclosure ); String getFifoFileName(); void setFifoFileName( String fifoFileName ); boolean isReplacingData(); void setReplacingData( boolean replacingData ); int[] getFieldFormatType(); void setFieldFormatType( int[] fieldFormatType ); static String[] getFieldFormatTypeCodes(); static String[] getFieldFormatTypeDescriptions(); static String getFieldFormatTypeCode( int type ); static String getFieldFormatTypeDescription( int type ); static int getFieldFormatType( String codeOrDescription ); String getEscapeChar(); void setEscapeChar( String escapeChar ); boolean isIgnoringErrors(); void setIgnoringErrors( boolean ignoringErrors ); String getBulkSize(); void setBulkSize( String bulkSize ); boolean isLocalFile(); void setLocalFile( boolean localFile ); @Override String getMissingDatabaseConnectionInformationMessage(); @AfterInjection void afterInjectionSynchronization(); }
MySQLBulkLoaderMeta extends BaseStepMeta implements StepMetaInterface,
    ProvidesDatabaseConnectionInformation { public static String[] getFieldFormatTypeCodes() { return fieldFormatTypeCodes; }  DatabaseMeta getDatabaseMeta(); void setDatabaseMeta( DatabaseMeta database ); String getTableName(); void setTableName( String tableName ); String[] getFieldTable(); void setFieldTable( String[] fieldTable ); String[] getFieldStream(); void setFieldStream( String[] fieldStream ); 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(); RowMetaInterface getRequiredFields( VariableSpace space ); String getSchemaName(); void setSchemaName( String schemaName ); String getEncoding(); void setEncoding( String encoding ); String getDelimiter(); void setDelimiter( String delimiter ); String getEnclosure(); void setEnclosure( String enclosure ); String getFifoFileName(); void setFifoFileName( String fifoFileName ); boolean isReplacingData(); void setReplacingData( boolean replacingData ); int[] getFieldFormatType(); void setFieldFormatType( int[] fieldFormatType ); static String[] getFieldFormatTypeCodes(); static String[] getFieldFormatTypeDescriptions(); static String getFieldFormatTypeCode( int type ); static String getFieldFormatTypeDescription( int type ); static int getFieldFormatType( String codeOrDescription ); String getEscapeChar(); void setEscapeChar( String escapeChar ); boolean isIgnoringErrors(); void setIgnoringErrors( boolean ignoringErrors ); String getBulkSize(); void setBulkSize( String bulkSize ); boolean isLocalFile(); void setLocalFile( boolean localFile ); @Override String getMissingDatabaseConnectionInformationMessage(); @AfterInjection void afterInjectionSynchronization(); static final int FIELD_FORMAT_TYPE_OK; static final int FIELD_FORMAT_TYPE_DATE; static final int FIELD_FORMAT_TYPE_TIMESTAMP; static final int FIELD_FORMAT_TYPE_NUMBER; static final int FIELD_FORMAT_TYPE_STRING_ESCAPE; }