/** * Validates one rule / period / attribute option combo. * * @param optionCombo the attribute option combo. * @param leftSide left side value. * @param rightSide right side value. */ private void validateOptionCombo( String optionCombo, Double leftSide, Double rightSide ) { // Skipping any results we already know if ( context.skipValidationOfTuple( orgUnit, ruleX.getRule(), period, optionCombo, periodService.getDayInPeriod( period, new Date() ) ) ) { return; } boolean violation = isViolation( leftSide, rightSide ); if ( violation && !context.isAnalysisComplete() ) { validationResults.add( new ValidationResult( ruleX.getRule(), period, orgUnit, getAttributeOptionCombo( optionCombo ), roundSignificant( zeroIfNull( leftSide ) ), roundSignificant( zeroIfNull( rightSide ) ), periodService.getDayInPeriod( period, new Date() ) ) ); } }