changing visibility of lockinPeriodFrequencyTypeValue variable in DepositAccountAssembler

This commit is contained in:
Vishwas Babu A J
2014-06-05 14:39:25 -07:00
parent d41cea8d46
commit 4e53e3b94d
@@ -239,8 +239,9 @@ public class DepositAccountAssembler {
} }
SavingsPeriodFrequencyType lockinPeriodFrequencyType = null; SavingsPeriodFrequencyType lockinPeriodFrequencyType = null;
Integer lockinPeriodFrequencyTypeValue = null;
if (command.parameterExists(lockinPeriodFrequencyTypeParamName)) { if (command.parameterExists(lockinPeriodFrequencyTypeParamName)) {
Integer lockinPeriodFrequencyTypeValue = null;
lockinPeriodFrequencyTypeValue = command.integerValueOfParameterNamed(lockinPeriodFrequencyTypeParamName); lockinPeriodFrequencyTypeValue = command.integerValueOfParameterNamed(lockinPeriodFrequencyTypeParamName);
if (lockinPeriodFrequencyTypeValue != null) { if (lockinPeriodFrequencyTypeValue != null) {
lockinPeriodFrequencyType = SavingsPeriodFrequencyType.fromInt(lockinPeriodFrequencyTypeValue); lockinPeriodFrequencyType = SavingsPeriodFrequencyType.fromInt(lockinPeriodFrequencyTypeValue);
@@ -297,8 +298,8 @@ public class DepositAccountAssembler {
RecurringDepositAccount rdAccount = RecurringDepositAccount.createNewApplicationForSubmittal(client, group, product, RecurringDepositAccount rdAccount = RecurringDepositAccount.createNewApplicationForSubmittal(client, group, product,
fieldOfficer, accountNo, externalId, accountType, submittedOnDate, submittedBy, interestRate, fieldOfficer, accountNo, externalId, accountType, submittedOnDate, submittedBy, interestRate,
interestCompoundingPeriodType, interestPostingPeriodType, interestCalculationType, interestCalculationDaysInYearType, interestCompoundingPeriodType, interestPostingPeriodType, interestCalculationType, interestCalculationDaysInYearType,
minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, iswithdrawalFeeApplicableForTransfer,
iswithdrawalFeeApplicableForTransfer, charges, accountTermAndPreClosure, accountRecurringDetail, accountChart); charges, accountTermAndPreClosure, accountRecurringDetail, accountChart);
accountTermAndPreClosure.updateAccountReference(rdAccount); accountTermAndPreClosure.updateAccountReference(rdAccount);
accountRecurringDetail.updateAccountReference(rdAccount); accountRecurringDetail.updateAccountReference(rdAccount);
@@ -400,8 +401,8 @@ public class DepositAccountAssembler {
depositRecurringDetail, null, isCalendarInherited); depositRecurringDetail, null, isCalendarInherited);
return depositAccountRecurringDetail; return depositAccountRecurringDetail;
} }
public Collection<SavingsAccountTransactionDTO> assembleBulkMandatorySavingsAccountTransactionDTOs(final JsonCommand command){ public Collection<SavingsAccountTransactionDTO> assembleBulkMandatorySavingsAccountTransactionDTOs(final JsonCommand command) {
final String json = command.json(); final String json = command.json();
if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); }
final JsonElement element = this.fromApiJsonHelper.parse(json); final JsonElement element = this.fromApiJsonHelper.parse(json);
@@ -412,7 +413,7 @@ public class DepositAccountAssembler {
final JsonObject topLevelJsonElement = element.getAsJsonObject(); final JsonObject topLevelJsonElement = element.getAsJsonObject();
final Locale locale = this.fromApiJsonHelper.extractLocaleParameter(topLevelJsonElement); final Locale locale = this.fromApiJsonHelper.extractLocaleParameter(topLevelJsonElement);
final DateTimeFormatter formatter = DateTimeFormat.forPattern(dateFormat).withLocale(locale); final DateTimeFormatter formatter = DateTimeFormat.forPattern(dateFormat).withLocale(locale);
if (element.isJsonObject()) { if (element.isJsonObject()) {
if (topLevelJsonElement.has(bulkSavingsDueTransactionsParamName) if (topLevelJsonElement.has(bulkSavingsDueTransactionsParamName)
&& topLevelJsonElement.get(bulkSavingsDueTransactionsParamName).isJsonArray()) { && topLevelJsonElement.get(bulkSavingsDueTransactionsParamName).isJsonArray()) {
@@ -423,12 +424,13 @@ public class DepositAccountAssembler {
final Long savingsId = this.fromApiJsonHelper.extractLongNamed(savingsIdParamName, savingsTransactionElement); final Long savingsId = this.fromApiJsonHelper.extractLongNamed(savingsIdParamName, savingsTransactionElement);
final BigDecimal dueAmount = this.fromApiJsonHelper.extractBigDecimalNamed(transactionAmountParamName, final BigDecimal dueAmount = this.fromApiJsonHelper.extractBigDecimalNamed(transactionAmountParamName,
savingsTransactionElement, locale); savingsTransactionElement, locale);
final SavingsAccountTransactionDTO savingsAccountTransactionDTO = new SavingsAccountTransactionDTO(formatter, transactionDate, dueAmount, paymentDetail, new Date(), savingsId); final SavingsAccountTransactionDTO savingsAccountTransactionDTO = new SavingsAccountTransactionDTO(formatter,
transactionDate, dueAmount, paymentDetail, new Date(), savingsId);
savingsAccountTransactions.add(savingsAccountTransactionDTO); savingsAccountTransactions.add(savingsAccountTransactionDTO);
} }
} }
} }
return savingsAccountTransactions; return savingsAccountTransactions;
} }
} }