// No cleanup necessary
}
@Override
protected boolean executeAction() throws Throwable {
ResultSetCompareAction compareAction = (ResultSetCompareAction) getActionDefinition();
Object obj1 = compareAction.getResultSet1().getValue();
if ( !( obj1 instanceof IPentahoResultSet ) ) {
error( Messages.getInstance().getErrorString( "ResultSetCompareComponent.ERROR_0004_INPUT_RS1_NOT_RS" ) ); //$NON-NLS-1$
return false;
}
Object obj2 = compareAction.getResultSet2().getValue();
if ( !( obj2 instanceof IPentahoResultSet ) ) {
error( Messages.getInstance().getErrorString( "ResultSetCompareComponent.ERROR_0005_INPUT_RS2_NOT_RS" ) ); //$NON-NLS-1$
return false;
}
IPentahoResultSet rs1 = (IPentahoResultSet) compareAction.getResultSet1().getValue();
IPentahoResultSet rs2 = (IPentahoResultSet) compareAction.getResultSet2().getValue();
String tempOutputMismatches = compareAction.getOutputMismatches().getStringValue();
boolean outputMismatches = false;
if ( ( tempOutputMismatches != null ) && tempOutputMismatches.trim().toLowerCase().equals( "true" ) ) { //$NON-NLS-1$
outputMismatches = true;
}
boolean stopOnError = false;
String tempStopOnError = compareAction.getStopOnError().getStringValue();
if ( ( tempStopOnError != null ) && tempStopOnError.trim().toLowerCase().equals( "true" ) ) { //$NON-NLS-1$
stopOnError = true;
}
int compareCol = Integer.parseInt( compareAction.getCompareColumnNum().getStringValue() );
return compareEquals( rs1, rs2, compareCol, outputMismatches, stopOnError );
}