MIFOSX-32: start with modifing loan account data returned from get for use in the submit loan application and modify loan application flows.

This commit is contained in:
Keith Woodlock
2012-09-05 19:16:26 +01:00
parent 20234a8d6c
commit 6b2ec54a31
5 changed files with 365 additions and 547 deletions
@@ -103,7 +103,9 @@ public class LoansApiResource {
@Context final UriInfo uriInfo) {
Set<String> typicalResponseParameters = new HashSet<String>(
Arrays.asList("id", "externalId", "fundId", "fundName", "loanProductId", "loanProductName", "principal", "inArrearsTolerance", "numberOfRepayments",
Arrays.asList("id", "externalId", "clientId", "clientName", "fundId", "fundName", "loanProductId", "loanProductName", "loanProductDescription",
"currency",
"principal", "inArrearsTolerance", "numberOfRepayments",
"repaymentEvery", "interestRatePerPeriod", "annualInterestRate",
"repaymentFrequencyType", "interestRateFrequencyType", "amortizationType", "interestType", "interestCalculationPeriodType",
"submittedOnDate", "approvedOnDate", "expectedDisbursementDate", "actualDisbursementDate",
@@ -5,61 +5,65 @@ import java.util.Collection;
import org.joda.time.LocalDate;
/**
* Immutable data object representing loan account data.
*/
public class LoanAccountData {
private Long id;
private String externalId;
private Long fundId;
private String fundName;
private Long loanProductId;
private String loanProductName;
private final Long id;
private final String externalId;
private final Long clientId;
private final String clientName;
private final Long loanProductId;
private final String loanProductName;
private final String loanProductDescription;
private final Integer lifeCycleStatusId;
private final String lifeCycleStatusText;
private final LocalDate lifeCycleStatusDate;
private final Long fundId;
private final String fundName;
private LocalDate submittedOnDate;
private LocalDate approvedOnDate;
private LocalDate expectedDisbursementDate;
private LocalDate actualDisbursementDate;
private LocalDate expectedFirstRepaymentOnDate;
private LocalDate interestChargedFromDate;
private LocalDate closedOnDate;
private LocalDate expectedMaturityDate;
private final LocalDate submittedOnDate;
private final LocalDate approvedOnDate;
private final LocalDate expectedDisbursementDate;
private final LocalDate actualDisbursementDate;
private final LocalDate expectedFirstRepaymentOnDate;
private final LocalDate interestChargedFromDate;
private final LocalDate closedOnDate;
private final LocalDate expectedMaturityDate;
private MoneyData principal;
private MoneyData inArrearsTolerance;
private final CurrencyData currency;
private final MoneyData principal;
private final MoneyData inArrearsTolerance;
private Integer numberOfRepayments;
private Integer repaymentEvery;
private BigDecimal interestRatePerPeriod;
private BigDecimal annualInterestRate;
private final Integer numberOfRepayments;
private final Integer repaymentEvery;
private final BigDecimal interestRatePerPeriod;
private final BigDecimal annualInterestRate;
private EnumOptionData repaymentFrequencyType;
private EnumOptionData interestRateFrequencyType;
private EnumOptionData amortizationType;
private EnumOptionData interestType;
private EnumOptionData interestCalculationPeriodType;
private final EnumOptionData repaymentFrequencyType;
private final EnumOptionData interestRateFrequencyType;
private final EnumOptionData amortizationType;
private final EnumOptionData interestType;
private final EnumOptionData interestCalculationPeriodType;
private Integer lifeCycleStatusId;
private String lifeCycleStatusText;
private LocalDate lifeCycleStatusDate;
private final LoanAccountSummaryData summary;
private final Collection<LoanRepaymentPeriodData> repaymentSchedule;
private final Collection<LoanRepaymentTransactionData> loanRepayments;
private LoanAccountSummaryData summary;
private Collection<LoanRepaymentPeriodData> repaymentSchedule;
private Collection<LoanRepaymentTransactionData> loanRepayments;
private final LoanPermissionData permissions;
private LoanPermissionData permissions;
private final LoanConvenienceData convenienceData;
private Collection<ChargeData> charges;
private LoanConvenienceData convenienceData;
private Collection<ChargeData> charges;
protected LoanAccountData() {
//
}
public LoanAccountData(LoanBasicDetailsData basicDetails,
LoanAccountSummaryData summary,
Collection<LoanRepaymentPeriodData> repaymentSchedule,
Collection<LoanRepaymentTransactionData> loanRepayments,
LoanPermissionData permissions, Collection<ChargeData> charges) {
public LoanAccountData(
final LoanBasicDetailsData basicDetails,
final LoanAccountSummaryData summary,
final Collection<LoanRepaymentPeriodData> repaymentSchedule,
final Collection<LoanRepaymentTransactionData> loanRepayments,
final LoanPermissionData permissions,
final Collection<ChargeData> charges) {
this.summary = summary;
this.repaymentSchedule = repaymentSchedule;
this.loanRepayments = loanRepayments;
@@ -85,10 +89,14 @@ public class LoanAccountData {
this.id = basicDetails.getId();
this.externalId = basicDetails.getExternalId();
this.fundId = basicDetails.getFundId();
this.fundName = basicDetails.getFundName();
this.clientId = basicDetails.getClientId();
this.clientName = basicDetails.getClientName();
this.loanProductId = basicDetails.getLoanProductId();
this.loanProductName = basicDetails.getLoanProductName();
this.loanProductDescription = basicDetails.getLoanProductDescription();
this.fundId = basicDetails.getFundId();
this.fundName = basicDetails.getFundName();
this.submittedOnDate = basicDetails.getSubmittedOnDate();
this.approvedOnDate = basicDetails.getApprovedOnDate();
this.expectedDisbursementDate = basicDetails
@@ -100,6 +108,8 @@ public class LoanAccountData {
.getExpectedFirstRepaymentOnDate();
this.interestChargedFromDate = basicDetails
.getInterestChargedFromDate();
this.currency = basicDetails.getCurrency();
this.principal = basicDetails.getPrincipal();
this.inArrearsTolerance = basicDetails.getInArrearsTolerance();
this.numberOfRepayments = basicDetails.getNumberOfRepayments();
@@ -118,277 +128,156 @@ public class LoanAccountData {
this.lifeCycleStatusDate = basicDetails.getLifeCycleStatusDate();
}
public LoanConvenienceData getConvenienceData() {
return convenienceData;
}
public void setConvenienceData(LoanConvenienceData convenienceData) {
this.convenienceData = convenienceData;
}
public LoanPermissionData getPermissions() {
return permissions;
}
public void setPermissions(LoanPermissionData permissions) {
this.permissions = permissions;
}
public LoanAccountSummaryData getSummary() {
return summary;
}
public void setSummary(LoanAccountSummaryData summary) {
this.summary = summary;
}
public Collection<LoanRepaymentPeriodData> getRepaymentSchedule() {
return repaymentSchedule;
}
public void setRepaymentSchedule(
Collection<LoanRepaymentPeriodData> repaymentSchedule) {
this.repaymentSchedule = repaymentSchedule;
}
public Collection<LoanRepaymentTransactionData> getLoanRepayments() {
return loanRepayments;
}
public void setLoanRepayments(
Collection<LoanRepaymentTransactionData> loanRepayments) {
this.loanRepayments = loanRepayments;
}
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 Long getClientId() {
return clientId;
}
public String getLoanProductName() {
return loanProductName;
}
public void setLoanProductName(String loanProductName) {
this.loanProductName = loanProductName;
}
public LocalDate getSubmittedOnDate() {
return submittedOnDate;
}
public void setSubmittedOnDate(LocalDate submittedOnDate) {
this.submittedOnDate = submittedOnDate;
}
public LocalDate getApprovedOnDate() {
return approvedOnDate;
}
public void setApprovedOnDate(LocalDate approvedOnDate) {
this.approvedOnDate = approvedOnDate;
}
public LocalDate getExpectedDisbursementDate() {
return expectedDisbursementDate;
}
public void setExpectedDisbursementDate(LocalDate expectedDisbursementDate) {
this.expectedDisbursementDate = expectedDisbursementDate;
}
public LocalDate getActualDisbursementDate() {
return actualDisbursementDate;
}
public void setActualDisbursementDate(LocalDate actualDisbursementDate) {
this.actualDisbursementDate = actualDisbursementDate;
}
public LocalDate getExpectedFirstRepaymentOnDate() {
return expectedFirstRepaymentOnDate;
}
public void setExpectedFirstRepaymentOnDate(
LocalDate expectedFirstRepaymentOnDate) {
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
}
public LocalDate getInterestChargedFromDate() {
return interestChargedFromDate;
}
public void setInterestChargedFromDate(LocalDate interestChargedFromDate) {
this.interestChargedFromDate = interestChargedFromDate;
}
public LocalDate getClosedOnDate() {
return closedOnDate;
}
public void setClosedOnDate(LocalDate closedOnDate) {
this.closedOnDate = closedOnDate;
}
public LocalDate getExpectedMaturityDate() {
return expectedMaturityDate;
}
public void setExpectedMaturityDate(LocalDate expectedMaturityDate) {
this.expectedMaturityDate = expectedMaturityDate;
}
public MoneyData getPrincipal() {
return principal;
}
public void setPrincipal(MoneyData principal) {
this.principal = principal;
}
public MoneyData getInArrearsTolerance() {
return inArrearsTolerance;
}
public void setInArrearsTolerance(MoneyData inArrearsTolerance) {
this.inArrearsTolerance = inArrearsTolerance;
}
public Integer getNumberOfRepayments() {
return numberOfRepayments;
}
public void setNumberOfRepayments(Integer numberOfRepayments) {
this.numberOfRepayments = numberOfRepayments;
}
public Integer getRepaymentEvery() {
return repaymentEvery;
}
public void setRepaymentEvery(Integer repaymentEvery) {
this.repaymentEvery = repaymentEvery;
}
public BigDecimal getInterestRatePerPeriod() {
return interestRatePerPeriod;
}
public void setInterestRatePerPeriod(BigDecimal interestRatePerPeriod) {
this.interestRatePerPeriod = interestRatePerPeriod;
}
public BigDecimal getAnnualInterestRate() {
return annualInterestRate;
}
public void setAnnualInterestRate(BigDecimal annualInterestRate) {
this.annualInterestRate = annualInterestRate;
}
public EnumOptionData getRepaymentFrequencyType() {
return repaymentFrequencyType;
}
public void setRepaymentFrequencyType(EnumOptionData repaymentFrequencyType) {
this.repaymentFrequencyType = repaymentFrequencyType;
}
public EnumOptionData getInterestRateFrequencyType() {
return interestRateFrequencyType;
}
public void setInterestRateFrequencyType(
EnumOptionData interestRateFrequencyType) {
this.interestRateFrequencyType = interestRateFrequencyType;
}
public EnumOptionData getAmortizationType() {
return amortizationType;
}
public void setAmortizationType(EnumOptionData amortizationType) {
this.amortizationType = amortizationType;
}
public EnumOptionData getInterestType() {
return interestType;
}
public void setInterestType(EnumOptionData interestType) {
this.interestType = interestType;
}
public EnumOptionData getInterestCalculationPeriodType() {
return interestCalculationPeriodType;
}
public void setInterestCalculationPeriodType(
EnumOptionData interestCalculationPeriodType) {
this.interestCalculationPeriodType = interestCalculationPeriodType;
}
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 getFundId() {
return fundId;
}
public void setFundId(Long fundId) {
this.fundId = fundId;
}
public String getFundName() {
return fundName;
}
public void setFundName(String fundName) {
this.fundName = fundName;
public String getClientName() {
return clientName;
}
public Long getLoanProductId() {
return loanProductId;
}
public void setLoanProductId(Long loanProductId) {
this.loanProductId = loanProductId;
public String getLoanProductName() {
return loanProductName;
}
public String getLoanProductDescription() {
return loanProductDescription;
}
public Long getFundId() {
return fundId;
}
public String getFundName() {
return fundName;
}
public LocalDate getSubmittedOnDate() {
return submittedOnDate;
}
public LocalDate getApprovedOnDate() {
return approvedOnDate;
}
public LocalDate getExpectedDisbursementDate() {
return expectedDisbursementDate;
}
public LocalDate getActualDisbursementDate() {
return actualDisbursementDate;
}
public LocalDate getExpectedFirstRepaymentOnDate() {
return expectedFirstRepaymentOnDate;
}
public LocalDate getInterestChargedFromDate() {
return interestChargedFromDate;
}
public LocalDate getClosedOnDate() {
return closedOnDate;
}
public LocalDate getExpectedMaturityDate() {
return expectedMaturityDate;
}
public CurrencyData getCurrency() {
return currency;
}
public MoneyData getPrincipal() {
return principal;
}
public MoneyData getInArrearsTolerance() {
return inArrearsTolerance;
}
public Integer getNumberOfRepayments() {
return numberOfRepayments;
}
public Integer getRepaymentEvery() {
return repaymentEvery;
}
public BigDecimal getInterestRatePerPeriod() {
return interestRatePerPeriod;
}
public BigDecimal getAnnualInterestRate() {
return annualInterestRate;
}
public EnumOptionData getRepaymentFrequencyType() {
return repaymentFrequencyType;
}
public EnumOptionData getInterestRateFrequencyType() {
return interestRateFrequencyType;
}
public EnumOptionData getAmortizationType() {
return amortizationType;
}
public EnumOptionData getInterestType() {
return interestType;
}
public EnumOptionData getInterestCalculationPeriodType() {
return interestCalculationPeriodType;
}
public Integer getLifeCycleStatusId() {
return lifeCycleStatusId;
}
public void setLifeCycleStatusId(Integer lifeCycleStatusId) {
this.lifeCycleStatusId = lifeCycleStatusId;
public String getLifeCycleStatusText() {
return lifeCycleStatusText;
}
public LocalDate getLifeCycleStatusDate() {
return lifeCycleStatusDate;
}
public LoanAccountSummaryData getSummary() {
return summary;
}
public Collection<LoanRepaymentPeriodData> getRepaymentSchedule() {
return repaymentSchedule;
}
public Collection<LoanRepaymentTransactionData> getLoanRepayments() {
return loanRepayments;
}
public LoanPermissionData getPermissions() {
return permissions;
}
public LoanConvenienceData getConvenienceData() {
return convenienceData;
}
public Collection<ChargeData> getCharges() {
return charges;
return this.charges;
}
public void setCharges(Collection<ChargeData> charges) {
@@ -9,64 +9,82 @@ import org.joda.time.Months;
public class LoanBasicDetailsData {
private Long id;
private String externalId;
private Long fundId;
private String fundName;
private Long loanProductId;
private String loanProductName;
private final Long id;
private final String externalId;
private final Long clientId;
private final String clientName;
private final Long loanProductId;
private final String loanProductName;
private final String loanProductDescription;
private final Long fundId;
private final String fundName;
private final LocalDate submittedOnDate;
private final LocalDate approvedOnDate;
private final LocalDate expectedDisbursementDate;
private final LocalDate actualDisbursementDate;
private final LocalDate expectedFirstRepaymentOnDate;
private final LocalDate interestChargedFromDate;
private final LocalDate closedOnDate;
private final LocalDate expectedMaturityDate;
private LocalDate submittedOnDate;
private LocalDate approvedOnDate;
private LocalDate expectedDisbursementDate;
private LocalDate actualDisbursementDate;
private LocalDate expectedFirstRepaymentOnDate;
private LocalDate interestChargedFromDate;
private LocalDate closedOnDate;
private LocalDate expectedMaturityDate;
private final CurrencyData currency;
private final MoneyData principal;
private final MoneyData inArrearsTolerance;
private MoneyData principal;
private MoneyData inArrearsTolerance;
private final Integer numberOfRepayments;
private final Integer repaymentEvery;
private final BigDecimal interestRatePerPeriod;
private final BigDecimal annualInterestRate;
private Integer numberOfRepayments;
private Integer repaymentEvery;
private BigDecimal interestRatePerPeriod;
private BigDecimal annualInterestRate;
private final EnumOptionData repaymentFrequencyType;
private final EnumOptionData interestRateFrequencyType;
private final EnumOptionData amortizationType;
private final EnumOptionData interestType;
private final EnumOptionData interestCalculationPeriodType;
private EnumOptionData repaymentFrequencyType;
private EnumOptionData interestRateFrequencyType;
private EnumOptionData amortizationType;
private EnumOptionData interestType;
private EnumOptionData interestCalculationPeriodType;
private final Integer lifeCycleStatusId;
private final String lifeCycleStatusText;
private final LocalDate lifeCycleStatusDate;
private Integer lifeCycleStatusId;
private String lifeCycleStatusText;
private LocalDate lifeCycleStatusDate;
protected LoanBasicDetailsData() {
//
}
public LoanBasicDetailsData(Long id, String externalId, Long loanProductId,
String loanProductName, Long fundId, String fundName,
LocalDate closedOnDate, LocalDate submittedOnDate,
LocalDate approvedOnDate, LocalDate expectedDisbursementDate,
LocalDate actualDisbursementDate, LocalDate expectedMaturityDate,
LocalDate expectedFirstRepaymentOnDate,
LocalDate interestChargedFromDate, MoneyData principal,
MoneyData inArrearsTolerance, Integer numberOfRepayments,
Integer repaymentEvery, BigDecimal interestRatePerPeriod,
BigDecimal annualInterestRate,
EnumOptionData repaymentFrequencyType,
EnumOptionData interestRateFrequencyType,
EnumOptionData amortizationType, EnumOptionData interestType,
EnumOptionData interestCalculationPeriodType,
Integer lifeCycleStatusId, String lifeCycleStatusText,
LocalDate lifeCycleStatusDate) {
public LoanBasicDetailsData(
final Long id,
final String externalId,
final Long clientId, final String clientName,
final Long loanProductId,
final String loanProductName,
final String loanProductDescription,
final Long fundId, String fundName,
final LocalDate closedOnDate,
final LocalDate submittedOnDate,
final LocalDate approvedOnDate,
final LocalDate expectedDisbursementDate,
final LocalDate actualDisbursementDate,
final LocalDate expectedMaturityDate,
final LocalDate expectedFirstRepaymentOnDate,
final LocalDate interestChargedFromDate,
final CurrencyData currency,
final MoneyData principal,
final MoneyData inArrearsTolerance,
final Integer numberOfRepayments,
final Integer repaymentEvery,
final BigDecimal interestRatePerPeriod,
final BigDecimal annualInterestRate,
final EnumOptionData repaymentFrequencyType,
final EnumOptionData interestRateFrequencyType,
final EnumOptionData amortizationType,
final EnumOptionData interestType,
final EnumOptionData interestCalculationPeriodType,
final Integer lifeCycleStatusId,
final String lifeCycleStatusText,
final LocalDate lifeCycleStatusDate) {
this.id = id;
this.externalId = externalId;
this.clientId = clientId;
this.clientName = clientName;
this.loanProductId = loanProductId;
this.loanProductName = loanProductName;
this.loanProductDescription = loanProductDescription;
this.fundId = fundId;
this.fundName = fundName;
this.closedOnDate = closedOnDate;
@@ -77,6 +95,7 @@ public class LoanBasicDetailsData {
this.expectedMaturityDate = expectedMaturityDate;
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
this.interestChargedFromDate = interestChargedFromDate;
this.currency = currency;
this.principal = principal;
this.inArrearsTolerance = inArrearsTolerance;
this.numberOfRepayments = numberOfRepayments;
@@ -186,227 +205,127 @@ public class LoanBasicDetailsData {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
public Long getClientId() {
return clientId;
}
public String getLoanProductName() {
return loanProductName;
}
public void setLoanProductName(String loanProductName) {
this.loanProductName = loanProductName;
}
public LocalDate getSubmittedOnDate() {
return submittedOnDate;
}
public void setSubmittedOnDate(LocalDate submittedOnDate) {
this.submittedOnDate = submittedOnDate;
}
public LocalDate getApprovedOnDate() {
return approvedOnDate;
}
public void setApprovedOnDate(LocalDate approvedOnDate) {
this.approvedOnDate = approvedOnDate;
}
public LocalDate getExpectedDisbursementDate() {
return expectedDisbursementDate;
}
public void setExpectedDisbursementDate(LocalDate expectedDisbursementDate) {
this.expectedDisbursementDate = expectedDisbursementDate;
}
public LocalDate getActualDisbursementDate() {
return actualDisbursementDate;
}
public void setActualDisbursementDate(LocalDate actualDisbursementDate) {
this.actualDisbursementDate = actualDisbursementDate;
}
public LocalDate getExpectedFirstRepaymentOnDate() {
return expectedFirstRepaymentOnDate;
}
public void setExpectedFirstRepaymentOnDate(
LocalDate expectedFirstRepaymentOnDate) {
this.expectedFirstRepaymentOnDate = expectedFirstRepaymentOnDate;
}
public LocalDate getInterestChargedFromDate() {
return interestChargedFromDate;
}
public void setInterestChargedFromDate(LocalDate interestChargedFromDate) {
this.interestChargedFromDate = interestChargedFromDate;
}
public LocalDate getClosedOnDate() {
return closedOnDate;
}
public void setClosedOnDate(LocalDate closedOnDate) {
this.closedOnDate = closedOnDate;
}
public LocalDate getExpectedMaturityDate() {
return expectedMaturityDate;
}
public void setExpectedMaturityDate(LocalDate expectedMaturityDate) {
this.expectedMaturityDate = expectedMaturityDate;
}
public MoneyData getPrincipal() {
return principal;
}
public void setPrincipal(MoneyData principal) {
this.principal = principal;
}
public MoneyData getInArrearsTolerance() {
return inArrearsTolerance;
}
public void setInArrearsTolerance(MoneyData inArrearsTolerance) {
this.inArrearsTolerance = inArrearsTolerance;
}
public Integer getNumberOfRepayments() {
return numberOfRepayments;
}
public void setNumberOfRepayments(Integer numberOfRepayments) {
this.numberOfRepayments = numberOfRepayments;
}
public Integer getRepaymentEvery() {
return repaymentEvery;
}
public void setRepaymentEvery(Integer repaymentEvery) {
this.repaymentEvery = repaymentEvery;
}
public BigDecimal getInterestRatePerPeriod() {
return interestRatePerPeriod;
}
public void setInterestRatePerPeriod(BigDecimal interestRatePerPeriod) {
this.interestRatePerPeriod = interestRatePerPeriod;
}
public BigDecimal getAnnualInterestRate() {
return annualInterestRate;
}
public void setAnnualInterestRate(BigDecimal annualInterestRate) {
this.annualInterestRate = annualInterestRate;
}
public EnumOptionData getRepaymentFrequencyType() {
return repaymentFrequencyType;
}
public void setRepaymentFrequencyType(EnumOptionData repaymentFrequencyType) {
this.repaymentFrequencyType = repaymentFrequencyType;
}
public EnumOptionData getInterestRateFrequencyType() {
return interestRateFrequencyType;
}
public void setInterestRateFrequencyType(
EnumOptionData interestRateFrequencyType) {
this.interestRateFrequencyType = interestRateFrequencyType;
}
public EnumOptionData getAmortizationType() {
return amortizationType;
}
public void setAmortizationType(EnumOptionData amortizationType) {
this.amortizationType = amortizationType;
}
public EnumOptionData getInterestType() {
return interestType;
}
public void setInterestType(EnumOptionData interestType) {
this.interestType = interestType;
}
public EnumOptionData getInterestCalculationPeriodType() {
return interestCalculationPeriodType;
}
public void setInterestCalculationPeriodType(
EnumOptionData interestCalculationPeriodType) {
this.interestCalculationPeriodType = interestCalculationPeriodType;
}
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 String getClientName() {
return clientName;
}
public Long getFundId() {
return fundId;
}
public void setFundId(Long fundId) {
this.fundId = fundId;
}
public String getFundName() {
return fundName;
}
public void setFundName(String fundName) {
this.fundName = fundName;
}
public Long getLoanProductId() {
return loanProductId;
}
public void setLoanProductId(Long loanProductId) {
this.loanProductId = loanProductId;
public String getLoanProductName() {
return loanProductName;
}
public String getLoanProductDescription() {
return loanProductDescription;
}
public LocalDate getSubmittedOnDate() {
return submittedOnDate;
}
public LocalDate getApprovedOnDate() {
return approvedOnDate;
}
public LocalDate getExpectedDisbursementDate() {
return expectedDisbursementDate;
}
public LocalDate getActualDisbursementDate() {
return actualDisbursementDate;
}
public LocalDate getExpectedFirstRepaymentOnDate() {
return expectedFirstRepaymentOnDate;
}
public LocalDate getInterestChargedFromDate() {
return interestChargedFromDate;
}
public LocalDate getClosedOnDate() {
return closedOnDate;
}
public LocalDate getExpectedMaturityDate() {
return expectedMaturityDate;
}
public CurrencyData getCurrency() {
return currency;
}
public MoneyData getPrincipal() {
return principal;
}
public MoneyData getInArrearsTolerance() {
return inArrearsTolerance;
}
public Integer getNumberOfRepayments() {
return numberOfRepayments;
}
public Integer getRepaymentEvery() {
return repaymentEvery;
}
public BigDecimal getInterestRatePerPeriod() {
return interestRatePerPeriod;
}
public BigDecimal getAnnualInterestRate() {
return annualInterestRate;
}
public EnumOptionData getRepaymentFrequencyType() {
return repaymentFrequencyType;
}
public EnumOptionData getInterestRateFrequencyType() {
return interestRateFrequencyType;
}
public EnumOptionData getAmortizationType() {
return amortizationType;
}
public EnumOptionData getInterestType() {
return interestType;
}
public EnumOptionData getInterestCalculationPeriodType() {
return interestCalculationPeriodType;
}
public Integer getLifeCycleStatusId() {
return lifeCycleStatusId;
}
public void setLifeCycleStatusId(Integer lifeCycleStatusId) {
this.lifeCycleStatusId = lifeCycleStatusId;
public String getLifeCycleStatusText() {
return lifeCycleStatusText;
}
public LocalDate getLifeCycleStatusDate() {
return lifeCycleStatusDate;
}
}
@@ -139,8 +139,9 @@ public class GoogleGsonApiJsonSerializerService implements
"allowedProducts"));
private static final Set<String> LOAN_DATA_PARAMETERS = new HashSet<String>(
Arrays.asList("id", "externalId", "fundId", "fundName",
"loanProductId", "loanProductName", "principal",
Arrays.asList("id", "externalId", "clientId", "clientName", "fundId", "fundName",
"loanProductId", "loanProductName", "loanProductDescription",
"currency", "principal",
"inArrearsTolerance", "numberOfRepayments",
"repaymentEvery", "interestRatePerPeriod",
"annualInterestRate", "repaymentFrequencyType",
@@ -413,7 +413,9 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
RowMapper<LoanBasicDetailsData> {
public String loanSchema() {
return "l.id as id, l.external_id as externalId, l.fund_id as fundId, f.name as fundName, lp.id as loanProductId, lp.name as loanProductName, l.submittedon_date as submittedOnDate,"
return "l.id as id, l.external_id as externalId, l.fund_id as fundId, f.name as fundName, "
+ " lp.id as loanProductId, lp.name as loanProductName, lp.description as loanProductDescription, c.id as clientId, c.display_name as clientName, "
+ " l.submittedon_date as submittedOnDate,"
+ " l.approvedon_date as approvedOnDate, l.expected_disbursedon_date as expectedDisbursementDate, l.disbursedon_date as actualDisbursementDate, l.expected_firstrepaymenton_date as expectedFirstRepaymentOnDate,"
+ " l.interest_calculated_from_date as interestChargedFromDate, l.closedon_date as closedOnDate, l.expected_maturedon_date as expectedMaturityDate, "
+ " l.principal_amount as principal, l.arrearstolerance_amount as inArrearsTolerance, l.number_of_repayments as numberOfRepayments, l.repay_every as repaymentEvery,"
@@ -423,6 +425,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
+ " l.loan_status_id as lifeCycleStatusId, "
+ " l.currency_code as currencyCode, l.currency_digits as currencyDigits, rc.`name` as currencyName, rc.display_symbol as currencyDisplaySymbol, rc.internationalized_name_code as currencyNameCode"
+ " from m_loan l"
+ " join m_client c on c.id = l.client_id"
+ " join m_product_loan lp on lp.id = l.product_id"
+ " join m_currency rc on rc.`code` = l.currency_code"
+ " left join m_fund f on f.id = l.fund_id";
@@ -435,20 +438,22 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
String currencyCode = rs.getString("currencyCode");
String currencyName = rs.getString("currencyName");
String currencyNameCode = rs.getString("currencyNameCode");
String currencyDisplaySymbol = rs
.getString("currencyDisplaySymbol");
Integer currencyDigits = JdbcSupport.getInteger(rs,
"currencyDigits");
String currencyDisplaySymbol = rs.getString("currencyDisplaySymbol");
Integer currencyDigits = JdbcSupport.getInteger(rs,"currencyDigits");
CurrencyData currencyData = new CurrencyData(currencyCode,
currencyName, currencyDigits, currencyDisplaySymbol,
currencyNameCode);
Long id = rs.getLong("id");
String externalId = rs.getString("externalId");
Long clientId = JdbcSupport.getLong(rs, "clientId");
String clientName = rs.getString("clientName");
Long fundId = JdbcSupport.getLong(rs, "fundId");
String fundName = rs.getString("fundName");
Long loanProductId = JdbcSupport.getLong(rs, "loanProductId");
String loanProductName = rs.getString("loanProductName");
String loanProductDescription = rs.getString("loanProductDescription");
LocalDate submittedOnDate = JdbcSupport.getLocalDate(rs,
"submittedOnDate");
LocalDate approvedOnDate = JdbcSupport.getLocalDate(rs,
@@ -516,11 +521,13 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
lifeCycleStatusDate = closedOnDate;
}
return new LoanBasicDetailsData(id, externalId, loanProductId,
loanProductName, fundId, fundName, closedOnDate,
return new LoanBasicDetailsData(id, externalId, clientId, clientName,
loanProductId, loanProductName, loanProductDescription,
fundId, fundName, closedOnDate,
submittedOnDate, approvedOnDate, expectedDisbursementDate,
actualDisbursementDate, expectedMaturityDate,
expectedFirstRepaymentOnDate, interestChargedFromDate,
currencyData,
principal, inArrearsTolerance, numberOfRepayments,
repaymentEvery, interestRatePerPeriod, annualInterestRate,
repaymentFrequencyType, interestRateFrequencyType,