This is an automated email from the ASF dual-hosted git repository.

adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 8a7e536bc7 FINERACT-2421: Refractor - If Else simplification and 
Lombok usage(Phase 9)
8a7e536bc7 is described below

commit 8a7e536bc76a994ca2434c2f24bdf33f57c399ea
Author: Aman Mittal <[email protected]>
AuthorDate: Sun Feb 15 19:41:02 2026 +0530

    FINERACT-2421: Refractor - If Else simplification and Lombok usage(Phase 9)
---
 .../loanschedule/domain/LoanApplicationTerms.java  | 271 +++++----------------
 .../data/LoanRescheduleRequestData.java            |  72 +-----
 .../data/LoanRescheduleRequestStatusEnumData.java  |  16 +-
 .../data/LoanRescheduleRequestTimelineData.java    |   2 +
 .../domain/LoanRescheduleModelRepaymentPeriod.java |   2 +
 .../domain/LoanRescheduleRequest.java              |  90 +------
 .../loanaccount/guarantor/domain/Guarantor.java    |  35 +--
 .../savings/domain/FixedDepositAccount.java        |   5 +-
 .../domain/InterestRateChartFields.java            |  17 +-
 .../savings/domain/DepositTermDetail.java          |   4 +-
 10 files changed, 81 insertions(+), 433 deletions(-)

diff --git 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java
 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java
index 5538605d6e..6841798a01 100644
--- 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java
+++ 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java
@@ -28,6 +28,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import lombok.Getter;
+import lombok.Setter;
 import org.apache.fineract.infrastructure.core.service.DateUtils;
 import org.apache.fineract.infrastructure.core.service.MathUtil;
 import org.apache.fineract.organisation.monetary.data.CurrencyData;
@@ -69,31 +70,48 @@ import 
org.apache.fineract.portfolio.loanproduct.domain.RepaymentStartDateType;
 
 public final class LoanApplicationTerms {
 
+    @Getter
     private CurrencyData currency;
 
+    @Getter
     private Calendar loanCalendar;
+    @Getter
     private Integer loanTermFrequency;
+    @Getter
     private PeriodFrequencyType loanTermPeriodFrequencyType;
+    @Getter
     private Integer numberOfRepayments;
     private Integer actualNumberOfRepayments;
+    @Getter
     private Integer repaymentEvery;
+    @Getter
     private PeriodFrequencyType repaymentPeriodFrequencyType;
 
     private long variationDays = 0L;
+    @Getter
     private Integer fixedLength;
+    @Getter
     private Integer nthDay;
 
+    @Getter
     private DayOfWeekType weekDayType;
+    @Getter
     private AmortizationMethod amortizationMethod;
 
+    @Getter
     private InterestMethod interestMethod;
     private BigDecimal interestRatePerPeriod;
     private PeriodFrequencyType interestRatePeriodFrequencyType;
+    @Getter
     private BigDecimal annualNominalInterestRate;
+    @Getter
     private InterestCalculationPeriodMethod interestCalculationPeriodMethod;
     private boolean allowPartialPeriodInterestCalculation;
 
+    @Setter
+    @Getter
     private Money principal;
+    @Getter
     private LocalDate expectedDisbursementDate;
     private LocalDate repaymentsStartingFromDate;
     private LocalDate calculatedRepaymentsStartingFromDate;
@@ -132,6 +150,7 @@ public final class LoanApplicationTerms {
      * interest should be charged.
      * </p>
      */
+    @Getter
     private LocalDate interestChargedFromDate;
     private Money inArrearsTolerance;
 
@@ -140,20 +159,29 @@ public final class LoanApplicationTerms {
     // added
     private LocalDate loanEndDate;
 
+    @Getter
     private List<DisbursementData> disbursementDatas;
 
     private boolean multiDisburseLoan;
 
+    @Setter
     private BigDecimal fixedEmiAmount;
 
+    @Setter
     private BigDecimal fixedPrincipalAmount;
 
+    @Getter
+    @Setter
     private BigDecimal currentPeriodFixedEmiAmount;
 
+    @Getter
+    @Setter
     private BigDecimal currentPeriodFixedPrincipalAmount;
 
+    @Getter
     private BigDecimal actualFixedEmiAmount;
 
+    @Getter
     private BigDecimal maxOutstandingBalance;
 
     private Money totalInterestDue;
@@ -162,34 +190,47 @@ public final class LoanApplicationTerms {
 
     private DaysInYearType daysInYearType;
 
+    @Getter
     private boolean interestRecalculationEnabled;
 
+    @Getter
     private LoanRescheduleStrategyMethod rescheduleStrategyMethod;
 
+    @Getter
     private InterestRecalculationCompoundingMethod 
interestRecalculationCompoundingMethod;
 
+    @Getter
     private CalendarInstance restCalendarInstance;
 
+    @Getter
     private RecalculationFrequencyType recalculationFrequencyType;
 
+    @Getter
     private CalendarInstance compoundingCalendarInstance;
 
+    @Getter
     private RecalculationFrequencyType compoundingFrequencyType;
     private boolean allowCompoundingOnEod;
 
     private BigDecimal principalThresholdForLastInstalment;
+    @Getter
     private Integer installmentAmountInMultiplesOf;
 
+    @Getter
     private LoanPreCloseInterestCalculationStrategy 
preClosureInterestCalculationStrategy;
 
+    @Getter
     private Money approvedPrincipal;
 
     private LoanTermVariationsDataWrapper variationsDataWrapper;
 
     private Money adjustPrincipalForFlatLoans;
 
+    @Getter
+    @Setter
     private LocalDate seedDate;
 
+    @Getter
     private CalendarHistoryDataWrapper calendarHistoryDataWrapper;
 
     private Boolean isInterestChargedFromDateSameAsDisbursalDateEnabled;
@@ -220,18 +261,27 @@ public final class LoanApplicationTerms {
     private int periodsCompleted = 0;
     private int extraPeriods = 0;
     private boolean isEqualAmortization;
+    @Setter
     private Money interestTobeApproppriated;
     private BigDecimal fixedPrincipalPercentagePerInstallment;
 
+    @Getter
+    @Setter
     private LocalDate newScheduledDueDateStart;
     private boolean isDownPaymentEnabled;
+    @Getter
     private BigDecimal disbursedAmountPercentageForDownPayment;
+    @Getter
     private Money downPaymentAmount;
     private boolean isAutoRepaymentForDownPaymentEnabled;
 
+    @Getter
     private RepaymentStartDateType repaymentStartDateType;
+    @Getter
     private LocalDate submittedOnDate;
+    @Setter
     private Money disbursedPrincipal;
+    @Getter
     private LoanScheduleType loanScheduleType;
     private LoanScheduleProcessingType loanScheduleProcessingType;
     private boolean enableAccrualActivityPosting;
@@ -1504,19 +1554,11 @@ public final class LoanApplicationTerms {
     }
 
     public boolean isPrincipalGraceApplicableForThisPeriod(final int 
periodNumber) {
-        boolean isPrincipalGraceApplicableForThisPeriod = false;
-        if 
(this.periodNumbersApplicableForPrincipalGrace.contains(periodNumber)) {
-            isPrincipalGraceApplicableForThisPeriod = true;
-        }
-        return isPrincipalGraceApplicableForThisPeriod;
+        return 
this.periodNumbersApplicableForPrincipalGrace.contains(periodNumber);
     }
 
     public boolean isInterestPaymentGraceApplicableForThisPeriod(final int 
periodNumber) {
-        boolean isInterestPaymentGraceApplicableForThisPeriod = false;
-        if 
(this.periodNumbersApplicableForInterestGrace.contains(periodNumber)) {
-            isInterestPaymentGraceApplicableForThisPeriod = true;
-        }
-        return isInterestPaymentGraceApplicableForThisPeriod;
+        return 
this.periodNumbersApplicableForInterestGrace.contains(periodNumber);
     }
 
     private boolean isFirstPeriodAfterInterestPaymentGracePeriod(final int 
periodNumber) {
@@ -1662,12 +1704,7 @@ public final class LoanApplicationTerms {
                 principalFeePeriods++;
             }
         }
-        Integer periodsRemaining = totalNumberOfRepaymentPeriods - 
periodsElapsed - principalFeePeriods;
-        return periodsRemaining;
-    }
-
-    public void setFixedPrincipalAmount(BigDecimal fixedPrincipalAmount) {
-        this.fixedPrincipalAmount = fixedPrincipalAmount;
+        return totalNumberOfRepaymentPeriods - periodsElapsed - 
principalFeePeriods;
     }
 
     private Money calculatePrincipalDueForInstallment(final int periodNumber, 
final Money totalDuePerInstallment,
@@ -1718,62 +1755,14 @@ public final class LoanApplicationTerms {
                 preClosureInterestCalculationStrategy, 
allowFullTermForTranche, loanScheduleProcessingType);
     }
 
-    public Integer getLoanTermFrequency() {
-        return this.loanTermFrequency;
-    }
-
-    public PeriodFrequencyType getLoanTermPeriodFrequencyType() {
-        return this.loanTermPeriodFrequencyType;
-    }
-
-    public Integer getRepaymentEvery() {
-        return this.repaymentEvery;
-    }
-
-    public PeriodFrequencyType getRepaymentPeriodFrequencyType() {
-        return this.repaymentPeriodFrequencyType;
-    }
-
     public LocalDate getRepaymentStartFromDate() {
         return this.repaymentsStartingFromDate;
     }
 
-    public LocalDate getInterestChargedFromDate() {
-        return this.interestChargedFromDate;
-    }
-
-    public void setPrincipal(Money principal) {
-        this.principal = principal;
-    }
-
-    public void setDisbursedPrincipal(Money disbursedPrincipal) {
-        this.disbursedPrincipal = disbursedPrincipal;
-    }
-
     public LocalDate getInterestChargedFromLocalDate() {
         return this.interestChargedFromDate;
     }
 
-    public InterestMethod getInterestMethod() {
-        return this.interestMethod;
-    }
-
-    public AmortizationMethod getAmortizationMethod() {
-        return this.amortizationMethod;
-    }
-
-    public CurrencyData getCurrency() {
-        return currency;
-    }
-
-    public Integer getNumberOfRepayments() {
-        return this.numberOfRepayments;
-    }
-
-    public LocalDate getExpectedDisbursementDate() {
-        return this.expectedDisbursementDate;
-    }
-
     public LocalDate getRepaymentsStartingFromLocalDate() {
         return this.repaymentsStartingFromDate;
     }
@@ -1782,18 +1771,6 @@ public final class LoanApplicationTerms {
         return this.calculatedRepaymentsStartingFromDate;
     }
 
-    public Money getPrincipal() {
-        return this.principal;
-    }
-
-    public Money getApprovedPrincipal() {
-        return this.approvedPrincipal;
-    }
-
-    public List<DisbursementData> getDisbursementDatas() {
-        return this.disbursementDatas;
-    }
-
     public boolean isMultiDisburseLoan() {
         return this.multiDisburseLoan;
     }
@@ -1803,10 +1780,6 @@ public final class LoanApplicationTerms {
         return Money.of(getCurrency(), this.maxOutstandingBalance);
     }
 
-    public BigDecimal getMaxOutstandingBalance() {
-        return maxOutstandingBalance;
-    }
-
     public BigDecimal getFixedEmiAmount() {
         BigDecimal fixedEmiAmount = this.fixedEmiAmount;
         if (getCurrentPeriodFixedEmiAmount() != null) {
@@ -1815,18 +1788,6 @@ public final class LoanApplicationTerms {
         return fixedEmiAmount;
     }
 
-    public Integer getNthDay() {
-        return this.nthDay;
-    }
-
-    public DayOfWeekType getWeekDayType() {
-        return this.weekDayType;
-    }
-
-    public void setFixedEmiAmount(BigDecimal fixedEmiAmount) {
-        this.fixedEmiAmount = fixedEmiAmount;
-    }
-
     public void resetFixedEmiAmount() {
         this.fixedEmiAmount = this.actualFixedEmiAmount;
     }
@@ -1843,22 +1804,6 @@ public final class LoanApplicationTerms {
         return isInterestBearing() && isInterestRecalculationEnabled();
     }
 
-    public boolean isInterestRecalculationEnabled() {
-        return this.interestRecalculationEnabled;
-    }
-
-    public LoanRescheduleStrategyMethod getRescheduleStrategyMethod() {
-        return this.rescheduleStrategyMethod;
-    }
-
-    public InterestRecalculationCompoundingMethod 
getInterestRecalculationCompoundingMethod() {
-        return this.interestRecalculationCompoundingMethod;
-    }
-
-    public CalendarInstance getRestCalendarInstance() {
-        return this.restCalendarInstance;
-    }
-
     private boolean isFallingInRepaymentPeriod(LocalDate fromDate, LocalDate 
toDate) {
         boolean isSameAsRepaymentPeriod = false;
         if 
(this.interestCalculationPeriodMethod.getValue().equals(InterestCalculationPeriodMethod.SAME_AS_REPAYMENT_PERIOD.getValue()))
 {
@@ -1868,14 +1813,8 @@ public final class LoanApplicationTerms {
                     isSameAsRepaymentPeriod = (days % 7) == 0;
                 break;
                 case MONTHS:
-                    boolean isFromDateOnEndDate = false;
-                    if (fromDate.getDayOfMonth() > 
fromDate.plusDays(1).getDayOfMonth()) {
-                        isFromDateOnEndDate = true;
-                    }
-                    boolean isToDateOnEndDate = false;
-                    if (toDate.getDayOfMonth() > 
toDate.plusDays(1).getDayOfMonth()) {
-                        isToDateOnEndDate = true;
-                    }
+                    boolean isFromDateOnEndDate = fromDate.getDayOfMonth() > 
fromDate.plusDays(1).getDayOfMonth();
+                    boolean isToDateOnEndDate = toDate.getDayOfMonth() > 
toDate.plusDays(1).getDayOfMonth();
 
                     if (isFromDateOnEndDate && isToDateOnEndDate) {
                         isSameAsRepaymentPeriod = true;
@@ -1915,10 +1854,6 @@ public final class LoanApplicationTerms {
         return numberOfPeriods;
     }
 
-    public RecalculationFrequencyType getRecalculationFrequencyType() {
-        return this.recalculationFrequencyType;
-    }
-
     public void updateNumberOfRepayments(final Integer numberOfRepayments) {
         this.numberOfRepayments = numberOfRepayments;
         this.actualNumberOfRepayments = numberOfRepayments + 
getLoanTermVariations().adjustNumberOfRepayments();
@@ -1945,10 +1880,6 @@ public final class LoanApplicationTerms {
         }
     }
 
-    public BigDecimal getAnnualNominalInterestRate() {
-        return this.annualNominalInterestRate;
-    }
-
     public void updateInterestChargedFromDate(LocalDate 
interestChargedFromDate) {
         if (interestChargedFromDate != null) {
             this.interestChargedFromDate = interestChargedFromDate;
@@ -1965,30 +1896,6 @@ public final class LoanApplicationTerms {
         this.totalInterestDue = totalInterestDue;
     }
 
-    public InterestCalculationPeriodMethod 
getInterestCalculationPeriodMethod() {
-        return this.interestCalculationPeriodMethod;
-    }
-
-    public LoanPreCloseInterestCalculationStrategy 
getPreClosureInterestCalculationStrategy() {
-        return this.preClosureInterestCalculationStrategy;
-    }
-
-    public CalendarInstance getCompoundingCalendarInstance() {
-        return this.compoundingCalendarInstance;
-    }
-
-    public RecalculationFrequencyType getCompoundingFrequencyType() {
-        return this.compoundingFrequencyType;
-    }
-
-    public BigDecimal getActualFixedEmiAmount() {
-        return this.actualFixedEmiAmount;
-    }
-
-    public Calendar getLoanCalendar() {
-        return loanCalendar;
-    }
-
     public BigDecimal getFixedPrincipalAmount() {
         BigDecimal fixedPrincipalAmount = this.fixedPrincipalAmount;
         if (getCurrentPeriodFixedPrincipalAmount() != null) {
@@ -2001,34 +1908,10 @@ public final class LoanApplicationTerms {
         return this.variationsDataWrapper;
     }
 
-    public BigDecimal getCurrentPeriodFixedEmiAmount() {
-        return this.currentPeriodFixedEmiAmount;
-    }
-
-    public void setCurrentPeriodFixedEmiAmount(BigDecimal 
currentPeriodFixedEmiAmount) {
-        this.currentPeriodFixedEmiAmount = currentPeriodFixedEmiAmount;
-    }
-
-    public BigDecimal getCurrentPeriodFixedPrincipalAmount() {
-        return this.currentPeriodFixedPrincipalAmount;
-    }
-
-    public void setCurrentPeriodFixedPrincipalAmount(BigDecimal 
currentPeriodFixedPrincipalAmount) {
-        this.currentPeriodFixedPrincipalAmount = 
currentPeriodFixedPrincipalAmount;
-    }
-
     public Integer fetchNumberOfRepaymentsAfterExceptions() {
         return this.actualNumberOfRepayments;
     }
 
-    public LocalDate getSeedDate() {
-        return this.seedDate;
-    }
-
-    public CalendarHistoryDataWrapper getCalendarHistoryDataWrapper() {
-        return this.calendarHistoryDataWrapper;
-    }
-
     public Boolean isInterestChargedFromDateSameAsDisbursalDateEnabled() {
         return this.isInterestChargedFromDateSameAsDisbursalDateEnabled;
     }
@@ -2150,10 +2033,6 @@ public final class LoanApplicationTerms {
         this.totalInterestAccounted = totalInterestAccounted;
     }
 
-    public void setSeedDate(LocalDate seedDate) {
-        this.seedDate = seedDate;
-    }
-
     public boolean isEqualAmortization() {
         return isEqualAmortization;
     }
@@ -2170,10 +2049,6 @@ public final class LoanApplicationTerms {
         return interestTobeApproppriated == null ? this.principal.zero() : 
interestTobeApproppriated;
     }
 
-    public void setInterestTobeApproppriated(Money interestTobeApproppriated) {
-        this.interestTobeApproppriated = interestTobeApproppriated;
-    }
-
     public Boolean isInterestTobeApproppriated() {
         return interestTobeApproppriated != null && 
interestTobeApproppriated.isGreaterThanZero();
     }
@@ -2186,46 +2061,10 @@ public final class LoanApplicationTerms {
         return isPrincipalCompoundingDisabledForOverdueLoans;
     }
 
-    public LocalDate getNewScheduledDueDateStart() {
-        return newScheduledDueDateStart;
-    }
-
-    public void setNewScheduledDueDateStart(LocalDate 
newScheduledDueDateStart) {
-        this.newScheduledDueDateStart = newScheduledDueDateStart;
-    }
-
     public boolean isDownPaymentEnabled() {
         return isDownPaymentEnabled;
     }
 
-    public BigDecimal getDisbursedAmountPercentageForDownPayment() {
-        return disbursedAmountPercentageForDownPayment;
-    }
-
-    public RepaymentStartDateType getRepaymentStartDateType() {
-        return repaymentStartDateType;
-    }
-
-    public LocalDate getSubmittedOnDate() {
-        return submittedOnDate;
-    }
-
-    public Integer getInstallmentAmountInMultiplesOf() {
-        return installmentAmountInMultiplesOf;
-    }
-
-    public LoanScheduleType getLoanScheduleType() {
-        return loanScheduleType;
-    }
-
-    public Money getDownPaymentAmount() {
-        return downPaymentAmount;
-    }
-
-    public Integer getFixedLength() {
-        return fixedLength;
-    }
-
     public LocalDate calculateMaxDateForFixedLength() {
         final LocalDate startDate = getRepaymentStartDate();
         LocalDate maxDateForFixedLength = null;
diff --git 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java
 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java
index 017abc198a..1312be79da 100644
--- 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java
+++ 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java
@@ -20,12 +20,14 @@ package 
org.apache.fineract.portfolio.loanaccount.rescheduleloan.data;
 
 import java.time.LocalDate;
 import java.util.Collection;
+import lombok.Getter;
 import org.apache.fineract.infrastructure.codes.data.CodeValueData;
 import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData;
 
 /**
  * Immutable data object representing loan reschedule request data.
  **/
+@Getter
 public final class LoanRescheduleRequestData {
 
     private final Long id;
@@ -126,41 +128,6 @@ public final class LoanRescheduleRequestData {
                 rescheduleReasonCodeValue);
     }
 
-    /**
-     * @return the id
-     */
-    public Long getId() {
-        return id;
-    }
-
-    /**
-     * @return the loanId
-     */
-    public Long getLoanId() {
-        return loanId;
-    }
-
-    /**
-     * @return the statusEnum
-     */
-    public LoanRescheduleRequestStatusEnumData getStatusEnum() {
-        return statusEnum;
-    }
-
-    /**
-     * @return the reschedule from installment number
-     */
-    public Integer getRescheduleFromInstallment() {
-        return rescheduleFromInstallment;
-    }
-
-    /**
-     * @return the reschedule from date
-     */
-    public LocalDate getRescheduleFromDate() {
-        return rescheduleFromDate;
-    }
-
     /**
      * @return the rescheduleReasonCodeValueId
      */
@@ -168,41 +135,6 @@ public final class LoanRescheduleRequestData {
         return rescheduleReasonCodeValue;
     }
 
-    /**
-     * @return the rescheduleReasonText
-     */
-    public String getRescheduleReasonComment() {
-        return rescheduleReasonComment;
-    }
-
-    /**
-     * @return the timeline
-     **/
-    public LoanRescheduleRequestTimelineData getTimeline() {
-        return this.timeline;
-    }
-
-    /**
-     * @return the clientName
-     */
-    public String getClientName() {
-        return clientName;
-    }
-
-    /**
-     * @return the loanAccountNumber
-     */
-    public String getLoanAccountNumber() {
-        return loanAccountNumber;
-    }
-
-    /**
-     * @return the clientId
-     */
-    public Long getClientId() {
-        return clientId;
-    }
-
     /**
      * @return the recalculateInterest
      */
diff --git 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestStatusEnumData.java
 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestStatusEnumData.java
index 087cdd6c46..6685101639 100644
--- 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestStatusEnumData.java
+++ 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestStatusEnumData.java
@@ -18,11 +18,15 @@
  */
 package org.apache.fineract.portfolio.loanaccount.rescheduleloan.data;
 
+import lombok.Getter;
+import lombok.experimental.Accessors;
 import org.apache.fineract.portfolio.loanaccount.domain.LoanStatus;
 
 /**
  * Immutable data object represent loan reschedule request status enumerations.
  **/
+@Getter
+@Accessors(fluent = true)
 public class LoanRescheduleRequestStatusEnumData {
 
     private final Long id;
@@ -46,18 +50,6 @@ public class LoanRescheduleRequestStatusEnumData {
         this.rejected = 
Long.valueOf(LoanStatus.REJECTED.getValue()).equals(this.id);
     }
 
-    public Long id() {
-        return this.id;
-    }
-
-    public String code() {
-        return this.code;
-    }
-
-    public String value() {
-        return this.value;
-    }
-
     public boolean isPendingApproval() {
         return this.pendingApproval;
     }
diff --git 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java
 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java
index 8715f01643..d9b70f18fa 100644
--- 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java
+++ 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java
@@ -19,11 +19,13 @@
 package org.apache.fineract.portfolio.loanaccount.rescheduleloan.data;
 
 import java.time.LocalDate;
+import lombok.Data;
 
 /**
  * Immutable data object represent the timeline events of a loan reschedule 
request
  **/
 @SuppressWarnings("unused")
+@Data
 public class LoanRescheduleRequestTimelineData {
 
     private final LocalDate submittedOnDate;
diff --git 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModelRepaymentPeriod.java
 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModelRepaymentPeriod.java
index 06a5428ac4..b487c862c4 100644
--- 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModelRepaymentPeriod.java
+++ 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModelRepaymentPeriod.java
@@ -20,9 +20,11 @@ package 
org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
+import lombok.Setter;
 import org.apache.fineract.organisation.monetary.domain.Money;
 import 
org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanSchedulePeriodData;
 
+@Setter
 public final class LoanRescheduleModelRepaymentPeriod implements 
LoanRescheduleModalPeriod {
 
     private int periodNumber;
diff --git 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java
 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java
index b8211af7e4..ef743f0038 100644
--- 
a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java
+++ 
b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java
@@ -30,6 +30,7 @@ import java.time.LocalDate;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import lombok.Getter;
 import org.apache.fineract.infrastructure.codes.domain.CodeValue;
 import 
org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
 import org.apache.fineract.portfolio.loanaccount.domain.Loan;
@@ -40,6 +41,7 @@ import org.apache.fineract.useradministration.domain.AppUser;
 
 @Entity
 @Table(name = "m_loan_reschedule_request")
+@Getter
 public class LoanRescheduleRequest extends AbstractPersistableCustom<Long> {
 
     @ManyToOne
@@ -129,83 +131,6 @@ public class LoanRescheduleRequest extends 
AbstractPersistableCustom<Long> {
                 rejectedOnDate, rejectedByUser);
     }
 
-    /**
-     * @return the reschedule request loan object
-     **/
-    public Loan getLoan() {
-        return this.loan;
-    }
-
-    /**
-     * @return the status enum
-     **/
-    public Integer getStatusEnum() {
-        return this.statusEnum;
-    }
-
-    /**
-     * @return installment number of the rescheduling start point
-     **/
-    public Integer getRescheduleFromInstallment() {
-        return this.rescheduleFromInstallment;
-    }
-
-    /**
-     * @return due date of the rescheduling start point
-     **/
-    public LocalDate getRescheduleFromDate() {
-        return this.rescheduleFromDate;
-    }
-
-    /**
-     * @return the reschedule reason code value object
-     **/
-    public CodeValue getRescheduleReasonCodeValue() {
-        return this.rescheduleReasonCodeValue;
-    }
-
-    /**
-     * @return the reschedule reason comment added by the "submittedByUser"
-     **/
-    public String getRescheduleReasonComment() {
-        return this.rescheduleReasonComment;
-    }
-
-    /**
-     * @return the date the request was submitted
-     **/
-    public LocalDate getSubmittedOnDate() {
-        return this.submittedOnDate;
-    }
-
-    /**
-     * @return the user that submitted the request
-     **/
-    public AppUser getSubmittedByUser() {
-        return this.submittedByUser;
-    }
-
-    /**
-     * @return the date the request was approved
-     **/
-    public LocalDate getApprovedOnDate() {
-        return this.approvedOnDate;
-    }
-
-    /**
-     * @return the user that approved the request
-     **/
-    public AppUser getApprovedByUser() {
-        return this.approvedByUser;
-    }
-
-    /**
-     * @return the date the request was rejected
-     **/
-    public LocalDate getRejectedOnDate() {
-        return this.rejectedOnDate;
-    }
-
     /**
      * @return the recalculate interest option (true/false)
      **/
@@ -219,13 +144,6 @@ public class LoanRescheduleRequest extends 
AbstractPersistableCustom<Long> {
         return recalculateInterest;
     }
 
-    /**
-     * @return the user that rejected the request
-     **/
-    public AppUser getRejectedByUser() {
-        return this.rejectedByUser;
-    }
-
     /**
      * change the status of the loan reschedule request to approved, also 
updating the approvedByUser and approvedOnDate
      * properties
@@ -268,10 +186,6 @@ public class LoanRescheduleRequest extends 
AbstractPersistableCustom<Long> {
         this.loanRescheduleRequestToTermVariationMappings.addAll(mapping);
     }
 
-    public Set<LoanRescheduleRequestToTermVariationMapping> 
getLoanRescheduleRequestToTermVariationMappings() {
-        return this.loanRescheduleRequestToTermVariationMappings;
-    }
-
     public LoanTermVariations 
getInterestRateFromInstallmentTermVariationIfExists() {
         return this.loanRescheduleRequestToTermVariationMappings.stream()
                 
.map(LoanRescheduleRequestToTermVariationMapping::getLoanTermVariations)
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/Guarantor.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/Guarantor.java
index 7f7906f0fa..e7cd28325a 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/Guarantor.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/Guarantor.java
@@ -31,6 +31,7 @@ import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import lombok.Getter;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.fineract.infrastructure.codes.domain.CodeValue;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
@@ -42,17 +43,21 @@ import 
org.apache.fineract.portfolio.loanaccount.guarantor.GuarantorConstants.Gu
 @Table(name = "m_guarantor")
 public class Guarantor extends AbstractPersistableCustom<Long> {
 
+    @Getter
     @ManyToOne
     @JoinColumn(name = "loan_id", nullable = false)
     private Loan loan;
 
+    @Getter
     @ManyToOne
     @JoinColumn(name = "client_reln_cv_id", nullable = false)
     private CodeValue clientRelationshipType;
 
+    @Getter
     @Column(name = "type_enum", nullable = false)
     private Integer gurantorType;
 
+    @Getter
     @Column(name = "entity_id")
     private Long entityId;
 
@@ -95,6 +100,7 @@ public class Guarantor extends 
AbstractPersistableCustom<Long> {
     @Column(name = "is_active", nullable = false)
     private boolean active;
 
+    @Getter
     @OneToMany(cascade = CascadeType.ALL, mappedBy = "guarantor", 
orphanRemoval = true, fetch = FetchType.EAGER)
     private List<GuarantorFundingDetails> guarantorFundDetails = new 
ArrayList<>();
 
@@ -206,7 +212,6 @@ public class Guarantor extends 
AbstractPersistableCustom<Long> {
                 newValue = command.integerValueOfParameterNamed(paramName);
             }
             actualChanges.put(paramName, newValue);
-            // propertyToBeUpdated = newValue;
 
             // now update actual property
             if 
(paramName.equals(GuarantorJSONinputParams.GUARANTOR_TYPE_ID.getValue())) {
@@ -220,7 +225,6 @@ public class Guarantor extends 
AbstractPersistableCustom<Long> {
         if (command.isChangeInStringParameterNamed(paramName, 
propertyToBeUpdated)) {
             final String newValue = 
command.stringValueOfParameterNamed(paramName);
             actualChanges.put(paramName, newValue);
-            // propertyToBeUpdated = newValue;
 
             // now update actual property
             if 
(paramName.equals(GuarantorJSONinputParams.FIRSTNAME.getValue())) {
@@ -254,7 +258,6 @@ public class Guarantor extends 
AbstractPersistableCustom<Long> {
         if (command.isChangeInDateParameterNamed(paramName, 
propertyToBeUpdated)) {
             final LocalDate newValue = 
command.localDateValueOfParameterNamed(paramName);
             actualChanges.put(paramName, newValue);
-            // propertyToBeUpdated = newValue;
 
             // now update actual property
             if 
(paramName.equals(GuarantorJSONinputParams.DATE_OF_BIRTH.getValue())) {
@@ -263,10 +266,6 @@ public class Guarantor extends 
AbstractPersistableCustom<Long> {
         }
     }
 
-    public Long getEntityId() {
-        return this.entityId;
-    }
-
     public Long getLoanId() {
         return this.loan.getId();
     }
@@ -279,10 +278,6 @@ public class Guarantor extends 
AbstractPersistableCustom<Long> {
         return this.loan.getOfficeId();
     }
 
-    public CodeValue getClientRelationshipType() {
-        return this.clientRelationshipType;
-    }
-
     public void updateClientRelationshipType(final CodeValue 
clientRelationshipType) {
         this.clientRelationshipType = clientRelationshipType;
     }
@@ -291,10 +286,6 @@ public class Guarantor extends 
AbstractPersistableCustom<Long> {
         this.entityId = null;
     }
 
-    public Integer getGurantorType() {
-        return this.gurantorType;
-    }
-
     public boolean isActive() {
         return this.active;
     }
@@ -334,14 +325,6 @@ public class Guarantor extends 
AbstractPersistableCustom<Long> {
         this.active = isActive;
     }
 
-    public Loan getLoan() {
-        return this.loan;
-    }
-
-    public List<GuarantorFundingDetails> getGuarantorFundDetails() {
-        return this.guarantorFundDetails;
-    }
-
     public boolean hasGuarantor(Long savingsId) {
         if (savingsId == null) {
             return false;
@@ -358,10 +341,6 @@ public class Guarantor extends 
AbstractPersistableCustom<Long> {
     }
 
     public boolean isSelfGuarantee() {
-        boolean isSelf = false;
-        if (isExistingCustomer() && getEntityId().equals(getClientId())) {
-            isSelf = true;
-        }
-        return isSelf;
+        return isExistingCustomer() && getEntityId().equals(getClientId());
     }
 }
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java
index 8421e9ca07..40c0e94acb 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java
@@ -312,10 +312,7 @@ public class FixedDepositAccount extends SavingsAccount {
         List<SavingsAccountTransactionDetailsForPostingPeriod> 
savingsAccountTransactionDetailsForPostingPeriodList = 
toSavingsAccountTransactionDetailsForPostingPeriodList(
                 transactions);
         for (final LocalDateInterval periodInterval : postingPeriodIntervals) {
-            boolean isUserPosting = false;
-            if (postedAsOnTransactionDates.contains(periodInterval.endDate())) 
{
-                isUserPosting = true;
-            }
+            boolean isUserPosting = 
postedAsOnTransactionDates.contains(periodInterval.endDate());
             final PostingPeriod postingPeriod = 
PostingPeriod.createFrom(periodInterval, periodStartingBalance,
                     savingsAccountTransactionDetailsForPostingPeriodList, 
this.currency, compoundingPeriodType, interestCalculationType,
                     interestRateAsFraction, daysInYearType.getValue(), 
maturityDate, interestPostTransactions, isInterestTransfer,
diff --git 
a/fineract-savings/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestRateChartFields.java
 
b/fineract-savings/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestRateChartFields.java
index e1a78a96dc..c9f76033ae 100644
--- 
a/fineract-savings/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestRateChartFields.java
+++ 
b/fineract-savings/src/main/java/org/apache/fineract/portfolio/interestratechart/domain/InterestRateChartFields.java
@@ -30,6 +30,7 @@ import jakarta.persistence.Column;
 import jakarta.persistence.Embeddable;
 import java.time.LocalDate;
 import java.util.Map;
+import lombok.Getter;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
 import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
 import org.apache.fineract.infrastructure.core.domain.LocalDateInterval;
@@ -44,9 +45,11 @@ public class InterestRateChartFields {
     @Column(name = "description", nullable = true)
     private String description;
 
+    @Getter
     @Column(name = "from_date", nullable = false)
     private LocalDate fromDate;
 
+    @Getter
     @Column(name = "end_date", nullable = true)
     private LocalDate endDate;
 
@@ -123,14 +126,6 @@ public class InterestRateChartFields {
         return compare != null && DateUtils.isAfter(getFromDate(), compare);
     }
 
-    public LocalDate getFromDate() {
-        return this.fromDate;
-    }
-
-    public LocalDate getEndDate() {
-        return this.endDate;
-    }
-
     public boolean isOverlapping(InterestRateChartFields that) {
         final LocalDate thisFromDate = this.getFromDate();
         LocalDate thisEndDate = this.getEndDate();
@@ -142,10 +137,8 @@ public class InterestRateChartFields {
         final LocalDateInterval thisInterval = 
LocalDateInterval.create(thisFromDate, thisEndDate);
         final LocalDateInterval thatInterval = 
LocalDateInterval.create(thatFromDate, thatEndDate);
 
-        if (thisInterval.containsPortionOf(thatInterval) || 
thatInterval.containsPortionOf(thisInterval)) {
-            return true;
-        }
-        return false;// no overlapping
+        return thisInterval.containsPortionOf(thatInterval) || 
thatInterval.containsPortionOf(thisInterval);// no
+                                                                               
                             // overlapping
     }
 
     public boolean isApplicableChartFor(final LocalDate target) {
diff --git 
a/fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositTermDetail.java
 
b/fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositTermDetail.java
index 360e64ada1..af1d02b92b 100644
--- 
a/fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositTermDetail.java
+++ 
b/fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositTermDetail.java
@@ -135,9 +135,7 @@ public class DepositTermDetail {
         if (this.minDepositTerm != null && this.maxDepositTerm != null) {
             final Integer minDepositInDays = 
this.convertToSafeDays(minDepositTerm, 
SavingsPeriodFrequencyType.fromInt(minDepositTermType));
             final Integer maxDepositInDays = 
this.convertToSafeDays(maxDepositTerm, 
SavingsPeriodFrequencyType.fromInt(maxDepositTermType));
-            if (minDepositInDays.compareTo(maxDepositInDays) > 0) {
-                return true;
-            }
+            return minDepositInDays.compareTo(maxDepositInDays) > 0;
         }
         return false;
     }


Reply via email to