tidy up loan account data being returned breaking up into basic details, permissions, derived loan data and repayments.

This commit is contained in:
Keith Woodlock
2012-05-31 17:40:53 +01:00
parent bfe75a5c35
commit e0beb43f6f
47 changed files with 743 additions and 816 deletions
@@ -1,88 +0,0 @@
package org.mifosng.data;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.map.annotate.JsonFilter;
@XmlRootElement
@JsonFilter("myFilter")
public class ClientLoanAccountSummaryCollectionData {
private List<ClientLoanAccountSummaryData> pendingApprovalLoans = new ArrayList<ClientLoanAccountSummaryData>();
private List<ClientLoanAccountSummaryData> awaitingDisbursalLoans = new ArrayList<ClientLoanAccountSummaryData>();
private List<ClientLoanAccountSummaryData> openLoans = new ArrayList<ClientLoanAccountSummaryData>();
private List<ClientLoanAccountSummaryData> closedLoans = new ArrayList<ClientLoanAccountSummaryData>();
public ClientLoanAccountSummaryCollectionData() {
//
}
public ClientLoanAccountSummaryCollectionData(
final List<ClientLoanAccountSummaryData> pendingApprovalLoans,
final List<ClientLoanAccountSummaryData> awaitingDisbursalLoans,
final List<ClientLoanAccountSummaryData> openLoans,
final List<ClientLoanAccountSummaryData> closedLoans) {
this.pendingApprovalLoans = pendingApprovalLoans;
this.awaitingDisbursalLoans = awaitingDisbursalLoans;
this.openLoans = openLoans;
this.closedLoans = closedLoans;
}
public Integer getAnyLoanCount() {
return getPendingApprovalLoanCount() + getAwaitingDisbursalLoanCount()
+ getActiveLoanCount() + getClosedLoanCount();
}
public Integer getPendingApprovalLoanCount() {
return this.pendingApprovalLoans.size();
}
public Integer getAwaitingDisbursalLoanCount() {
return this.awaitingDisbursalLoans.size();
}
public Integer getActiveLoanCount() {
return this.openLoans.size();
}
public Integer getClosedLoanCount() {
return this.closedLoans.size();
}
public List<ClientLoanAccountSummaryData> getPendingApprovalLoans() {
return pendingApprovalLoans;
}
public void setPendingApprovalLoans(
List<ClientLoanAccountSummaryData> pendingApprovalLoans) {
this.pendingApprovalLoans = pendingApprovalLoans;
}
public List<ClientLoanAccountSummaryData> getAwaitingDisbursalLoans() {
return awaitingDisbursalLoans;
}
public void setAwaitingDisbursalLoans(
List<ClientLoanAccountSummaryData> awaitingDisbursalLoans) {
this.awaitingDisbursalLoans = awaitingDisbursalLoans;
}
public List<ClientLoanAccountSummaryData> getOpenLoans() {
return openLoans;
}
public void setOpenLoans(List<ClientLoanAccountSummaryData> openLoans) {
this.openLoans = openLoans;
}
public List<ClientLoanAccountSummaryData> getClosedLoans() {
return closedLoans;
}
public void setClosedLoans(List<ClientLoanAccountSummaryData> closedLoans) {
this.closedLoans = closedLoans;
}
}
@@ -1,142 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
import org.joda.time.LocalDate;
@XmlRootElement(name = "clientLoanAccountSummary")
public class ClientLoanAccountSummaryData implements Serializable {
private Long id;
private String externalId;
private Long loanProductId;
private String loanProductName;
private Integer loanStatusId;
private boolean pendingApproval;
private boolean waitingForDisbursal;
private boolean open;
private boolean closed;
private String lifeCycleStatusText;
private LocalDate lifeCycleStatusDate;
// private LocalDate submittedOnDate;
// private LocalDate approvedOnDate;
// private LocalDate expectedDisbursementDate;
// private LocalDate actualDisbursementDate;
// private LocalDate expectedFirstRepaymentOnDate;
// private LocalDate interestCalculatedFromDate;
// private LocalDate expectedMaturityDate;
// private LocalDate closedOnDate;
public ClientLoanAccountSummaryData() {
//
}
public ClientLoanAccountSummaryData(Long id, String externalId,
Long productId, String loanProductName, Integer loanStatusId,
String lifeCycleStatusText, boolean pendingApproval,
boolean waitingForDisbursal, boolean open, boolean closed) {
this.id = id;
this.externalId = externalId;
this.loanProductId = productId;
this.loanProductName = loanProductName;
this.loanStatusId = loanStatusId;
this.lifeCycleStatusText = lifeCycleStatusText;
this.pendingApproval = pendingApproval;
this.waitingForDisbursal = waitingForDisbursal;
this.open = open;
this.closed = closed;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public String getLoanProductName() {
return loanProductName;
}
public void setLoanProductName(String loanProductName) {
this.loanProductName = loanProductName;
}
public boolean isPendingApproval() {
return pendingApproval;
}
public void setPendingApproval(boolean pendingApproval) {
this.pendingApproval = pendingApproval;
}
public boolean isWaitingForDisbursal() {
return waitingForDisbursal;
}
public void setWaitingForDisbursal(boolean waitingForDisbursal) {
this.waitingForDisbursal = waitingForDisbursal;
}
public boolean isOpen() {
return open;
}
public void setOpen(boolean open) {
this.open = open;
}
public boolean isClosed() {
return closed;
}
public void setClosed(boolean closed) {
this.closed = closed;
}
public String getLifeCycleStatusText() {
return lifeCycleStatusText;
}
public void setLifeCycleStatusText(String lifeCycleStatusText) {
this.lifeCycleStatusText = lifeCycleStatusText;
}
public LocalDate getLifeCycleStatusDate() {
return lifeCycleStatusDate;
}
public void setLifeCycleStatusDate(LocalDate lifeCycleStatusDate) {
this.lifeCycleStatusDate = lifeCycleStatusDate;
}
public Long getLoanProductId() {
return loanProductId;
}
public void setLoanProductId(Long loanProductId) {
this.loanProductId = loanProductId;
}
public Integer getLoanStatusId() {
return loanStatusId;
}
public void setLoanStatusId(Integer loanStatusId) {
this.loanStatusId = loanStatusId;
}
}
@@ -1,91 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "currency")
public class CurrencyData implements Serializable {
private String code;
private String name;
private int decimalPlaces;
private String displaySymbol;
private String nameCode;
public CurrencyData() {
//
}
public CurrencyData(final String code, final String name, final int decimalPlaces, String displaySymbol, String nameCode) {
this.code = code;
this.name = name;
this.decimalPlaces = decimalPlaces;
this.displaySymbol = displaySymbol;
this.nameCode = nameCode;
}
@Override
public boolean equals(Object obj) {
CurrencyData currencyData = (CurrencyData) obj;
return currencyData.code.equals(this.code);
}
@Override
public int hashCode() {
return this.code.hashCode();
}
public String getDisplayLabel() {
StringBuilder builder = new StringBuilder(this.name).append(' ');
if (this.displaySymbol != null && !"".equalsIgnoreCase(displaySymbol.trim())) {
builder.append('(').append(this.displaySymbol).append(')');
} else {
builder.append('[').append(this.code).append(']');
}
return builder.toString();
}
public String getName() {
return this.name;
}
public String getCode() {
return this.code;
}
public int getDecimalPlaces() {
return this.decimalPlaces;
}
public void setCode(final String code) {
this.code = code;
}
public void setName(final String name) {
this.name = name;
}
public void setDecimalPlaces(final int decimalPlaces) {
this.decimalPlaces = decimalPlaces;
}
public String getDisplaySymbol() {
return displaySymbol;
}
public void setDisplaySymbol(String displaySymbol) {
this.displaySymbol = displaySymbol;
}
public String getNameCode() {
return nameCode;
}
public void setNameCode(String nameCode) {
this.nameCode = nameCode;
}
}
@@ -1,47 +0,0 @@
package org.mifosng.data;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class DerivedLoanData {
private LoanRepaymentScheduleData repaymentSchedule;
private LoanAccountSummaryData summary;
private List<LoanRepaymentData> loanRepayments;
public DerivedLoanData() {
//
}
public DerivedLoanData(LoanRepaymentScheduleData repaymentScheduleData, LoanAccountSummaryData summaryData, List<LoanRepaymentData> loanRepayments) {
this.repaymentSchedule = repaymentScheduleData;
this.summary = summaryData;
this.loanRepayments = loanRepayments;
}
public LoanRepaymentScheduleData getRepaymentSchedule() {
return repaymentSchedule;
}
public void setRepaymentSchedule(LoanRepaymentScheduleData repaymentSchedule) {
this.repaymentSchedule = repaymentSchedule;
}
public LoanAccountSummaryData getSummary() {
return summary;
}
public void setSummary(LoanAccountSummaryData summary) {
this.summary = summary;
}
public List<LoanRepaymentData> getLoanRepayments() {
return loanRepayments;
}
public void setLoanRepayments(List<LoanRepaymentData> loanRepayments) {
this.loanRepayments = loanRepayments;
}
}
@@ -1,592 +0,0 @@
package org.mifosng.data;
import java.math.BigDecimal;
import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.map.annotate.JsonFilter;
import org.joda.time.DateTime;
import org.joda.time.Days;
import org.joda.time.LocalDate;
import org.joda.time.Months;
@XmlRootElement(name = "loan")
@JsonFilter("loanFilter")
public class LoanAccountData {
private boolean open;
private boolean openWithRepaymentMade;
private boolean closed;
private boolean interestRebateOutstanding;
private boolean pendingApproval;
private boolean waitingForDisbursal;
private String lifeCycleStatusText;
private LocalDate lifeCycleStatusDate;
private Long id;
private String externalId;
private String loanProductName;
private LocalDate submittedOnDate;
private LocalDate approvedOnDate;
private LocalDate expectedDisbursementDate;
private LocalDate actualDisbursementDate;
private boolean undoDisbursalAllowed;
private LocalDate expectedFirstRepaymentOnDate;
private LocalDate interestCalculatedFromDate;
private LocalDate closedOnDate;
private LocalDate expectedMaturityDate;
private MoneyData principal;
private BigDecimal interestRatePerYear;
private BigDecimal interestRatePerPeriod;
private Integer interestPeriodFrequencyType;
private String interestPeriodFrequencyText;
private Integer interestMethodType;
private String interestMethodText;
private Integer amortizationMethodValue;
private String amortizationMethodText;
private Integer numberOfRepayments;
private Integer repaymentFrequencyNumber;
private Integer repaymentFrequencyTypeEnumOrdinal;
private String repaymentFrequencyTypeText;
private MoneyData interestRebateOwed;
private DerivedLoanData loanData;
private MoneyData arrearsTolerance;
// permissions on actions against loan based on the user who request loan data.
private boolean waiveAllowed;
private boolean makeRepaymentAllowed;
private boolean rejectAllowed;
private boolean withdrawnByApplicantAllowed;
private boolean undoApprovalAllowed;
private boolean disbursalAllowed;
public LoanAccountData() {
//
}
public LoanAccountData(
final boolean closed,
final boolean open,
final boolean openWithRepaymentMade,
final boolean interestRebateOutstanding,
final boolean pendingApproval,
final boolean waitingForDisbursal,
final boolean undoDisbursalAllowed,
final boolean makeRepaymentAllowed,
final boolean rejectAllowed,
final boolean withdrawnByApplicantAllowed, final boolean undoApprovalAllowed, final boolean disbursalAllowed,
final String lifeCycleStatusText,
final LocalDate lifeCycleStatusDate,
final Long id, String externalId,
final String loanProductName, final LocalDate closedOnDate,
final LocalDate submittedOnDate,
final LocalDate approvedOnDate,
final LocalDate expectedDisbursementDate,
final LocalDate actualDisbursementDate,
final LocalDate expectedMaturityDate,
final LocalDate expectedFirstRepaymentOnDate,
final LocalDate interestCalculatedFromDate,
final MoneyData principal, final BigDecimal interestRatePerYear,
final BigDecimal interestRatePerPeriod,
final Integer interestPeriodFrequencyType,
final String interestPeriodFrequencyText,
final Integer interestMethodType,
final String interestMethodText,
final Integer amortizationMethodValue,
final String amortizationMethodText,
final Integer numberOfRepayments,
final Integer repayEvery,
final Integer repaymentFrequencyValue,
final String repaymentFrequencyText,
final MoneyData arrearsTolerance, final DerivedLoanData derivedLoanData,
boolean waiveAllowed, final MoneyData interestRebateOwed) {
this.closed = closed;
this.open = open;
this.openWithRepaymentMade = openWithRepaymentMade;
this.makeRepaymentAllowed = makeRepaymentAllowed;
this.rejectAllowed = rejectAllowed;
this.withdrawnByApplicantAllowed = withdrawnByApplicantAllowed;
this.undoApprovalAllowed = undoApprovalAllowed;
this.disbursalAllowed = disbursalAllowed;
this.lifeCycleStatusDate = lifeCycleStatusDate;
this.externalId = externalId;
this.undoDisbursalAllowed = undoDisbursalAllowed;
this.interestRebateOutstanding = interestRebateOutstanding;
this.pendingApproval = pendingApproval;
this.waitingForDisbursal = waitingForDisbursal;
this.lifeCycleStatusText = lifeCycleStatusText;
this.id = id;
this.loanProductName = loanProductName;
this.closedOnDate = closedOnDate;
this.submittedOnDate = submittedOnDate;
this.approvedOnDate = approvedOnDate;
this.expectedDisbursementDate = expectedDisbursementDate;
this.actualDisbursementDate = actualDisbursementDate;
this.expectedMaturityDate = expectedMaturityDate;
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
this.interestCalculatedFromDate = interestCalculatedFromDate;
this.principal = principal;
this.interestRatePerYear = interestRatePerYear;
this.interestRatePerPeriod = interestRatePerPeriod;
this.interestPeriodFrequencyType = interestPeriodFrequencyType;
this.interestPeriodFrequencyText = interestPeriodFrequencyText;
this.interestMethodType = interestMethodType;
this.interestMethodText = interestMethodText;
this.amortizationMethodValue = amortizationMethodValue;
this.amortizationMethodText = amortizationMethodText;
this.numberOfRepayments = numberOfRepayments;
this.repaymentFrequencyNumber = repayEvery;
this.repaymentFrequencyTypeEnumOrdinal = repaymentFrequencyValue;
this.repaymentFrequencyTypeText = repaymentFrequencyText;
this.arrearsTolerance = arrearsTolerance;
this.waiveAllowed = waiveAllowed;
this.loanData = derivedLoanData;
this.interestRebateOwed = interestRebateOwed;
}
public boolean isAnyActionOnLoanAllowed() {
return isRejectAllowed() || isWithdrawnByApplicantAllowed() || isPendingApproval() || isUndoDisbursalAllowed() || isMakeRepaymentAllowed();
}
public int getMaxSubmittedOnOffsetFromToday() {
return Days.daysBetween(new DateTime(),
this.getSubmittedOnDate().toDateMidnight().toDateTime())
.getDays();
}
public int getMaxApprovedOnOffsetFromToday() {
int offset = 0;
if (this.getApprovedOnDate() != null) {
offset = Days.daysBetween(new DateTime(),
this.getApprovedOnDate().toDateMidnight().toDateTime())
.getDays();
}
return offset;
}
public int getMaxDisbursedOnOffsetFromToday() {
int offset = 0;
if (this.getActualDisbursementDate() != null) {
offset = Days.daysBetween(new DateTime(),
this.getActualDisbursementDate().toDateMidnight().toDateTime())
.getDays();
}
return offset;
}
public int getActualLoanTermInDays() {
LocalDate dateToUse = getExpectedDisbursementDate();
if (getActualDisbursementDate() != null) {
dateToUse = getActualDisbursementDate();
}
LocalDate closingDateToUse = getExpectedMaturityDate();
if (getClosedOnDate() != null) {
closingDateToUse = getClosedOnDate();
}
return Days.daysBetween(dateToUse.toDateMidnight().toDateTime(), closingDateToUse.toDateMidnight().toDateTime()).getDays();
}
public int getActualLoanTermInMonths() {
LocalDate dateToUse = getExpectedDisbursementDate();
if (getActualDisbursementDate() != null) {
dateToUse = getActualDisbursementDate();
}
LocalDate closingDateToUse = getExpectedMaturityDate();
if (getClosedOnDate() != null) {
closingDateToUse = getClosedOnDate();
}
return Months.monthsBetween(dateToUse.toDateMidnight().toDateTime(), closingDateToUse.toDateMidnight().toDateTime()).getMonths();
}
public int getLoanTermInDays() {
LocalDate dateToUse = getExpectedDisbursementDate();
if (getActualDisbursementDate() != null) {
dateToUse = getActualDisbursementDate();
}
LocalDate closingDateToUse = getExpectedMaturityDate();
return Days.daysBetween(dateToUse.toDateMidnight().toDateTime(), closingDateToUse.toDateMidnight().toDateTime()).getDays();
}
public int getLoanTermInMonths() {
LocalDate dateToUse = getExpectedDisbursementDate();
if (getActualDisbursementDate() != null) {
dateToUse = getActualDisbursementDate();
}
LocalDate closingDateToUse = getExpectedMaturityDate();
return Months.monthsBetween(dateToUse.toDateMidnight().toDateTime(), closingDateToUse.toDateMidnight().toDateTime()).getMonths();
}
public boolean isOpen() {
return this.open;
}
public void setOpen(final boolean open) {
this.open = open;
}
public boolean isClosed() {
return this.closed;
}
public void setClosed(final boolean closed) {
this.closed = closed;
}
public boolean isInterestRebateOutstanding() {
return this.interestRebateOutstanding;
}
public void setInterestRebateOutstanding(
final boolean interestRebateOutstanding) {
this.interestRebateOutstanding = interestRebateOutstanding;
}
public boolean isPendingApproval() {
return this.pendingApproval;
}
public void setPendingApproval(final boolean pendingApproval) {
this.pendingApproval = pendingApproval;
}
public boolean isWaitingForDisbursal() {
return this.waitingForDisbursal;
}
public void setWaitingForDisbursal(final boolean waitingForDisbursal) {
this.waitingForDisbursal = waitingForDisbursal;
}
public LocalDate getClosedOnDate() {
return this.closedOnDate;
}
public void setClosedOnDate(final LocalDate closedOnDate) {
this.closedOnDate = closedOnDate;
}
public LocalDate getSubmittedOnDate() {
return this.submittedOnDate;
}
public void setSubmittedOnDate(final LocalDate submittedOnDate) {
this.submittedOnDate = submittedOnDate;
}
public Long getId() {
return this.id;
}
public void setId(final Long id) {
this.id = id;
}
public LocalDate getExpectedDisbursementDate() {
return this.expectedDisbursementDate;
}
public void setExpectedDisbursementDate(
final LocalDate expectedDisbursementDate) {
this.expectedDisbursementDate = expectedDisbursementDate;
}
public LocalDate getActualDisbursementDate() {
return this.actualDisbursementDate;
}
public void setActualDisbursementDate(final LocalDate actualDisbursementDate) {
this.actualDisbursementDate = actualDisbursementDate;
}
public MoneyData getPrincipal() {
return this.principal;
}
public void setPrincipal(final MoneyData principal) {
this.principal = principal;
}
public BigDecimal getInterestRatePerYear() {
return this.interestRatePerYear;
}
public void setInterestRatePerYear(final BigDecimal interestRatePerYear) {
this.interestRatePerYear = interestRatePerYear;
}
public Integer getRepaymentFrequencyNumber() {
return this.repaymentFrequencyNumber;
}
public void setRepaymentFrequencyNumber(
final Integer repaymentFrequencyNumber) {
this.repaymentFrequencyNumber = repaymentFrequencyNumber;
}
public Integer getRepaymentFrequencyTypeEnumOrdinal() {
return this.repaymentFrequencyTypeEnumOrdinal;
}
public void setRepaymentFrequencyTypeEnumOrdinal(
final Integer repaymentFrequencyTypeEnumOrdinal) {
this.repaymentFrequencyTypeEnumOrdinal = repaymentFrequencyTypeEnumOrdinal;
}
public String getRepaymentFrequencyTypeText() {
return this.repaymentFrequencyTypeText;
}
public void setRepaymentFrequencyTypeText(
final String repaymentFrequencyTypeText) {
this.repaymentFrequencyTypeText = repaymentFrequencyTypeText;
}
public String getLoanProductName() {
return this.loanProductName;
}
public void setLoanProductName(final String loanProductName) {
this.loanProductName = loanProductName;
}
public LocalDate getApprovedOnDate() {
return this.approvedOnDate;
}
public void setApprovedOnDate(final LocalDate approvedOnDate) {
this.approvedOnDate = approvedOnDate;
}
public MoneyData getInterestRebateOwed() {
return this.interestRebateOwed;
}
public void setInterestRebateOwed(final MoneyData interestRebateOwed) {
this.interestRebateOwed = interestRebateOwed;
}
public String getLifeCycleStatusText() {
return this.lifeCycleStatusText;
}
public void setLifeCycleStatusText(final String lifeCycleStatusText) {
this.lifeCycleStatusText = lifeCycleStatusText;
}
public LocalDate getExpectedMaturityDate() {
return this.expectedMaturityDate;
}
public void setMaturityDate(final LocalDate maturityDate) {
this.expectedMaturityDate = maturityDate;
}
public boolean isOpenWithRepaymentMade() {
return this.openWithRepaymentMade;
}
public void setOpenWithRepaymentMade(final boolean openWithRepaymentMade) {
this.openWithRepaymentMade = openWithRepaymentMade;
}
public boolean isUndoDisbursalAllowed() {
return this.undoDisbursalAllowed;
}
public void setUndoDisbursalAllowed(final boolean undoDisbursalAllowed) {
this.undoDisbursalAllowed = undoDisbursalAllowed;
}
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public BigDecimal getInterestRatePerPeriod() {
return interestRatePerPeriod;
}
public void setInterestRatePerPeriod(BigDecimal interestRatePerPeriod) {
this.interestRatePerPeriod = interestRatePerPeriod;
}
public Integer getInterestPeriodFrequencyType() {
return interestPeriodFrequencyType;
}
public void setInterestPeriodFrequencyType(Integer interestPeriodFrequencyType) {
this.interestPeriodFrequencyType = interestPeriodFrequencyType;
}
public String getInterestPeriodFrequencyText() {
return interestPeriodFrequencyText;
}
public void setInterestPeriodFrequencyText(String interestPeriodFrequencyText) {
this.interestPeriodFrequencyText = interestPeriodFrequencyText;
}
public Integer getInterestMethodType() {
return interestMethodType;
}
public void setInterestMethodType(Integer interestMethodType) {
this.interestMethodType = interestMethodType;
}
public String getInterestMethodText() {
return interestMethodText;
}
public void setInterestMethodText(String interestMethodText) {
this.interestMethodText = interestMethodText;
}
public Integer getAmortizationMethodValue() {
return amortizationMethodValue;
}
public void setAmortizationMethodValue(Integer amortizationMethodValue) {
this.amortizationMethodValue = amortizationMethodValue;
}
public String getAmortizationMethodText() {
return amortizationMethodText;
}
public void setAmortizationMethodText(String amortizationMethodText) {
this.amortizationMethodText = amortizationMethodText;
}
public Integer getNumberOfRepayments() {
return numberOfRepayments;
}
public void setNumberOfRepayments(Integer numberOfRepayments) {
this.numberOfRepayments = numberOfRepayments;
}
public DerivedLoanData getLoanData() {
return loanData;
}
public void setLoanData(DerivedLoanData loanData) {
this.loanData = loanData;
}
public MoneyData getArrearsTolerance() {
return arrearsTolerance;
}
public void setArrearsTolerance(MoneyData arrearsTolerance) {
this.arrearsTolerance = arrearsTolerance;
}
public boolean isWaiveAllowed() {
return waiveAllowed;
}
public void setWaiveAllowed(boolean waiveAllowed) {
this.waiveAllowed = waiveAllowed;
}
public boolean isMakeRepaymentAllowed() {
return makeRepaymentAllowed;
}
public void setMakeRepaymentAllowed(boolean makeRepaymentAllowed) {
this.makeRepaymentAllowed = makeRepaymentAllowed;
}
public LocalDate getLifeCycleStatusDate() {
return lifeCycleStatusDate;
}
public void setLifeCycleStatusDate(LocalDate lifeCycleStatusDate) {
this.lifeCycleStatusDate = lifeCycleStatusDate;
}
public boolean isRejectAllowed() {
return rejectAllowed;
}
public void setRejectAllowed(boolean rejectAllowed) {
this.rejectAllowed = rejectAllowed;
}
public boolean isWithdrawnByApplicantAllowed() {
return withdrawnByApplicantAllowed;
}
public void setWithdrawnByApplicantAllowed(boolean withdrawnByApplicantAllowed) {
this.withdrawnByApplicantAllowed = withdrawnByApplicantAllowed;
}
public boolean isUndoApprovalAllowed() {
return undoApprovalAllowed;
}
public void setUndoApprovalAllowed(boolean undoApprovalAllowed) {
this.undoApprovalAllowed = undoApprovalAllowed;
}
public boolean isDisbursalAllowed() {
return disbursalAllowed;
}
public void setDisbursalAllowed(boolean disbursalAllowed) {
this.disbursalAllowed = disbursalAllowed;
}
public LocalDate getExpectedFirstRepaymentOnDate() {
return expectedFirstRepaymentOnDate;
}
public void setExpectedFirstRepaymentOnDate(
LocalDate expectedFirstRepaymentOnDate) {
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
}
public LocalDate getInterestCalculatedFromDate() {
return interestCalculatedFromDate;
}
public void setInterestCalculatedFromDate(LocalDate interestCalculatedFromDate) {
this.interestCalculatedFromDate = interestCalculatedFromDate;
}
public void setExpectedMaturityDate(LocalDate expectedMaturityDate) {
this.expectedMaturityDate = expectedMaturityDate;
}
}
@@ -1,133 +0,0 @@
package org.mifosng.data;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class LoanAccountSummaryData {
private MoneyData originalPrincipal;
private MoneyData originalInterest;
private MoneyData originalTotal;
private MoneyData principalPaid;
private MoneyData principalOutstanding;
private MoneyData interestPaid;
private MoneyData interestOutstanding;
private MoneyData totalPaid;
private MoneyData totalOutstanding;
private MoneyData totalInArrears;
private MoneyData totalWaived;
protected LoanAccountSummaryData() {
//
}
public LoanAccountSummaryData(MoneyData originalPrincipal,
MoneyData principalPaid, MoneyData principalOutstanding,
MoneyData originalInterest, MoneyData interestPaid,
MoneyData interestOutstanding, MoneyData originalTotal,
MoneyData totalPaid, MoneyData totalOutstanding, MoneyData totalInArrears, MoneyData totalWaived) {
this.originalPrincipal = originalPrincipal;
this.principalPaid = principalPaid;
this.principalOutstanding = principalOutstanding;
this.originalInterest = originalInterest;
this.interestPaid = interestPaid;
this.interestOutstanding = interestOutstanding;
this.originalTotal = originalTotal;
this.totalPaid = totalPaid;
this.totalOutstanding = totalOutstanding;
this.totalInArrears = totalInArrears;
this.totalWaived = totalWaived;
}
public boolean isWaiveAllowed(MoneyData tolerance) {
return tolerance.isGreaterThan(this.totalOutstanding) || tolerance.isEqualTo(this.totalOutstanding);
}
public MoneyData getOriginalPrincipal() {
return originalPrincipal;
}
public void setOriginalPrincipal(MoneyData originalPrincipal) {
this.originalPrincipal = originalPrincipal;
}
public MoneyData getOriginalInterest() {
return originalInterest;
}
public void setOriginalInterest(MoneyData originalInterest) {
this.originalInterest = originalInterest;
}
public MoneyData getOriginalTotal() {
return originalTotal;
}
public void setOriginalTotal(MoneyData originalTotal) {
this.originalTotal = originalTotal;
}
public MoneyData getPrincipalPaid() {
return principalPaid;
}
public void setPrincipalPaid(MoneyData principalPaid) {
this.principalPaid = principalPaid;
}
public MoneyData getPrincipalOutstanding() {
return principalOutstanding;
}
public void setPrincipalOutstanding(MoneyData principalOutstanding) {
this.principalOutstanding = principalOutstanding;
}
public MoneyData getInterestPaid() {
return interestPaid;
}
public void setInterestPaid(MoneyData interestPaid) {
this.interestPaid = interestPaid;
}
public MoneyData getInterestOutstanding() {
return interestOutstanding;
}
public void setInterestOutstanding(MoneyData interestOutstanding) {
this.interestOutstanding = interestOutstanding;
}
public MoneyData getTotalPaid() {
return totalPaid;
}
public void setTotalPaid(MoneyData totalPaid) {
this.totalPaid = totalPaid;
}
public MoneyData getTotalOutstanding() {
return totalOutstanding;
}
public void setTotalOutstanding(MoneyData totalOutstanding) {
this.totalOutstanding = totalOutstanding;
}
public MoneyData getTotalInArrears() {
return totalInArrears;
}
public void setTotalInArrears(MoneyData totalInArrears) {
this.totalInArrears = totalInArrears;
}
public MoneyData getTotalWaived() {
return totalWaived;
}
public void setTotalWaived(MoneyData totalWaived) {
this.totalWaived = totalWaived;
}
}
@@ -1,102 +0,0 @@
package org.mifosng.data;
import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.map.annotate.JsonFilter;
import org.joda.time.DateMidnight;
import org.joda.time.Days;
import org.joda.time.LocalDate;
@XmlRootElement
@JsonFilter("loanRepaymentFilter")
public class LoanRepaymentData {
private Long id;
private LocalDate date;
private MoneyData principal;
private MoneyData interest;
private MoneyData total;
private MoneyData totalWaived;
private MoneyData overpaid;
public LoanRepaymentData() {
//
}
public LoanRepaymentData(
Long id, final LocalDate date,
final MoneyData principal,
final MoneyData interest,
final MoneyData total, final MoneyData overpaid) {
this.id = id;
this.date = date;
this.principal = principal;
this.interest = interest;
this.total = total;
this.overpaid = overpaid;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public LocalDate getDate() {
return date;
}
public int getTransactionOffsetFromToday() {
return Days.daysBetween(new DateMidnight().toDateTime(), this.date.toDateMidnight().toDateTime()).getDays();
}
public void setDate(LocalDate date) {
this.date = date;
}
public MoneyData getPrincipal() {
return principal;
}
public void setPrincipal(MoneyData principal) {
this.principal = principal;
}
public MoneyData getInterest() {
return interest;
}
public void setInterest(MoneyData interest) {
this.interest = interest;
}
public MoneyData getTotal() {
return total;
}
public void setTotal(MoneyData total) {
this.total = total;
}
public MoneyData getOverpaid() {
return overpaid;
}
public void setOverpaid(MoneyData overpaid) {
this.overpaid = overpaid;
}
public boolean hasOverpaidComponent() {
return this.overpaid.isGreaterThanZero();
}
public MoneyData getTotalWaived() {
return totalWaived;
}
public void setTotalWaived(MoneyData totalWaived) {
this.totalWaived = totalWaived;
}
}
@@ -1,235 +0,0 @@
package org.mifosng.data;
import javax.xml.bind.annotation.XmlRootElement;
import org.joda.time.LocalDate;
@XmlRootElement
public class LoanRepaymentPeriodData {
private Integer period;
private LocalDate date;
private MoneyData disbursed;
private MoneyData principal;
private MoneyData principalPaid;
private MoneyData principalOutstanding;
private MoneyData interest;
private MoneyData interestPaid;
private MoneyData interestOutstanding;
private MoneyData total;
private MoneyData totalPaid;
private MoneyData totalOutstanding;
private MoneyData totalWaived;
private MoneyData totalArrears;
private LocalDate arrearsFrom;
private LocalDate arrearsTo;
private LocalDate paidInFullOn;
private LocalDate lastAffectingPaymentOn;
private static CurrencyData currencyData(MoneyData moneyData) {
String code = moneyData.getCurrencyCode();
String name = moneyData.getDefaultName();
int decimalPlaces = moneyData.getDigitsAfterDecimal();
String displaySymbol = moneyData.getDisplaySymbol();
String nameCode = moneyData.getNameCode();
return new CurrencyData(code, name, decimalPlaces, displaySymbol, nameCode);
}
public LoanRepaymentPeriodData() {
//
}
public LoanRepaymentPeriodData(Integer period, LocalDate date,
MoneyData disbursed, MoneyData total) {
this.period = period;
this.date = date;
this.disbursed = disbursed;
this.principal = null;
this.principalPaid = null;
this.principalOutstanding = null;
this.interest = null;
this.interestPaid = null;
this.interestOutstanding = null;
this.total = total;
this.totalPaid = null;
this.totalOutstanding = total;
}
public LoanRepaymentPeriodData(Integer period, LocalDate date,
MoneyData disbursed, MoneyData principal,
MoneyData interest, MoneyData total,
MoneyData totalOutstanding) {
this.period = period;
this.date = date;
this.disbursed = disbursed;
this.principal = principal;
this.principalPaid = MoneyData.zero(currencyData(principal));
this.principalOutstanding = principal;
this.interest = interest;
this.interestPaid = MoneyData.zero(currencyData(principal));
this.interestOutstanding = interest;
this.total = total;
this.totalPaid = MoneyData.zero(currencyData(principal));
this.totalOutstanding = totalOutstanding;
}
public boolean isInArrearsWithToleranceOf(MoneyData arrearsTolerance, LocalDate asOf) {
boolean inArrears = false;
if (arrearsTolerance.isGreaterThanZero()) {
inArrears = this.totalOutstanding.isGreaterThan(arrearsTolerance);
} else {
inArrears = this.totalOutstanding.isGreaterThanZero();
}
return inArrears && this.date.isBefore(asOf);
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public MoneyData getDisbursed() {
return disbursed;
}
public void setDisbursed(MoneyData disbursed) {
this.disbursed = disbursed;
}
public MoneyData getPrincipal() {
return principal;
}
public void setPrincipal(MoneyData principal) {
this.principal = principal;
}
public MoneyData getInterest() {
return interest;
}
public void setInterest(MoneyData interest) {
this.interest = interest;
}
public MoneyData getTotal() {
return total;
}
public void setTotal(MoneyData total) {
this.total = total;
}
public MoneyData getPrincipalPaid() {
return principalPaid;
}
public void setPrincipalPaid(MoneyData principalPaid) {
this.principalPaid = principalPaid;
}
public MoneyData getPrincipalOutstanding() {
return principalOutstanding;
}
public void setPrincipalOutstanding(MoneyData principalOutstanding) {
this.principalOutstanding = principalOutstanding;
}
public MoneyData getInterestPaid() {
return interestPaid;
}
public void setInterestPaid(MoneyData interestPaid) {
this.interestPaid = interestPaid;
}
public MoneyData getInterestOutstanding() {
return interestOutstanding;
}
public void setInterestOutstanding(MoneyData interestOutstanding) {
this.interestOutstanding = interestOutstanding;
}
public MoneyData getTotalPaid() {
return totalPaid;
}
public void setTotalPaid(MoneyData totalPaid) {
this.totalPaid = totalPaid;
}
public MoneyData getTotalOutstanding() {
return totalOutstanding;
}
public void setTotalOutstanding(MoneyData totalOutstanding) {
this.totalOutstanding = totalOutstanding;
}
public boolean isFullyPaid() {
return this.totalOutstanding.isZero();
}
public MoneyData getTotalArrears() {
return totalArrears;
}
public void setTotalArrears(MoneyData totalArrears) {
this.totalArrears = totalArrears;
}
public LocalDate getArrearsFrom() {
return arrearsFrom;
}
public void setArrearsFrom(LocalDate arrearsFrom) {
this.arrearsFrom = arrearsFrom;
}
public LocalDate getArrearsTo() {
return arrearsTo;
}
public void setArrearsTo(LocalDate arrearsTo) {
this.arrearsTo = arrearsTo;
}
public LocalDate getPaidInFullOn() {
return paidInFullOn;
}
public void setPaidInFullOn(LocalDate paidInFullOn) {
this.paidInFullOn = paidInFullOn;
}
public LocalDate getLastAffectingPaymentOn() {
return lastAffectingPaymentOn;
}
public void setLastAffectingPaymentOn(LocalDate lastAffectingPaymentOn) {
this.lastAffectingPaymentOn = lastAffectingPaymentOn;
}
public MoneyData getTotalWaived() {
return totalWaived;
}
public void setTotalWaived(MoneyData totalWaived) {
this.totalWaived = totalWaived;
}
}
@@ -1,29 +0,0 @@
package org.mifosng.data;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class LoanRepaymentScheduleData {
private List<LoanRepaymentPeriodData> periods = new ArrayList<LoanRepaymentPeriodData>();
public LoanRepaymentScheduleData() {
//
}
public LoanRepaymentScheduleData(
final List<LoanRepaymentPeriodData> periods) {
this.periods = periods;
}
public List<LoanRepaymentPeriodData> getPeriods() {
return periods;
}
public void setPeriods(List<LoanRepaymentPeriodData> periods) {
this.periods = periods;
}
}
@@ -1,63 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "loanSchedule")
public class LoanSchedule implements Serializable {
private List<ScheduledLoanInstallment> scheduledLoanInstallments = new ArrayList<ScheduledLoanInstallment>();
private static CurrencyData currencyData(MoneyData moneyData) {
String code = moneyData.getCurrencyCode();
String name = moneyData.getDefaultName();
int decimalPlaces = moneyData.getDigitsAfterDecimal();
String displaySymbol = moneyData.getDisplaySymbol();
String nameCode = moneyData.getNameCode();
return new CurrencyData(code, name, decimalPlaces, displaySymbol, nameCode);
}
public LoanSchedule() {
//
}
public LoanSchedule(final List<ScheduledLoanInstallment> scheduledLoanInstallments) {
this.scheduledLoanInstallments = scheduledLoanInstallments;
}
public MoneyData getCumulativePrincipal() {
MoneyData cumulative = MoneyData.zero(currencyData(this.scheduledLoanInstallments.get(0).getPrincipalDue()));
for (ScheduledLoanInstallment installment : this.scheduledLoanInstallments) {
cumulative = cumulative.plus(installment.getPrincipalDue());
}
return cumulative;
}
public MoneyData getCumulativeInterest() {
MoneyData cumulative = MoneyData.zero(currencyData(this.scheduledLoanInstallments.get(0).getPrincipalDue()));
for (ScheduledLoanInstallment installment : this.scheduledLoanInstallments) {
cumulative = cumulative.plus(installment.getInterestDue());
}
return cumulative;
}
public MoneyData getCumulativeTotal() {
MoneyData cumulative = MoneyData.zero(currencyData(this.scheduledLoanInstallments.get(0).getPrincipalDue()));
for (ScheduledLoanInstallment installment : this.scheduledLoanInstallments) {
cumulative = cumulative.plus(installment.getTotalInstallmentDue());
}
return cumulative;
}
public List<ScheduledLoanInstallment> getScheduledLoanInstallments() {
return this.scheduledLoanInstallments;
}
public void setScheduledLoanInstallments(
final List<ScheduledLoanInstallment> scheduledLoanInstallments) {
this.scheduledLoanInstallments = scheduledLoanInstallments;
}
}
@@ -1,188 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class MoneyData implements Serializable, Comparable<MoneyData> {
private String currencyCode;
private Integer digitsAfterDecimal;
private BigDecimal amount;
private String defaultName;
private String nameCode;
private String displaySymbol;
public static MoneyData of(final CurrencyData currency, final BigDecimal amount) {
return new MoneyData(currency.getCode(), currency.getDecimalPlaces(), currency.getName(), currency.getNameCode(), currency.getDisplaySymbol(), amount);
}
public static MoneyData zero(final CurrencyData currency) {
return new MoneyData(currency.getCode(), currency.getDecimalPlaces(), currency.getName(), currency.getNameCode(), currency.getDisplaySymbol(), BigDecimal.ZERO);
}
protected MoneyData() {
//
}
private MoneyData(final String currencyCode,
final int currencyDigitsAfterDecimal,
String defaultName, String nameCode, String displaySymbol,
final BigDecimal amount) {
this.currencyCode = currencyCode;
this.digitsAfterDecimal = currencyDigitsAfterDecimal;
this.defaultName = defaultName;
this.nameCode = nameCode;
this.displaySymbol = displaySymbol;
BigDecimal amountStripped = amount.stripTrailingZeros();
this.amount = amountStripped.setScale(this.digitsAfterDecimal,
RoundingMode.HALF_EVEN);
}
public MoneyData plus(final Iterable<? extends MoneyData> moniesToAdd) {
BigDecimal total = this.amount;
for (MoneyData moneyProvider : moniesToAdd) {
MoneyData money = this.checkCurrencyEqual(moneyProvider);
total = total.add(money.amount);
}
return MoneyData.of(currencyData(this), total);
}
public MoneyData plus(final MoneyData moneyToAdd) {
MoneyData toAdd = this.checkCurrencyEqual(moneyToAdd);
return this.plus(toAdd.getAmount());
}
public MoneyData plus(final BigDecimal amountToAdd) {
if (amountToAdd.compareTo(BigDecimal.ZERO) == 0) {
return this;
}
BigDecimal newAmount = this.amount.add(amountToAdd);
return MoneyData.of(currencyData(this), newAmount);
}
public MoneyData plus(final double amountToAdd) {
if (amountToAdd == 0) {
return this;
}
BigDecimal newAmount = this.amount.add(BigDecimal.valueOf(amountToAdd));
return MoneyData.of(currencyData(this), newAmount);
}
private static CurrencyData currencyData(MoneyData moneyData) {
String code = moneyData.getCurrencyCode();
String name = moneyData.getDefaultName();
int decimalPlaces = moneyData.getDigitsAfterDecimal();
String displaySymbol = moneyData.getDisplaySymbol();
String nameCode = moneyData.getNameCode();
return new CurrencyData(code, name, decimalPlaces, displaySymbol, nameCode);
}
private MoneyData checkCurrencyEqual(final MoneyData money) {
if (this.isSameCurrency(money) == false) {
throw new UnsupportedOperationException("currencies are different.");
}
return money;
}
public boolean isSameCurrency(final MoneyData money) {
return this.currencyCode.equals(money.getCurrencyCode());
}
public String getCurrencyCode() {
return this.currencyCode;
}
public BigDecimal getAmount() {
return this.amount;
}
public void setCurrencyCode(final String currencyCode) {
this.currencyCode = currencyCode;
}
public void setAmount(final BigDecimal amount) {
this.amount = amount;
}
public String getDefaultName() {
return defaultName;
}
public void setDefaultName(String defaultName) {
this.defaultName = defaultName;
}
public String getNameCode() {
return nameCode;
}
public void setNameCode(String nameCode) {
this.nameCode = nameCode;
}
public String getDisplaySymbol() {
return displaySymbol;
}
public void setDisplaySymbol(String displaySymbol) {
this.displaySymbol = displaySymbol;
}
public boolean isGreaterThanZero() {
return this.isGreaterThan(MoneyData.of(currencyData(this), BigDecimal.ZERO));
}
public boolean isGreaterThan(final MoneyData other) {
return this.compareTo(other) > 0;
}
public boolean isZero() {
return this.isEqualTo(MoneyData.zero(currencyData(this)));
}
public boolean isEqualTo(final MoneyData other) {
return this.compareTo(other) == 0;
}
@Override
public int compareTo(final MoneyData other) {
MoneyData otherMoney = other;
if (this.currencyCode.equals(otherMoney.currencyCode) == false) {
throw new UnsupportedOperationException(
"currencies arent different");
}
return this.amount.compareTo(otherMoney.amount);
}
@Override
public boolean equals(Object obj) {
MoneyData money = (MoneyData) obj;
return money.toString().equals(this.toString());
}
@Override
public int hashCode() {
return this.toString().hashCode();
}
@Override
public String toString() {
return new StringBuilder().append(this.amount.toPlainString()).toString();
}
public String getDisplaySymbolValue() {
return new StringBuilder().append(this.amount.toPlainString()).append(' ').append(this.displaySymbol).toString().trim();
}
public Integer getDigitsAfterDecimal() {
return digitsAfterDecimal;
}
public void setDigitsAfterDecimal(Integer digitsAfterDecimal) {
this.digitsAfterDecimal = digitsAfterDecimal;
}
}
@@ -1,126 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.xml.bind.annotation.XmlRootElement;
import org.joda.time.LocalDate;
@XmlRootElement(name = "installment")
public class ScheduledLoanInstallment implements Serializable {
private Integer installmentNumber;
private LocalDate periodStart;
private LocalDate periodEnd;
private MoneyData principalDue;
private MoneyData interestDue;
private MoneyData totalInstallmentDue;
private MoneyData outStandingBalance;
public ScheduledLoanInstallment() {
//
}
public ScheduledLoanInstallment(final Integer installmentNumber,
final LocalDate periodStart, final LocalDate periodEnd,
final MoneyData principalDue,
final MoneyData interestDue,
final MoneyData totalInstallmentDue,
final MoneyData outStandingBalance) {
this.installmentNumber = installmentNumber;
this.periodStart = periodStart;
this.periodEnd = periodEnd;
this.principalDue = principalDue;
this.interestDue = interestDue;
this.totalInstallmentDue = totalInstallmentDue;
this.outStandingBalance = outStandingBalance;
}
public Integer getInstallmentNumber() {
return this.installmentNumber;
}
public LocalDate getPeriodStart() {
return this.periodStart;
}
public LocalDate getPeriodEnd() {
return this.periodEnd;
}
// @DateTimeFormat(pattern = "yyyy-MM-dd")
public void setDueDate(final LocalDate dueDate) {
this.periodEnd = dueDate;
}
public void setPrincipal(final BigDecimal principal) {
CurrencyData currencyData = currencyData(this.principalDue);
this.principalDue = MoneyData.of(currencyData, principal);
this.totalInstallmentDue = this.principalDue.plus(this.interestDue);
}
private CurrencyData currencyData(MoneyData moneyData) {
String code = moneyData.getCurrencyCode();
String name = moneyData.getDefaultName();
int decimalPlaces = moneyData.getDigitsAfterDecimal();
String displaySymbol = moneyData.getDisplaySymbol();
String nameCode = moneyData.getNameCode();
return new CurrencyData(code, name, decimalPlaces, displaySymbol, nameCode);
}
public void setInterest(final BigDecimal interest) {
CurrencyData currencyData = currencyData(this.principalDue);
this.interestDue = MoneyData.of(currencyData, interest);
this.totalInstallmentDue = this.principalDue.plus(this.interestDue);
}
public void setOutstanding(final BigDecimal outstanding) {
CurrencyData currencyData = currencyData(this.principalDue);
this.outStandingBalance = MoneyData.of(currencyData, outstanding);
}
public MoneyData getPrincipalDue() {
return this.principalDue;
}
public void setPrincipalDue(final MoneyData principalDue) {
this.principalDue = principalDue;
}
public MoneyData getInterestDue() {
return this.interestDue;
}
public void setInterestDue(final MoneyData interestDue) {
this.interestDue = interestDue;
}
public MoneyData getTotalInstallmentDue() {
return this.totalInstallmentDue;
}
public void setTotalInstallmentDue(final MoneyData totalInstallmentDue) {
this.totalInstallmentDue = totalInstallmentDue;
}
public MoneyData getOutStandingBalance() {
return this.outStandingBalance;
}
public void setOutStandingBalance(final MoneyData outStandingBalance) {
this.outStandingBalance = outStandingBalance;
}
public void setInstallmentNumber(final Integer installmentNumber) {
this.installmentNumber = installmentNumber;
}
public void setPeriodStart(final LocalDate periodStart) {
this.periodStart = periodStart;
}
public void setPeriodEnd(final LocalDate periodEnd) {
this.periodEnd = periodEnd;
}
}