@Test public void testSetValueMetaList() throws KettlePluginException { List<ValueMetaInterface> setList = this.generateVList( new String[]{ "alpha", "bravo" }, new int[]{ 2, 2 } ); rowMeta.setValueMetaList( setList ); assertTrue( setList.contains( rowMeta.searchValueMeta( "alpha" ) ) ); assertTrue( setList.contains( rowMeta.searchValueMeta( "bravo" ) ) ); assertEquals( 0, rowMeta.indexOfValue( "alpha" ) ); assertEquals( 1, rowMeta.indexOfValue( "bravo" ) ); }
@Override public void setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList.get( i ); cache.storeMapping( valueMeta.getName(), i ); } } finally { lock.writeLock().unlock(); } }
RowMeta implements RowMetaInterface { @Override public void setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList.get( i ); cache.storeMapping( valueMeta.getName(), i ); } } finally { lock.writeLock().unlock(); } } }
RowMeta implements RowMetaInterface { @Override public void setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList.get( i ); cache.storeMapping( valueMeta.getName(), i ); } } finally { lock.writeLock().unlock(); } } 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 setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList.get( i ); cache.storeMapping( valueMeta.getName(), i ); } } finally { lock.writeLock().unlock(); } } 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 setValueMetaList( List<ValueMetaInterface> valueMetaList ) { lock.writeLock().lock(); try { this.valueMetaList = valueMetaList; this.cache.invalidate(); for ( int i = 0, len = valueMetaList.size(); i < len; i++ ) { ValueMetaInterface valueMeta = valueMetaList.get( i ); cache.storeMapping( valueMeta.getName(), i ); } } finally { lock.writeLock().unlock(); } } 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; }