/** * Returns an exact copy of this row. On purpose not the real clone() method (notice the uppercase 'C') because of * (rhino) javascript problems with it. * * @return an exact copy of this row */ public synchronized Row Clone() { return new Row( this ); }
public static final Row getRow( byte[] data, Row metadata ) { try { ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( data ); DataInputStream dataInputStream = new DataInputStream( byteArrayInputStream ); return new Row( dataInputStream, metadata.size(), metadata ); } catch ( Exception e ) { throw new RuntimeException( BaseMessages.getString( PKG, "Row.ErrorDeserializing" ), e ); } }
public static Row createOriginalRow( RowMetaInterface rowMeta, Object[] rowData ) throws KettleValueException { Row row = new Row(); for ( int i = 0; i < rowMeta.size(); i++ ) { ValueMetaInterface valueMeta = rowMeta.getValueMeta( i ); Object valueData = rowData[ i ]; Value value = valueMeta.createOriginalValue( valueData ); row.addValue( value ); } return row; }