Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@

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;
Expand Down Expand Up @@ -126,83 +128,13 @@ public static LoanRescheduleRequestData instance(Long id, Long loanId, LoanResch
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
*/
public CodeValueData getRescheduleReasonCodeValueId() {
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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -46,18 +50,6 @@ public LoanRescheduleRequestStatusEnumData(Long id, String code, String value) {
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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
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;
Expand All @@ -40,6 +41,7 @@

@Entity
@Table(name = "m_loan_reschedule_request")
@Getter
public class LoanRescheduleRequest extends AbstractPersistableCustom<Long> {

@ManyToOne
Expand Down Expand Up @@ -129,83 +131,6 @@ public static LoanRescheduleRequest instance(final Loan loan, final Integer stat
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)
**/
Expand All @@ -219,13 +144,6 @@ public Boolean getRecalculateInterest() {
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
Expand Down Expand Up @@ -268,10 +186,6 @@ public void updateLoanRescheduleRequestToTermVariationMappings(final List<LoanRe
this.loanRescheduleRequestToTermVariationMappings.addAll(mapping);
}

public Set<LoanRescheduleRequestToTermVariationMapping> getLoanRescheduleRequestToTermVariationMappings() {
return this.loanRescheduleRequestToTermVariationMappings;
}

public LoanTermVariations getInterestRateFromInstallmentTermVariationIfExists() {
return this.loanRescheduleRequestToTermVariationMappings.stream()
.map(LoanRescheduleRequestToTermVariationMapping::getLoanTermVariations)
Expand Down
Loading
Loading