Examples of SavingsAccount


Examples of bigbank.accountdata.SavingsAccount

        // Get the checking, savings and stock accounts from the AccountData
        // service component
        CheckingAccount checking = accountDataService.getCheckingAccount(customerID);
        System.out.println("Checking account: " + checking);

        SavingsAccount savings = accountDataService.getSavingsAccount(customerID);
        System.out.println("Savings account: " + savings);

        StockAccount stock = accountDataService.getStockAccount(customerID);
        System.out.println("Stock account: " + stock);
       
        // Get the stock price in USD
        double price = stockQuoteService.getQuote(stock.getSymbol());
        System.out.println("Stock price for " + stock.getSymbol() + ": " + price);

        // Convert to the configured currency
        if (currency.equals("EURO")) {
           
            // Use our fancy calculator service to convert to the target currency
            price = calculatorService.multiply(price, 0.70);
           
            System.out.println("Converted to " + currency + ": " + price);
        }
       
        // Calculate the value of the stock account
        double stockValue = price * stock.getQuantity();
       
        // Calculate the total balance of all accounts and return it
        double balance = checking.getBalance() + savings.getBalance() + stockValue;
       
        return balance;
    }
View Full Code Here

Examples of bigbank.accountdata.SavingsAccount

        List<String> summaries = new ArrayList<String>();

        CheckingAccount ca = accountDataService.getCheckingAccount(s);
        summaries.add(ca.getSummary());

        SavingsAccount sa = accountDataService.getSavingsAccount(s);
        summaries.add(sa.getSummary());

        StockAccount sk = accountDataService.getStockAccount(s);
       
        double price = stockQuoteService.getQuote(sk.getSymbol());
        sk.setBalance(sk.getQuantity() * price);
 
View Full Code Here

Examples of inheritance.SavingsAccount

@SuppressWarnings("all")
public class SavingsAccountTest extends TestCase {
  private SavingsAccount savingsAccount;
 
  private SavingsAccount _init_savingsAccount() {
    SavingsAccount _savingsAccount = new SavingsAccount(0.10);
    return _savingsAccount;
  }
View Full Code Here

Examples of org.apache.servicemix.sca.bigbank.accountdata.SavingsAccount

      summary.setBalance(checking.getBalance());
      return summary;
    }

    private AccountSummary getSavingsAccountSummary(String customerID) {
      SavingsAccount savings = accountDataService.getSavingsAccount(customerID);
      AccountSummary summary = new AccountSummary();
      summary.setAccountNumber(savings.getAccountNumber());
      summary.setAccountType("Savings");
      summary.setBalance(savings.getBalance());
      return summary;
    }
View Full Code Here

Examples of org.apache.servicemix.sca.bigbank.accountdata.SavingsAccount

      summary.setBalance(checking.getBalance());
      return summary;
    }

    private AccountSummary getSavingsAccountSummary(String customerID) {
      SavingsAccount savings = accountDataService.getSavingsAccount(customerID);
      AccountSummary summary = new AccountSummary();
      summary.setAccountNumber(savings.getAccountNumber());
      summary.setAccountType("Savings");
      summary.setBalance(savings.getBalance());
      return summary;
    }
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.domain.SavingsAccount

        final Locale locale = command.extractLocale();
        final DateTimeFormatter fmt = DateTimeFormat.forPattern(command.dateFormat()).withLocale(locale);
        for (final Map.Entry<Long, BigDecimal> entrySet : disBuLoanCharges.entrySet()) {
            final PortfolioAccountData savingAccountData = this.accountAssociationsReadPlatformService.retriveLoanAssociation(loanId);
            final SavingsAccount fromSavingsAccount = null;
            final boolean isRegularTransaction = true;
            final AccountTransferDTO accountTransferDTO = new AccountTransferDTO(actualDisbursementDate, entrySet.getValue(),
                    PortfolioAccountType.SAVINGS, PortfolioAccountType.LOAN, savingAccountData.accountId(), loanId, "Loan Charge Payment",
                    locale, fmt, null, null, LoanTransactionType.REPAYMENT_AT_DISBURSEMENT.getValue(), entrySet.getKey(), null,
                    AccountTransferType.CHARGE_PAYMENT.getValue(), null, null, null, null, null, fromSavingsAccount, isRegularTransaction);
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.domain.SavingsAccount

            final Locale locale = command.extractLocale();
            final DateTimeFormatter fmt = DateTimeFormat.forPattern(command.dateFormat()).withLocale(locale);
            for (final Map.Entry<Long, BigDecimal> entrySet : disBuLoanCharges.entrySet()) {
                final PortfolioAccountData savingAccountData = this.accountAssociationsReadPlatformService.retriveLoanAssociation(loan
                        .getId());
                final SavingsAccount fromSavingsAccount = null;
                final boolean isRegularTransaction = true;
                final AccountTransferDTO accountTransferDTO = new AccountTransferDTO(actualDisbursementDate, entrySet.getValue(),
                        PortfolioAccountType.SAVINGS, PortfolioAccountType.LOAN, savingAccountData.accountId(), loan.getId(),
                        "Loan Charge Payment", locale, fmt, null, null, LoanTransactionType.REPAYMENT_AT_DISBURSEMENT.getValue(),
                        entrySet.getKey(), null, AccountTransferType.CHARGE_PAYMENT.getValue(), null, null, null, null, null,
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.domain.SavingsAccount

        final PortfolioAccountData portfolioAccountData = this.accountAssociationsReadPlatformService.retriveLoanAssociation(loanId);
        if (portfolioAccountData == null) {
            final String errorMessage = "Charge with id:" + loanChargeId + " requires linked savings account for payment";
            throw new LinkedAccountRequiredException("loanCharge.pay", errorMessage, loanChargeId);
        }
        final SavingsAccount fromSavingsAccount = null;
        final boolean isRegularTransaction = true;
        final AccountTransferDTO accountTransferDTO = new AccountTransferDTO(transactionDate, amount, PortfolioAccountType.SAVINGS,
                PortfolioAccountType.LOAN, portfolioAccountData.accountId(), loanId, "Loan Charge Payment", locale, fmt, null, null,
                LoanTransactionType.CHARGE_PAYMENT.getValue(), loanChargeId, loanInstallmentNumber,
                AccountTransferType.CHARGE_PAYMENT.getValue(), null, null, null, null, null, fromSavingsAccount, isRegularTransaction);
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.domain.SavingsAccount

        final PortfolioAccountData portfolioAccountData = this.accountAssociationsReadPlatformService.retriveLoanAssociation(loan.getId());
        if (portfolioAccountData == null) {
            final String errorMessage = "Disburse Loan with id:" + loan.getId() + " requires linked savings account for payment";
            throw new LinkedAccountRequiredException("loan.disburse.to.savings", errorMessage, loan.getId());
        }
        final SavingsAccount fromSavingsAccount = null;
        final boolean isRegularTransaction = true;
        final AccountTransferDTO accountTransferDTO = new AccountTransferDTO(transactionDate, amount.getAmount(),
                PortfolioAccountType.LOAN, PortfolioAccountType.SAVINGS, loan.getId(), portfolioAccountData.accountId(),
                "Loan Disbursement", locale, fmt, paymentDetail, LoanTransactionType.DISBURSEMENT.getValue(), null, null, null,
                AccountTransferType.ACCOUNT_TRANSFER.getValue(), null, null, txnExternalId, loan, null, fromSavingsAccount,
View Full Code Here

Examples of org.mifosplatform.portfolio.savings.domain.SavingsAccount

                        if (!installmentChargeData.getDueDate().isAfter(new LocalDate())) {
                            if (portfolioAccountData == null) {
                                portfolioAccountData = this.accountAssociationsReadPlatformService.retriveLoanAssociation(chargeData
                                        .getLoanId());
                            }
                            final SavingsAccount fromSavingsAccount = null;
                            final AccountTransferDTO accountTransferDTO = new AccountTransferDTO(new LocalDate(),
                                    installmentChargeData.getAmountOutstanding(), PortfolioAccountType.SAVINGS, PortfolioAccountType.LOAN,
                                    portfolioAccountData.accountId(), chargeData.getLoanId(), "Loan Charge Payment", null, null, null,
                                    null, LoanTransactionType.CHARGE_PAYMENT.getValue(), chargeData.getId(),
                                    installmentChargeData.getInstallmentNumber(), AccountTransferType.CHARGE_PAYMENT.getValue(), null,
                                    null, null, null, null, fromSavingsAccount, isRegularTransaction);
                            transferFeeCharge(sb, accountTransferDTO);
                        }
                    }
                } else if (chargeData.getDueDate() != null && !chargeData.getDueDate().isAfter(new LocalDate())) {
                    final PortfolioAccountData portfolioAccountData = this.accountAssociationsReadPlatformService
                            .retriveLoanAssociation(chargeData.getLoanId());
                    final SavingsAccount fromSavingsAccount = null;
                    final AccountTransferDTO accountTransferDTO = new AccountTransferDTO(new LocalDate(),
                            chargeData.getAmountOutstanding(), PortfolioAccountType.SAVINGS, PortfolioAccountType.LOAN,
                            portfolioAccountData.accountId(), chargeData.getLoanId(), "Loan Charge Payment", null, null, null, null,
                            LoanTransactionType.CHARGE_PAYMENT.getValue(), chargeData.getId(), null,
                            AccountTransferType.CHARGE_PAYMENT.getValue(), null, null, null, null, null, fromSavingsAccount,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.