FINERACT-2181: Format enums

This commit is contained in:
Adam Saghy
2025-05-22 17:13:49 +02:00
parent 47d5330802
commit ecac6d2153
159 changed files with 757 additions and 307 deletions
@@ -35,8 +35,11 @@ public final class CollateralApiConstants {
***/
public enum CollateralJSONinputParams {
LOAN_ID("loanId"), COLLATERAL_ID("collateralId"), COLLATERAL_TYPE_ID("collateralTypeId"), VALUE("value"), DESCRIPTION(
"description");
LOAN_ID("loanId"), //
COLLATERAL_ID("collateralId"), //
COLLATERAL_TYPE_ID("collateralTypeId"), //
VALUE("value"), //
DESCRIPTION("description"); //
private final String value;
@@ -20,9 +20,16 @@ package org.apache.fineract.portfolio.collateralmanagement.api;
public enum CollateralManagementJsonInputParams {
NAME("name"), QUALITY("quality"), BASE_PRICE("basePrice"), UNIT_TYPE("unitType"), PCT_TO_BASE("pctToBase"), CURRENCY(
"currency"), COLLATERAL_PRODUCT_READ_PERMISSION("COLLATERAL_PRODUCT"), CLIENT_COLLATERAL_PRODUCT_READ_PERMISSION(
"CLIENT_COLLATERAL_PRODUCT"), QUANTITY("quantity"), TOTAL_COLLATERAL_VALUE("totalCollateralValue");
NAME("name"), //
QUALITY("quality"), //
BASE_PRICE("basePrice"), //
UNIT_TYPE("unitType"), //
PCT_TO_BASE("pctToBase"), //
CURRENCY("currency"), //
COLLATERAL_PRODUCT_READ_PERMISSION("COLLATERAL_PRODUCT"), //
CLIENT_COLLATERAL_PRODUCT_READ_PERMISSION("CLIENT_COLLATERAL_PRODUCT"), //
QUANTITY("quantity"), //
TOTAL_COLLATERAL_VALUE("totalCollateralValue"); //
private final String value;
@@ -19,5 +19,6 @@
package org.apache.fineract.portfolio.delinquency.domain;
public enum DelinquencyAction {
PAUSE, RESUME
PAUSE, //
RESUME //
}
@@ -26,7 +26,8 @@ import org.apache.fineract.infrastructure.core.api.ApiFacingEnum;
@RequiredArgsConstructor
public enum LoanCapitalizedIncomeType implements ApiFacingEnum<LoanCapitalizedIncomeType> {
FEE("capitalizedIncome.incomeType.fee", "Fee"), INTEREST("capitalizedIncome.incomeType.interest", "Interest");
FEE("capitalizedIncome.incomeType.fee", "Fee"), //
INTEREST("capitalizedIncome.incomeType.interest", "Interest"); //
private final String code;
private final String humanReadableName;
@@ -992,7 +992,8 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
}
public enum PaymentAction {
PAY, UNPAY
PAY, //
UNPAY //
}
public boolean isTransactionDateWithinPeriod(LocalDate referenceDate) {
@@ -34,11 +34,24 @@ public final class GuarantorConstants {
***/
public enum GuarantorJSONinputParams {
LOAN_ID("loanId"), CLIENT_RELATIONSHIP_TYPE_ID("clientRelationshipTypeId"), GUARANTOR_TYPE_ID("guarantorTypeId"), ENTITY_ID(
"entityId"), FIRSTNAME("firstname"), LASTNAME(
"lastname"), ADDRESS_LINE_1("addressLine1"), ADDRESS_LINE_2("addressLine2"), CITY("city"), STATE("state"), ZIP(
"zip"), COUNTRY("country"), MOBILE_NUMBER("mobileNumber"), PHONE_NUMBER("housePhoneNumber"), COMMENT(
"comment"), DATE_OF_BIRTH("dob"), AMOUNT("amount"), SAVINGS_ID("savingsId");
LOAN_ID("loanId"), //
CLIENT_RELATIONSHIP_TYPE_ID("clientRelationshipTypeId"), //
GUARANTOR_TYPE_ID("guarantorTypeId"), //
ENTITY_ID("entityId"), //
FIRSTNAME("firstname"), //
LASTNAME("lastname"), //
ADDRESS_LINE_1("addressLine1"), //
ADDRESS_LINE_2("addressLine2"), //
CITY("city"), //
STATE("state"), //
ZIP("zip"), //
COUNTRY("country"), //
MOBILE_NUMBER("mobileNumber"), //
PHONE_NUMBER("housePhoneNumber"), //
COMMENT("comment"), //
DATE_OF_BIRTH("dob"), //
AMOUNT("amount"), //
SAVINGS_ID("savingsId"); //
private final String value;
@@ -23,7 +23,9 @@ import java.util.Map;
public enum GuarantorType {
CUSTOMER(1, "guarantor.existing.customer"), STAFF(2, "guarantor.staff"), EXTERNAL(3, "guarantor.external");
CUSTOMER(1, "guarantor.existing.customer"), //
STAFF(2, "guarantor.staff"), //
EXTERNAL(3, "guarantor.external"); //
private final Integer value;
private final String code;
@@ -28,7 +28,8 @@ import org.apache.fineract.infrastructure.core.data.EnumOptionData;
@RequiredArgsConstructor
public enum LoanScheduleType {
CUMULATIVE("Cumulative"), PROGRESSIVE("Progressive");
CUMULATIVE("Cumulative"), //
PROGRESSIVE("Progressive"); //
private final String humanReadableName;
@@ -22,7 +22,7 @@ public enum AmortizationMethod {
EQUAL_PRINCIPAL(0, "amortizationType.equal.principal"), //
EQUAL_INSTALLMENTS(1, "amortizationType.equal.installments"), //
INVALID(2, "amortizationType.invalid");
INVALID(2, "amortizationType.invalid"); //
private final Integer value;
private final String code;
@@ -30,7 +30,7 @@ import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType;
@RequiredArgsConstructor
public enum CreditAllocationTransactionType {
CHARGEBACK(LoanTransactionType.CHARGEBACK, "Chargeback");
CHARGEBACK(LoanTransactionType.CHARGEBACK, "Chargeback"); //
private final LoanTransactionType loanTransactionType;
private final String humanReadableName;
@@ -22,7 +22,7 @@ public enum InterestCalculationPeriodMethod {
DAILY(0, "interestCalculationPeriodType.daily"), //
SAME_AS_REPAYMENT_PERIOD(1, "interestCalculationPeriodType.same.as.repayment.period"), //
INVALID(2, "interestCalculationPeriodType.invalid");
INVALID(2, "interestCalculationPeriodType.invalid"); //
private final Integer value;
private final String code;
@@ -20,7 +20,9 @@ package org.apache.fineract.portfolio.loanproduct.domain;
public enum InterestMethod {
DECLINING_BALANCE(0, "interestType.declining.balance"), FLAT(1, "interestType.flat"), INVALID(2, "interestType.invalid");
DECLINING_BALANCE(0, "interestType.declining.balance"), //
FLAT(1, "interestType.flat"), //
INVALID(2, "interestType.invalid"); //
private final Integer value;
private final String code;
@@ -36,7 +36,7 @@ public enum InterestRecalculationCompoundingMethod {
NONE(0, "interestRecalculationCompoundingMethod.none"), //
INTEREST(1, "interestRecalculationCompoundingMethod.interest"), //
FEE(2, "interestRecalculationCompoundingMethod.fee"), //
INTEREST_AND_FEE(3, "interestRecalculationCompoundingMethod.interest.and.fee");
INTEREST_AND_FEE(3, "interestRecalculationCompoundingMethod.interest.and.fee"); //
private final Integer value;
private final String code;
@@ -40,7 +40,7 @@ public enum InterestRecalculationPeriodMethod {
WEEKLY(2, "interestRecalculationPeriodMethod.weekly"), //
FORTNIGHTLY(3, "interestRecalculationPeriodMethod.fortnightly"), //
MONTHLY(4, "interestRecalculationPeriodMethod.monthly"), //
SAME_AS_REPAYMENT_PERIOD(5, "interestRecalculationPeriodMethod.same.as.repayment.period");
SAME_AS_REPAYMENT_PERIOD(5, "interestRecalculationPeriodMethod.same.as.repayment.period"); //
private final Integer value;
private final String code;