FINERACT-2346: Refractor, Minor Sonar fixes and remove some deprecated code
This commit is contained in:
+1
-12
@@ -150,7 +150,7 @@ public class InterestIncentivesFields {
|
||||
public void validateIncentiveData(final DataValidatorBuilder baseDataValidator) {
|
||||
|
||||
switch (attributeName()) {
|
||||
case GENDER:
|
||||
case GENDER, CLIENT_CLASSIFICATION, CLIENT_TYPE:
|
||||
baseDataValidator.reset().parameter(attributeValueParamName).value(this.attributeValue).longGreaterThanZero();
|
||||
baseDataValidator.reset().parameter(conditionTypeParamName).value(this.conditionType)
|
||||
.isOneOfTheseValues(ConditionType.EQUAL.getValue(), ConditionType.NOT_EQUAL.getValue());
|
||||
@@ -158,17 +158,6 @@ public class InterestIncentivesFields {
|
||||
case AGE:
|
||||
baseDataValidator.reset().parameter(attributeValueParamName).value(this.attributeValue).longGreaterThanZero();
|
||||
break;
|
||||
case CLIENT_CLASSIFICATION:
|
||||
baseDataValidator.reset().parameter(attributeValueParamName).value(this.attributeValue).longGreaterThanZero();
|
||||
baseDataValidator.reset().parameter(conditionTypeParamName).value(this.conditionType)
|
||||
.isOneOfTheseValues(ConditionType.EQUAL.getValue(), ConditionType.NOT_EQUAL.getValue());
|
||||
break;
|
||||
case CLIENT_TYPE:
|
||||
baseDataValidator.reset().parameter(attributeValueParamName).value(this.attributeValue).longGreaterThanZero();
|
||||
baseDataValidator.reset().parameter(conditionTypeParamName).value(this.conditionType)
|
||||
.isOneOfTheseValues(ConditionType.EQUAL.getValue(), ConditionType.NOT_EQUAL.getValue());
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ public enum InterestIncentiveEntityType {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name().toString().replaceAll("_", " ");
|
||||
return name().replace("_", " ");
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
|
||||
Reference in New Issue
Block a user