remove warnings
This commit is contained in:
+1
@@ -18,6 +18,7 @@ public class PaginationHelper<E> {
|
||||
final List<E> items = jt.query(sqlFetchRows, args, rowMapper);
|
||||
|
||||
// determine how many rows are available
|
||||
@SuppressWarnings("deprecation")
|
||||
final int totalFilteredRecords = jt.queryForInt(sqlCountRows);
|
||||
|
||||
return new Page<>(items, totalFilteredRecords);
|
||||
|
||||
+22
-20
@@ -518,7 +518,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
/***
|
||||
* In cases of tables storing hierarchical entities (like m_group),
|
||||
* different entities would end up being stored in the same table.
|
||||
*
|
||||
*
|
||||
* Ex: Centers are a specific type of group, add abstractions for
|
||||
* the same
|
||||
***/
|
||||
@@ -678,6 +678,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private int getCodeIdForColumn(final String dataTableNameAlias, final String name) {
|
||||
final StringBuilder checkColumnCodeMapping = new StringBuilder();
|
||||
checkColumnCodeMapping.append("select ccm.code_id from x_table_column_code_mappings ccm where ccm.column_alias_name='")
|
||||
@@ -745,6 +746,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
.append(" WHERE i.CONSTRAINT_TYPE = 'FOREIGN KEY'").append(" AND i.TABLE_SCHEMA = DATABASE()")
|
||||
.append(" AND i.TABLE_NAME = '").append(datatableName).append("' AND i.CONSTRAINT_NAME = 'fk_").append(datatableAlias)
|
||||
.append("_").append(name).append("' ");
|
||||
@SuppressWarnings("deprecation")
|
||||
final int count = this.jdbcTemplate.queryForInt(findFKSql.toString());
|
||||
if (count > 0) {
|
||||
codeMappings.add(datatableAlias + "_" + name);
|
||||
@@ -781,7 +783,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
/**
|
||||
* Update data table, set column value to empty string where current value
|
||||
* is NULL. Run update SQL only if the "mandatory" property is set to true
|
||||
*
|
||||
*
|
||||
* @param datatableName
|
||||
* Name of data table
|
||||
* @param column
|
||||
@@ -1316,9 +1318,9 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
String selectColumns = "";
|
||||
String columnName = "";
|
||||
String pValue = null;
|
||||
for(final ResultsetColumnHeaderData pColumnHeader : columnHeaders) {
|
||||
for (final ResultsetColumnHeaderData pColumnHeader : columnHeaders) {
|
||||
final String key = pColumnHeader.getColumnName();
|
||||
if(affectedColumns.containsKey(key)) {
|
||||
if (affectedColumns.containsKey(key)) {
|
||||
pValue = affectedColumns.get(key);
|
||||
if (StringUtils.isEmpty(pValue)) {
|
||||
pValueWrite = "null";
|
||||
@@ -1326,7 +1328,8 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
if ("bit".equalsIgnoreCase(pColumnHeader.getColumnType())) {
|
||||
pValueWrite = BooleanUtils.toString(BooleanUtils.toBooleanObject(pValue), "1", "0", "null");
|
||||
} else {
|
||||
pValueWrite = singleQuote + this.genericDataService.replace(pValue, singleQuote, singleQuote + singleQuote) + singleQuote;
|
||||
pValueWrite = singleQuote + this.genericDataService.replace(pValue, singleQuote, singleQuote + singleQuote)
|
||||
+ singleQuote;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1347,7 +1350,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
/**
|
||||
* This method is used special for ppi cases Where the score need to be
|
||||
* computed
|
||||
*
|
||||
*
|
||||
* @param columnHeaders
|
||||
* @param datatable
|
||||
* @param fkName
|
||||
@@ -1395,9 +1398,8 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
return vaddSql;
|
||||
}
|
||||
|
||||
private String getUpdateSql(List<ResultsetColumnHeaderData> columnHeaders, final String datatable,
|
||||
final String keyFieldName, final Long keyFieldValue,
|
||||
final Map<String, Object> changedColumns) {
|
||||
private String getUpdateSql(List<ResultsetColumnHeaderData> columnHeaders, final String datatable, final String keyFieldName,
|
||||
final Long keyFieldValue, final Map<String, Object> changedColumns) {
|
||||
|
||||
// just updating fields that have changed since pre-update read - though
|
||||
// its possible these values are different from the page the user was
|
||||
@@ -1415,7 +1417,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
String sql = "update `" + datatable + "` ";
|
||||
for (final ResultsetColumnHeaderData pColumnHeader : columnHeaders) {
|
||||
final String key = pColumnHeader.getColumnName();
|
||||
if(changedColumns.containsKey(key)) {
|
||||
if (changedColumns.containsKey(key)) {
|
||||
if (firstColumn) {
|
||||
sql += " set ";
|
||||
firstColumn = false;
|
||||
@@ -1430,7 +1432,8 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
if ("bit".equalsIgnoreCase(pColumnHeader.getColumnType())) {
|
||||
pValueWrite = BooleanUtils.toString(BooleanUtils.toBooleanObject(pValue), "1", "0", "null");
|
||||
} else {
|
||||
pValueWrite = singleQuote + this.genericDataService.replace(pValue, singleQuote, singleQuote + singleQuote) + singleQuote;
|
||||
pValueWrite = singleQuote + this.genericDataService.replace(pValue, singleQuote, singleQuote + singleQuote)
|
||||
+ singleQuote;
|
||||
}
|
||||
}
|
||||
sql += "`" + key + "` = " + pValueWrite;
|
||||
@@ -1528,8 +1531,8 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
final Locale clientApplicationLocale) {
|
||||
|
||||
String paramValue = pValue;
|
||||
if (columnHeader.isDateDisplayType() || columnHeader.isDateTimeDisplayType()
|
||||
|| columnHeader.isIntegerDisplayType() || columnHeader.isDecimalDisplayType() || columnHeader.isBooleanDisplayType()) {
|
||||
if (columnHeader.isDateDisplayType() || columnHeader.isDateTimeDisplayType() || columnHeader.isIntegerDisplayType()
|
||||
|| columnHeader.isDecimalDisplayType() || columnHeader.isBooleanDisplayType()) {
|
||||
// only trim if string is not empty and is not null.
|
||||
// throws a NULL pointer exception if the check below is not applied
|
||||
paramValue = StringUtils.isNotEmpty(paramValue) ? paramValue.trim() : paramValue;
|
||||
@@ -1588,8 +1591,8 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
paramValue = tmpDate.toString();
|
||||
}
|
||||
} else if (columnHeader.isDateTimeDisplayType()) {
|
||||
final LocalDateTime tmpDateTime = JsonParserHelper.convertDateTimeFrom(paramValue,
|
||||
columnHeader.getColumnName(), dateFormat, clientApplicationLocale);
|
||||
final LocalDateTime tmpDateTime = JsonParserHelper.convertDateTimeFrom(paramValue, columnHeader.getColumnName(),
|
||||
dateFormat, clientApplicationLocale);
|
||||
if (tmpDateTime == null) {
|
||||
paramValue = null;
|
||||
} else {
|
||||
@@ -1613,16 +1616,15 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
|
||||
final Boolean tmpBoolean = BooleanUtils.toBooleanObject(paramValue);
|
||||
if (tmpBoolean == null) {
|
||||
final ApiParameterError error = ApiParameterError.parameterError("validation.msg.invalid.boolean.format", "The parameter "
|
||||
+ columnHeader.getColumnName() + " has value: " + paramValue + " which is invalid boolean value.",
|
||||
columnHeader.getColumnName(), paramValue);
|
||||
final ApiParameterError error = ApiParameterError.parameterError("validation.msg.invalid.boolean.format",
|
||||
"The parameter " + columnHeader.getColumnName() + " has value: " + paramValue
|
||||
+ " which is invalid boolean value.", columnHeader.getColumnName(), paramValue);
|
||||
final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
|
||||
dataValidationErrors.add(error);
|
||||
throw new PlatformApiDataValidationException("validation.msg.validation.errors.exist", "Validation errors exist.",
|
||||
dataValidationErrors);
|
||||
} else {
|
||||
paramValue = tmpBoolean.toString();
|
||||
}
|
||||
paramValue = tmpBoolean.toString();
|
||||
} else if (columnHeader.isString()) {
|
||||
if (paramValue.length() > columnHeader.getColumnLength()) {
|
||||
final ApiParameterError error = ApiParameterError.parameterError(
|
||||
|
||||
+2
-1
@@ -13,11 +13,11 @@ import java.util.List;
|
||||
import org.mifosplatform.infrastructure.core.service.Page;
|
||||
import org.mifosplatform.infrastructure.core.service.PaginationHelper;
|
||||
import org.mifosplatform.infrastructure.core.service.RoutingDataSource;
|
||||
import org.mifosplatform.infrastructure.core.service.SearchParameters;
|
||||
import org.mifosplatform.infrastructure.jobs.data.JobDetailData;
|
||||
import org.mifosplatform.infrastructure.jobs.data.JobDetailHistoryData;
|
||||
import org.mifosplatform.infrastructure.jobs.exception.JobNotFoundException;
|
||||
import org.mifosplatform.infrastructure.jobs.exception.OperationNotAllowedException;
|
||||
import org.mifosplatform.infrastructure.core.service.SearchParameters;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.EmptyResultDataAccessException;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
@@ -99,6 +99,7 @@ public class SchedulerJobRunnerReadServiceImpl implements SchedulerJobRunnerRead
|
||||
private boolean isJobExist(final Long jobId) {
|
||||
boolean isJobPresent = false;
|
||||
final String sql = "select count(*) from job job where job.id=" + jobId;
|
||||
@SuppressWarnings("deprecation")
|
||||
final int count = this.jdbcTemplate.queryForInt(sql);
|
||||
if (count == 1) {
|
||||
isJobPresent = true;
|
||||
|
||||
-5
@@ -19,17 +19,14 @@ import org.springframework.data.jpa.domain.AbstractPersistable;
|
||||
@Table(name = "m_portfolio_account_associations")
|
||||
public class AccountAssociations extends AbstractPersistable<Long> {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "loan_account_id", nullable = true)
|
||||
private Loan loanAccount;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "savings_account_id", nullable = true)
|
||||
private SavingsAccount savingsAccount;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "linked_loan_account_id", nullable = true)
|
||||
private Loan linkedLoanAccount;
|
||||
@@ -38,11 +35,9 @@ public class AccountAssociations extends AbstractPersistable<Long> {
|
||||
@JoinColumn(name = "linked_savings_account_id", nullable = true)
|
||||
private SavingsAccount linkedSavingsAccount;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Column(name = "association_type_enum", nullable = false)
|
||||
private Integer associationType;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Column(name = "is_active", nullable = false)
|
||||
private boolean active = true;
|
||||
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@ import org.mifosplatform.infrastructure.core.service.DateUtils;
|
||||
import org.mifosplatform.infrastructure.core.service.Page;
|
||||
import org.mifosplatform.infrastructure.core.service.PaginationHelper;
|
||||
import org.mifosplatform.infrastructure.core.service.RoutingDataSource;
|
||||
import org.mifosplatform.infrastructure.core.service.SearchParameters;
|
||||
import org.mifosplatform.organisation.monetary.data.CurrencyData;
|
||||
import org.mifosplatform.organisation.office.data.OfficeData;
|
||||
import org.mifosplatform.organisation.office.service.OfficeReadPlatformService;
|
||||
@@ -31,7 +32,6 @@ import org.mifosplatform.portfolio.account.domain.AccountTransferType;
|
||||
import org.mifosplatform.portfolio.account.exception.AccountTransferNotFoundException;
|
||||
import org.mifosplatform.portfolio.client.data.ClientData;
|
||||
import org.mifosplatform.portfolio.client.service.ClientReadPlatformService;
|
||||
import org.mifosplatform.infrastructure.core.service.SearchParameters;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.EmptyResultDataAccessException;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
@@ -373,6 +373,7 @@ public class AccountTransfersReadPlatformServiceImpl implements AccountTransfers
|
||||
.append(transactionId);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
final int count = this.jdbcTemplate.queryForInt(sql.toString());
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
+4
@@ -241,6 +241,10 @@ public class CalendarsApiResource {
|
||||
break;
|
||||
case INVALID:
|
||||
break;
|
||||
case LOAN_RECALCULATION_DETAIL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return resourceDetails.build();
|
||||
}
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public class AccountNumberGenerator {
|
||||
}
|
||||
|
||||
private String generateAccountNumber(Map<String, String> propertyMap, AccountNumberFormat accountNumberFormat) {
|
||||
String accountNumber = StringUtils.leftPad(propertyMap.get(ID), this.maxLength, '0');
|
||||
String accountNumber = StringUtils.leftPad(propertyMap.get(ID), AccountNumberGenerator.maxLength, '0');
|
||||
if (accountNumberFormat != null && accountNumberFormat.getPrefixEnum() != null) {
|
||||
AccountNumberPrefixType accountNumberPrefixType = AccountNumberPrefixType.fromInt(accountNumberFormat.getPrefixEnum());
|
||||
String prefix = null;
|
||||
|
||||
+3
-2
@@ -9,10 +9,11 @@ import java.math.BigDecimal;
|
||||
|
||||
import org.mifosplatform.portfolio.loanaccount.domain.Loan;
|
||||
|
||||
|
||||
public class GuarantorDTO {
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private BigDecimal paidAmount;
|
||||
@SuppressWarnings("unused")
|
||||
private Loan loan;
|
||||
|
||||
}
|
||||
|
||||
+14
-13
@@ -36,10 +36,10 @@ import org.mifosplatform.portfolio.calendar.exception.MeetingFrequencyMismatchEx
|
||||
import org.mifosplatform.portfolio.calendar.service.CalendarUtils;
|
||||
import org.mifosplatform.portfolio.client.domain.Client;
|
||||
import org.mifosplatform.portfolio.client.domain.ClientRepositoryWrapper;
|
||||
import org.mifosplatform.portfolio.common.domain.DayOfWeekType;
|
||||
import org.mifosplatform.portfolio.common.domain.DaysInMonthType;
|
||||
import org.mifosplatform.portfolio.common.domain.DaysInYearType;
|
||||
import org.mifosplatform.portfolio.common.domain.PeriodFrequencyType;
|
||||
import org.mifosplatform.portfolio.common.domain.DayOfWeekType;
|
||||
import org.mifosplatform.portfolio.group.domain.Group;
|
||||
import org.mifosplatform.portfolio.group.domain.GroupRepositoryWrapper;
|
||||
import org.mifosplatform.portfolio.loanaccount.api.LoanApiConstants;
|
||||
@@ -181,12 +181,12 @@ public class LoanScheduleAssembler {
|
||||
* be either same frequency or loan freq is multiple of center/group
|
||||
* meeting freq multiples
|
||||
*/
|
||||
if (loanType.isJLGAccount() && calendarId != null ) {
|
||||
calendar = this.calendarRepository.findOne(calendarId);
|
||||
if (calendar == null) { throw new CalendarNotFoundException(calendarId); }
|
||||
final PeriodFrequencyType meetingPeriodFrequency = CalendarUtils.getMeetingPeriodFrequencyType(calendar.getRecurrence());
|
||||
validateRepaymentFrequencyIsSameAsMeetingFrequency(meetingPeriodFrequency.getValue(), repaymentFrequencyType,
|
||||
CalendarUtils.getInterval(calendar.getRecurrence()), repaymentEvery);
|
||||
if (loanType.isJLGAccount() && calendarId != null) {
|
||||
calendar = this.calendarRepository.findOne(calendarId);
|
||||
if (calendar == null) { throw new CalendarNotFoundException(calendarId); }
|
||||
final PeriodFrequencyType meetingPeriodFrequency = CalendarUtils.getMeetingPeriodFrequencyType(calendar.getRecurrence());
|
||||
validateRepaymentFrequencyIsSameAsMeetingFrequency(meetingPeriodFrequency.getValue(), repaymentFrequencyType,
|
||||
CalendarUtils.getInterval(calendar.getRecurrence()), repaymentEvery);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -287,12 +287,12 @@ public class LoanScheduleAssembler {
|
||||
final boolean isInterestRecalculationEnabled = loanProduct.isInterestRecalculationEnabled();
|
||||
|
||||
return LoanApplicationTerms.assembleFrom(applicationCurrency, loanTermFrequency, loanTermPeriodFrequencyType, numberOfRepayments,
|
||||
repaymentEvery, repaymentPeriodFrequencyType, nthDay, weekDayType, amortizationMethod,
|
||||
interestMethod, interestRatePerPeriod, interestRatePeriodFrequencyType, annualNominalInterestRate,
|
||||
interestCalculationPeriodMethod, principalMoney, expectedDisbursementDate, repaymentsStartingFromDate,
|
||||
calculatedRepaymentsStartingFromDate, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged,
|
||||
interestChargedFromDate, inArrearsToleranceMoney, loanProduct.isMultiDisburseLoan(), emiAmount, disbursementDatas,
|
||||
maxOutstandingBalance, loanVariationTermsData, graceOnArrearsAgeing, daysInMonthType, daysInYearType, isInterestRecalculationEnabled);
|
||||
repaymentEvery, repaymentPeriodFrequencyType, nthDay, weekDayType, amortizationMethod, interestMethod,
|
||||
interestRatePerPeriod, interestRatePeriodFrequencyType, annualNominalInterestRate, interestCalculationPeriodMethod,
|
||||
principalMoney, expectedDisbursementDate, repaymentsStartingFromDate, calculatedRepaymentsStartingFromDate,
|
||||
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, inArrearsToleranceMoney,
|
||||
loanProduct.isMultiDisburseLoan(), emiAmount, disbursementDatas, maxOutstandingBalance, loanVariationTermsData,
|
||||
graceOnArrearsAgeing, daysInMonthType, daysInYearType, isInterestRecalculationEnabled);
|
||||
}
|
||||
|
||||
private List<DisbursementData> fetchDisbursementData(final JsonObject command) {
|
||||
@@ -469,6 +469,7 @@ public class LoanScheduleAssembler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("null")
|
||||
private LocalDate deriveFirstRepaymentDate(final AccountType loanType, final Integer repaymentEvery,
|
||||
final LocalDate expectedDisbursementDate, final PeriodFrequencyType repaymentPeriodFrequencyType,
|
||||
final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final Calendar calendar) {
|
||||
|
||||
+1
@@ -43,6 +43,7 @@ public class LoanScheduleHistoryReadPlatformServiceImpl implements LoanScheduleH
|
||||
this.jdbcTemplate = new JdbcTemplate(dataSource);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public Integer fetchCurrentVersionNumber(Long loanId) {
|
||||
final String sql = "select MAX(lrs.version) from m_loan_repayment_schedule_history lrs where lrs.loan_id = ?";
|
||||
|
||||
+1
@@ -315,6 +315,7 @@ public class LoanAccrualWritePlatformServiceImpl implements LoanAccrualWritePlat
|
||||
this.jdbcTemplate.update(transactionSql, scheduleAccrualData.getLoanId(), scheduleAccrualData.getOfficeId(),
|
||||
LoanTransactionType.ACCRUAL.getValue(), accruedTill.toDate(), amount, interestportion, feeportion, penaltyportion,
|
||||
DateUtils.getDateOfTenant());
|
||||
@SuppressWarnings("deprecation")
|
||||
final Long transactonId = this.jdbcTemplate.queryForLong("SELECT LAST_INSERT_ID()");
|
||||
|
||||
Map<LoanChargeData, BigDecimal> applicableCharges = scheduleAccrualData.getApplicableCharges();
|
||||
|
||||
+31
-33
@@ -23,10 +23,8 @@ import org.mifosplatform.infrastructure.core.data.DataValidatorBuilder;
|
||||
import org.mifosplatform.infrastructure.core.exception.PlatformApiDataValidationException;
|
||||
import org.mifosplatform.organisation.monetary.domain.MonetaryCurrency;
|
||||
import org.mifosplatform.organisation.monetary.domain.Money;
|
||||
import org.mifosplatform.portfolio.common.domain.DayOfWeekType;
|
||||
import org.mifosplatform.portfolio.common.domain.DaysInMonthType;
|
||||
import org.mifosplatform.portfolio.common.domain.DaysInYearType;
|
||||
import org.mifosplatform.portfolio.common.domain.NthDayType;
|
||||
import org.mifosplatform.portfolio.common.domain.PeriodFrequencyType;
|
||||
import org.mifosplatform.portfolio.loanaccount.domain.Loan;
|
||||
import org.mifosplatform.portfolio.loanaccount.loanschedule.domain.AprCalculator;
|
||||
@@ -77,7 +75,7 @@ public class LoanProductRelatedDetail implements LoanProductMinimumRepaymentSche
|
||||
@Enumerated(EnumType.ORDINAL)
|
||||
@Column(name = "repayment_period_frequency_enum", nullable = false)
|
||||
private PeriodFrequencyType repaymentPeriodFrequencyType;
|
||||
|
||||
|
||||
@Column(name = "number_of_repayments", nullable = false)
|
||||
private Integer numberOfRepayments;
|
||||
|
||||
@@ -172,61 +170,61 @@ public class LoanProductRelatedDetail implements LoanProductMinimumRepaymentSche
|
||||
}
|
||||
|
||||
@Override
|
||||
public MonetaryCurrency getCurrency() {
|
||||
public MonetaryCurrency getCurrency() {
|
||||
return this.currency.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Money getPrincipal() {
|
||||
public Money getPrincipal() {
|
||||
return Money.of(this.currency, this.principal);
|
||||
}
|
||||
|
||||
public void setPrincipal(BigDecimal principal) {
|
||||
this.principal = principal;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer graceOnInterestCharged() {
|
||||
public Integer graceOnInterestCharged() {
|
||||
return this.graceOnInterestCharged;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer graceOnInterestPayment() {
|
||||
public Integer graceOnInterestPayment() {
|
||||
return this.graceOnInterestPayment;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Integer graceOnPrincipalPayment() {
|
||||
public Integer graceOnPrincipalPayment() {
|
||||
return this.graceOnPrincipalPayment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Money getInArrearsTolerance() {
|
||||
public Money getInArrearsTolerance() {
|
||||
return Money.of(this.currency, this.inArrearsTolerance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getNominalInterestRatePerPeriod() {
|
||||
public BigDecimal getNominalInterestRatePerPeriod() {
|
||||
return BigDecimal.valueOf(Double.valueOf(this.nominalInterestRatePerPeriod.stripTrailingZeros().toString()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PeriodFrequencyType getInterestPeriodFrequencyType() {
|
||||
public PeriodFrequencyType getInterestPeriodFrequencyType() {
|
||||
return this.interestPeriodFrequencyType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal getAnnualNominalInterestRate() {
|
||||
public BigDecimal getAnnualNominalInterestRate() {
|
||||
return BigDecimal.valueOf(Double.valueOf(this.annualNominalInterestRate.stripTrailingZeros().toString()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public InterestMethod getInterestMethod() {
|
||||
public InterestMethod getInterestMethod() {
|
||||
return this.interestMethod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InterestCalculationPeriodMethod getInterestCalculationPeriodMethod() {
|
||||
public InterestCalculationPeriodMethod getInterestCalculationPeriodMethod() {
|
||||
return this.interestCalculationPeriodMethod;
|
||||
}
|
||||
|
||||
@@ -239,14 +237,14 @@ public class LoanProductRelatedDetail implements LoanProductMinimumRepaymentSche
|
||||
public PeriodFrequencyType getRepaymentPeriodFrequencyType() {
|
||||
return this.repaymentPeriodFrequencyType;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public Integer getNumberOfRepayments() {
|
||||
return this.numberOfRepayments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AmortizationMethod getAmortizationMethod() {
|
||||
public AmortizationMethod getAmortizationMethod() {
|
||||
return this.amortizationMethod;
|
||||
}
|
||||
|
||||
@@ -319,16 +317,16 @@ public class LoanProductRelatedDetail implements LoanProductMinimumRepaymentSche
|
||||
actualChanges.put(repaymentFrequencyTypeParamName, newValue);
|
||||
actualChanges.put("locale", localeAsInput);
|
||||
this.repaymentPeriodFrequencyType = PeriodFrequencyType.fromInt(newValue);
|
||||
|
||||
if(this.repaymentPeriodFrequencyType == PeriodFrequencyType.MONTHS) {
|
||||
final String repaymentFrequencyNthDayTypeParamName = "repaymentFrequencyNthDayType";
|
||||
newValue = command.integerValueOfParameterNamed(repaymentFrequencyNthDayTypeParamName);
|
||||
actualChanges.put(repaymentFrequencyNthDayTypeParamName, newValue);
|
||||
|
||||
final String repaymentFrequencyDayOfWeekTypeParamName = "repaymentFrequencyDayOfWeekType";
|
||||
newValue = command.integerValueOfParameterNamed(repaymentFrequencyDayOfWeekTypeParamName);
|
||||
actualChanges.put(repaymentFrequencyDayOfWeekTypeParamName, newValue);
|
||||
|
||||
|
||||
if (this.repaymentPeriodFrequencyType == PeriodFrequencyType.MONTHS) {
|
||||
final String repaymentFrequencyNthDayTypeParamName = "repaymentFrequencyNthDayType";
|
||||
newValue = command.integerValueOfParameterNamed(repaymentFrequencyNthDayTypeParamName);
|
||||
actualChanges.put(repaymentFrequencyNthDayTypeParamName, newValue);
|
||||
|
||||
final String repaymentFrequencyDayOfWeekTypeParamName = "repaymentFrequencyDayOfWeekType";
|
||||
newValue = command.integerValueOfParameterNamed(repaymentFrequencyDayOfWeekTypeParamName);
|
||||
actualChanges.put(repaymentFrequencyDayOfWeekTypeParamName, newValue);
|
||||
|
||||
actualChanges.put("locale", localeAsInput);
|
||||
}
|
||||
}
|
||||
@@ -493,7 +491,7 @@ public class LoanProductRelatedDetail implements LoanProductMinimumRepaymentSche
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getGraceOnDueDate() {
|
||||
public Integer getGraceOnDueDate() {
|
||||
return this.graceOnArrearsAgeing;
|
||||
}
|
||||
|
||||
@@ -512,8 +510,8 @@ public class LoanProductRelatedDetail implements LoanProductMinimumRepaymentSche
|
||||
public void updateIsInterestRecalculationEnabled(final boolean isInterestRecalculationEnabled) {
|
||||
this.isInterestRecalculationEnabled = isInterestRecalculationEnabled;
|
||||
}
|
||||
|
||||
|
||||
public void updateNumberOfRepayments(Integer numberOfRepayments) {
|
||||
this.numberOfRepayments = numberOfRepayments;
|
||||
this.numberOfRepayments = numberOfRepayments;
|
||||
}
|
||||
}
|
||||
+4
@@ -252,6 +252,10 @@ public class MeetingsApiResource {
|
||||
break;
|
||||
case INVALID:
|
||||
break;
|
||||
case LOAN_RECALCULATION_DETAIL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return resourceDetails.build();
|
||||
}
|
||||
|
||||
-3
@@ -18,8 +18,6 @@ import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
import org.hibernate.annotations.LazyCollection;
|
||||
import org.hibernate.annotations.LazyCollectionOption;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.mifosplatform.portfolio.loanaccount.guarantor.domain.GuarantorFundingTransaction;
|
||||
import org.mifosplatform.portfolio.savings.DepositAccountOnHoldTransactionType;
|
||||
@@ -29,7 +27,6 @@ import org.springframework.data.jpa.domain.AbstractPersistable;
|
||||
@Table(name = "m_deposit_account_on_hold_transaction")
|
||||
public class DepositAccountOnHoldTransaction extends AbstractPersistable<Long> {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "savings_account_id", nullable = true)
|
||||
private SavingsAccount savingsAccount;
|
||||
|
||||
Reference in New Issue
Block a user