@Test public void testMergeRowMeta() throws KettlePluginException { List<ValueMetaInterface> list = this.generateVList( new String[]{ "phobos", "demos", "mars" }, new int[]{ 6, 6, 6 } ); list.add( 1, integer ); RowMeta toMerge = new RowMeta(); toMerge.setValueMetaList( list ); rowMeta.mergeRowMeta( toMerge ); assertEquals( 7, rowMeta.size() ); list = rowMeta.getValueMetaList(); assertTrue( list.contains( integer ) ); ValueMetaInterface found = null; for ( ValueMetaInterface vm : list ) { if ( vm.getName().equals( "integer_1" ) ) { found = vm; break; } } assertNotNull( found ); }
@Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); }
RowMeta implements RowMetaInterface { @Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); } }
RowMeta implements RowMetaInterface { @Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); } RowMeta(); private  RowMeta( RowMeta rowMeta, Integer targetType ); private  RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCache rowMetaCache );  RowMeta( DataInputStream inputStream );  RowMeta( Node node ); }
RowMeta implements RowMetaInterface { @Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); } RowMeta(); private  RowMeta( RowMeta rowMeta, Integer targetType ); private  RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCache rowMetaCache );  RowMeta( DataInputStream inputStream );  RowMeta( Node node ); @Override RowMeta clone(); @Override RowMetaInterface cloneToType( int targetType ); @Override String toString(); @Override List<ValueMetaInterface> getValueMetaList(); @Override void setValueMetaList( List<ValueMetaInterface> valueMetaList ); @Override int size(); @Override boolean isEmpty(); @Override boolean exists( ValueMetaInterface meta ); @Override void addValueMeta( ValueMetaInterface meta ); @Override void addValueMeta( int index, ValueMetaInterface meta ); @Override ValueMetaInterface getValueMeta( int index ); @Override void setValueMeta( int index, ValueMetaInterface valueMeta ); @Override String getString( Object[] dataRow, int index ); @Override Long getInteger( Object[] dataRow, int index ); @Override Double getNumber( Object[] dataRow, int index ); @Override Date getDate( Object[] dataRow, int index ); @Override BigDecimal getBigNumber( Object[] dataRow, int index ); @Override Boolean getBoolean( Object[] dataRow, int index ); @Override byte[] getBinary( Object[] dataRow, int index ); @Override boolean isNull( Object[] dataRow, int index ); @Override Object[] cloneRow( Object[] objects ); @Override Object[] cloneRow( Object[] objects, Object[] newObjects ); @Override String getString( Object[] dataRow, String valueName, String defaultValue ); @Override Long getInteger( Object[] dataRow, String valueName, Long defaultValue ); @Override Date getDate( Object[] dataRow, String valueName, Date defaultValue ); @Override int indexOfValue( String valueName ); @Override ValueMetaInterface searchValueMeta( String valueName ); @Override void addRowMeta( RowMetaInterface rowMeta ); @Override void mergeRowMeta( RowMetaInterface r ); @Override void mergeRowMeta( RowMetaInterface r, String originStepName ); @Override String[] getFieldNames(); @Override void writeData( DataOutputStream outputStream, Object[] data ); @Override void writeMeta( DataOutputStream outputStream ); @Override Object[] readData( DataInputStream inputStream ); @Override void clear(); @Override void removeValueMeta( String valueName ); @Override void removeValueMeta( int index ); @Override String toStringMeta(); @Override String getString( Object[] row ); @Override String[] getFieldNamesAndTypes( int maxlen ); @Override int compare( Object[] rowData1, Object[] rowData2, int[] fieldnrs ); @Override boolean equals( Object[] rowData1, Object[] rowData2, int[] fieldnrs ); @Override int compare( Object[] rowData1, Object[] rowData2, int[] fieldnrs1, int[] fieldnrs2 ); @Override int compare( Object[] rowData1, RowMetaInterface rowMeta2, Object[] rowData2, int[] fieldnrs1,
                      int[] fieldnrs2 ); @Override int compare( Object[] rowData1, Object[] rowData2 ); @Override @Deprecated int oldXORHashCode( Object[] rowData ); @Override int hashCode( Object[] rowData ); @Override int convertedValuesHashCode( Object[] rowData ); static byte[] extractData( RowMetaInterface metadata, Object[] row ); static Object[] getRow( RowMetaInterface metadata, byte[] data ); static Row createOriginalRow( RowMetaInterface rowMeta, Object[] rowData ); @Override String getMetaXML(); @Override String getDataXML( Object[] rowData ); @Override Object[] getRow( Node node ); }
RowMeta implements RowMetaInterface { @Override public void mergeRowMeta( RowMetaInterface r ) { mergeRowMeta( r, null ); } RowMeta(); private  RowMeta( RowMeta rowMeta, Integer targetType ); private  RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCache rowMetaCache );  RowMeta( DataInputStream inputStream );  RowMeta( Node node ); @Override RowMeta clone(); @Override RowMetaInterface cloneToType( int targetType ); @Override String toString(); @Override List<ValueMetaInterface> getValueMetaList(); @Override void setValueMetaList( List<ValueMetaInterface> valueMetaList ); @Override int size(); @Override boolean isEmpty(); @Override boolean exists( ValueMetaInterface meta ); @Override void addValueMeta( ValueMetaInterface meta ); @Override void addValueMeta( int index, ValueMetaInterface meta ); @Override ValueMetaInterface getValueMeta( int index ); @Override void setValueMeta( int index, ValueMetaInterface valueMeta ); @Override String getString( Object[] dataRow, int index ); @Override Long getInteger( Object[] dataRow, int index ); @Override Double getNumber( Object[] dataRow, int index ); @Override Date getDate( Object[] dataRow, int index ); @Override BigDecimal getBigNumber( Object[] dataRow, int index ); @Override Boolean getBoolean( Object[] dataRow, int index ); @Override byte[] getBinary( Object[] dataRow, int index ); @Override boolean isNull( Object[] dataRow, int index ); @Override Object[] cloneRow( Object[] objects ); @Override Object[] cloneRow( Object[] objects, Object[] newObjects ); @Override String getString( Object[] dataRow, String valueName, String defaultValue ); @Override Long getInteger( Object[] dataRow, String valueName, Long defaultValue ); @Override Date getDate( Object[] dataRow, String valueName, Date defaultValue ); @Override int indexOfValue( String valueName ); @Override ValueMetaInterface searchValueMeta( String valueName ); @Override void addRowMeta( RowMetaInterface rowMeta ); @Override void mergeRowMeta( RowMetaInterface r ); @Override void mergeRowMeta( RowMetaInterface r, String originStepName ); @Override String[] getFieldNames(); @Override void writeData( DataOutputStream outputStream, Object[] data ); @Override void writeMeta( DataOutputStream outputStream ); @Override Object[] readData( DataInputStream inputStream ); @Override void clear(); @Override void removeValueMeta( String valueName ); @Override void removeValueMeta( int index ); @Override String toStringMeta(); @Override String getString( Object[] row ); @Override String[] getFieldNamesAndTypes( int maxlen ); @Override int compare( Object[] rowData1, Object[] rowData2, int[] fieldnrs ); @Override boolean equals( Object[] rowData1, Object[] rowData2, int[] fieldnrs ); @Override int compare( Object[] rowData1, Object[] rowData2, int[] fieldnrs1, int[] fieldnrs2 ); @Override int compare( Object[] rowData1, RowMetaInterface rowMeta2, Object[] rowData2, int[] fieldnrs1,
                      int[] fieldnrs2 ); @Override int compare( Object[] rowData1, Object[] rowData2 ); @Override @Deprecated int oldXORHashCode( Object[] rowData ); @Override int hashCode( Object[] rowData ); @Override int convertedValuesHashCode( Object[] rowData ); static byte[] extractData( RowMetaInterface metadata, Object[] row ); static Object[] getRow( RowMetaInterface metadata, byte[] data ); static Row createOriginalRow( RowMetaInterface rowMeta, Object[] rowData ); @Override String getMetaXML(); @Override String getDataXML( Object[] rowData ); @Override Object[] getRow( Node node ); static final String XML_META_TAG; static final String XML_DATA_TAG; }