1 17 package org.apache.servicemix.sca.bigbank.accountdata; 18 19 public class AccountDataServiceImpl implements AccountDataService { 20 21 public CheckingAccount getCheckingAccount(String customerID) { 22 23 CheckingAccount checkingAccount = new CheckingAccount(); 24 checkingAccount.setAccountNumber(customerID + "_" + "CHA12345"); 25 checkingAccount.setBalance(1500.0f); 26 27 return checkingAccount; 28 } 29 30 public SavingsAccount getSavingsAccount(String customerID) { 31 32 SavingsAccount savingsAccount = new SavingsAccount(); 33 savingsAccount.setAccountNumber(customerID + "_" + "SAA12345"); 34 savingsAccount.setBalance(1500.0f); 35 36 return savingsAccount; 37 } 38 39 public StockAccount getStockAccount(String customerID) { 40 41 StockAccount stockAccount = new StockAccount(); 42 stockAccount.setAccountNumber(customerID + "_" + "STA12345"); 43 stockAccount.setSymbol("IBM"); 44 stockAccount.setQuantity(100); 45 46 return stockAccount; 47 } 48 } 49 | Popular Tags |