Skip to content

Commit

Permalink
[#47] implement conditions for GREATER_AND_EQUALS_THAN and LESS_AND_E…
Browse files Browse the repository at this point in the history
…QUALS_THAN for method isValidValue
  • Loading branch information
hwalter67 committed Sep 3, 2023
1 parent 3e62c89 commit 8c83a22
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/org/opentdk/api/filter/FilterRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,18 @@ public boolean isValidValue(String val, String filterValue) {
if (Integer.valueOf(val) > Integer.valueOf(filterValue)) {
return true;
}
} else if(filterOperator.equals(EOperator.GREATER_OR_EQUAL_THAN)) {
if (Integer.valueOf(val) >= Integer.valueOf(filterValue)) {
return true;
}
} else if(filterOperator.equals(EOperator.LESS_THAN)) {
if (Integer.valueOf(val) < Integer.valueOf(filterValue)) {
return true;
}
} else if(filterOperator.equals(EOperator.LESS_OR_EQUAL_THAN)) {
if (Integer.valueOf(val) <= Integer.valueOf(filterValue)) {
return true;
}
} else if(filterOperator.equals(EOperator.NOT_EQUALS)) {

if((ruleFormat.equals(ERuleFormat.QUOTED_REGEX)) || (ruleFormat.equals(ERuleFormat.REGEX))) {
Expand Down

0 comments on commit 8c83a22

Please sign in to comment.