public static final RowMetaAndData getResultRow( Result result, String upd, String ins, String del, String read ) { RowMetaAndData resultRow = new RowMetaAndData(); if ( upd != null && upd.length() > 0 ) { ValueMetaInterface meta = new ValueMetaInteger( upd ); meta.setLength( ValueMetaInterface.DEFAULT_INTEGER_LENGTH, 0 ); resultRow.addValue( meta, new Long( result.getNrLinesUpdated() ) ); } if ( ins != null && ins.length() > 0 ) { ValueMetaInterface meta = new ValueMetaInteger( ins ); meta.setLength( ValueMetaInterface.DEFAULT_INTEGER_LENGTH, 0 ); resultRow.addValue( meta, new Long( result.getNrLinesOutput() ) ); } if ( del != null && del.length() > 0 ) { ValueMetaInterface meta = new ValueMetaInteger( del ); meta.setLength( ValueMetaInterface.DEFAULT_INTEGER_LENGTH, 0 ); resultRow.addValue( meta, new Long( result.getNrLinesDeleted() ) ); } if ( read != null && read.length() > 0 ) { ValueMetaInterface meta = new ValueMetaInteger( read ); meta.setLength( ValueMetaInterface.DEFAULT_INTEGER_LENGTH, 0 ); resultRow.addValue( meta, new Long( result.getNrLinesRead() ) ); } return resultRow; }
public static final RowMetaAndData getResultRow( Result result, String upd, String ins, String del, String read ) { RowMetaAndData resultRow = new RowMetaAndData(); if ( upd != null && upd.length() > 0 ) { ValueMetaInterface meta = new ValueMetaInteger( upd ); meta.setLength( ValueMetaInterface.DEFAULT_INTEGER_LENGTH, 0 ); resultRow.addValue( meta, new Long( result.getNrLinesUpdated() ) ); } if ( ins != null && ins.length() > 0 ) { ValueMetaInterface meta = new ValueMetaInteger( ins ); meta.setLength( ValueMetaInterface.DEFAULT_INTEGER_LENGTH, 0 ); resultRow.addValue( meta, new Long( result.getNrLinesOutput() ) ); } if ( del != null && del.length() > 0 ) { ValueMetaInterface meta = new ValueMetaInteger( del ); meta.setLength( ValueMetaInterface.DEFAULT_INTEGER_LENGTH, 0 ); resultRow.addValue( meta, new Long( result.getNrLinesDeleted() ) ); } if ( read != null && read.length() > 0 ) { ValueMetaInterface meta = new ValueMetaInteger( read ); meta.setLength( ValueMetaInterface.DEFAULT_INTEGER_LENGTH, 0 ); resultRow.addValue( meta, new Long( result.getNrLinesRead() ) ); } return resultRow; }
value = 0; if ( previousResult != null ) { value = previousResult.getNrLinesDeleted();
/** * Add the numbers of lines from a different result to this result * * @param res * The Result object from which to add */ public void add( Result res ) { nrLinesInput += res.getNrLinesInput(); nrLinesOutput += res.getNrLinesOutput(); nrLinesRead += res.getNrLinesRead(); nrLinesWritten += res.getNrLinesWritten(); nrLinesUpdated += res.getNrLinesUpdated(); nrLinesRejected += res.getNrLinesRejected(); nrLinesDeleted += res.getNrLinesDeleted(); nrErrors += res.getNrErrors(); nrFilesRetrieved += res.getNrFilesRetrieved(); resultFiles.putAll( res.getResultFiles() ); logChannelId = res.getLogChannelId(); logText = res.getLogText(); rows.addAll( res.getRows() ); }
tip.append( "Lines updated : " ).append( result.getNrLinesUpdated() ).append( Const.CR ); if ( result.getNrLinesDeleted() > 0 ) { tip.append( "Lines deleted : " ).append( result.getNrLinesDeleted() ).append( Const.CR );
outputRow[ idx++ ] = Long.valueOf( result.getNrLinesDeleted() );
outputRow[idx++] = Long.valueOf( result.getNrLinesDeleted() );
assertEquals( internalResult.getNrLinesRejected(), resultsRow[ 6 ] ); assertEquals( internalResult.getNrLinesUpdated(), resultsRow[ 7 ] ); assertEquals( internalResult.getNrLinesDeleted(), resultsRow[ 8 ] ); assertEquals( internalResult.getNrFilesRetrieved(), resultsRow[ 9 ] ); assertEquals( internalResult.getExitStatus(), ( (Number) resultsRow[ 10 ] ).intValue() );