Skip to content

Commit

Permalink
Regulating terminal and automaton as Boolean data type
Browse files Browse the repository at this point in the history
  • Loading branch information
thangqp committed Jun 14, 2024
1 parent 3df1d98 commit 42cd656
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ public static AbstractExpertRule entityToDto(ExpertRuleEntity filterEntity) {
}
case BOOLEAN -> {
ExpertRuleValueEntity booleanFilterEntity = (ExpertRuleValueEntity) filterEntity;
return BooleanExpertRule.builder()
BooleanExpertRule.BooleanExpertRuleBuilder<?, ?> ruleBuilder = BooleanExpertRule.builder()
.field(booleanFilterEntity.getField())
.operator(booleanFilterEntity.getOperator())
.value(Boolean.parseBoolean(booleanFilterEntity.getValue()))
.build();
.operator(booleanFilterEntity.getOperator());
if (booleanFilterEntity.getValue() != null) {
ruleBuilder.value(Boolean.parseBoolean(booleanFilterEntity.getValue()));
}
return ruleBuilder.build();
}
case NUMBER -> {
ExpertRuleValueEntity numberFilterEntity = (ExpertRuleValueEntity) filterEntity;
Expand Down

0 comments on commit 42cd656

Please sign in to comment.