private Verification getVerification ( VerificationType verificationType ) throws RuleException { if ( verificationType != null ) { RowCountVerificationType rowCountVerificationType = verificationType . getRowCount ( ) ; AggregationVerificationType aggregationVerificationType = verificationType . getAggregation ( ) ; if ( aggregationVerificationType != null ) { return AggregationVerification . builder ( ) . column ( aggregationVerificationType . getColumn ( ) ) . min ( aggregationVerificationType . getMin ( ) ) . max ( aggregationVerificationType . getMax ( ) ) . build ( ) ; } else if ( rowCountVerificationType != null ) { return RowCountVerification . builder ( ) . min ( rowCountVerificationType . getMin ( ) ) . max ( rowCountVerificationType . getMax ( ) ) . build ( ) ; } else { throw new RuleException ( "Unsupported verification " + verificationType ) ; } } return null ; }
Read the verification definition .