Package com.bigbank.account

Examples of com.bigbank.account.AccountSummary


    public AccountReport getAccountReport(int customerID) {
        final AccountFactory accountFactory = AccountFactory.INSTANCE;
        AccountReport accountReport = accountFactory.createAccountReport();
        List accounts = accountReport.getAccountSummaries();

        AccountSummary account = accountFactory.createAccountSummary();
        account.setAccountType("1111");
        account.setAccountNumber("22-22-22");
        account.setBalance(123.45F);
        accounts.add(account);

        account = accountFactory.createAccountSummary();
        account.setAccountType("04-11-19");
        account.setAccountNumber("11-23");
        account.setBalance(543.21F);
        accounts.add(account);

        List stocks = accountReport.getStockSummaries();
        StockSummary stock = accountFactory.createStockSummary();
        stock.setSymbol("IBM");
View Full Code Here


            Command select = das.createCommand("SELECT accountNumber, balance FROM accounts where accountNumber = ?");
            select.setParameter(1, account);

            DataObject root = select.executeQuery();
            Collection accounts = root.getList("AccountSummary");
            AccountSummary accountData = (AccountSummary) accounts.iterator().next();
            float newbalance = accountData.getBalance() + ammount;
            accountData.setBalance(newbalance);
            // update department set companyid = ? where department.name = ?

            Command update = das.getCommand("update balance");
            update.setParameter(1, new Float(newbalance));
            update.setParameter(2, account);
View Full Code Here

        select.setParameter(1, wd.getAccountNumber());

        DataObject root = select.executeQuery();

        Collection accounts = root.getList("AccountSummary");
        AccountSummary account = (AccountSummary) accounts.iterator().next();
        float newbalance = account.getBalance() - wd.getAmount();
        account.setBalance(newbalance);
        // update department set companyid = ? where department.name = ?

        Command update = das.getCommand("update balance");
        update.setParameter(1, new Float(newbalance));
        update.setParameter(2, wd.getAccountNumber());
View Full Code Here

        AccountService accountService = (AccountService) moduleContext.locateService("AccountServiceComponent");

        AccountReport accountReport = accountService.getAccountReport(12345);

        for (Iterator i = accountReport.getAccountSummaries().iterator(); i.hasNext();) {
            AccountSummary accountSummary = (AccountSummary) i.next();

            System.out.println(accountSummary.getAccountNumber());
            System.out.println(accountSummary.getAccountType());
            System.out.println(accountSummary.getBalance());
        }

    }
View Full Code Here

        select.setDataObjectModel(helper.getType(DataGraphRoot.class));

        DataGraphRoot root = (DataGraphRoot) select.executeQuery();

        Collection accounts = root.getAccountSummaries();
        AccountSummary account = (AccountSummary) accounts.iterator().next();
        float newbalance = account.getBalance() - wd.getAmount();
        account.setBalance(newbalance);
        // update department set companyid = ? where department.name = ?

        CommandGroup commandGroup = CommandGroup.FACTORY.createCommandGroup(createConfigStream());
        commandGroup.setConnection(conn);
        Command update = commandGroup.getCommand("update balance");
View Full Code Here

    public AccountReport getAccountReport(int customerID) {
        final AccountFactory accountFactory = AccountFactory.INSTANCE;
        AccountReport accountReport = accountFactory.createAccountReport();
        List accounts = accountReport.getAccountSummaries();

        AccountSummary account = accountFactory.createAccountSummary();
        account.setAccountType("1111");
        account.setAccountNumber("22-22-22");
        account.setBalance(123.45F);
        accounts.add(account);

        account = accountFactory.createAccountSummary();
        account.setAccountType("04-11-19");
        account.setAccountNumber("11-23");
        account.setBalance(543.21F);
        accounts.add(account);

        List stocks = accountReport.getStockSummaries();
        StockSummary stock = accountFactory.createStockSummary();
        stock.setSymbol("IBM");
View Full Code Here

            select.setParameterValue("accountNumber", account);
            TypeHelper helper = TypeHelper.INSTANCE;
            select.setDataObjectModel(helper.getType(DataGraphRoot.class));
            DataGraphRoot root = (DataGraphRoot) select.executeQuery();
            Collection accounts = root.getAccountSummaries();
            AccountSummary accountData = (AccountSummary) accounts.iterator().next();
            float newbalance = accountData.getBalance() + ammount;
            accountData.setBalance(newbalance);
            // update department set companyid = ? where department.name = ?
            CommandGroup commandGroup = CommandGroup.FACTORY.createCommandGroup(createConfigStream());
            commandGroup.setConnection(conn);
            Command update = commandGroup.getCommand("update balance");
            update.setParameterValue("BALANCE", new Float(newbalance));
View Full Code Here

        AccountService accountService = context.locateService(AccountService.class, "AccountServiceComponent");

        AccountReport accountReport = accountService.getAccountReport(12345);

        for (Iterator i = accountReport.getAccountSummaries().iterator(); i.hasNext();) {
            AccountSummary accountSummary = (AccountSummary) i.next();

            System.out.println(accountSummary.getAccountNumber());
            System.out.println(accountSummary.getAccountType());
            System.out.println(accountSummary.getBalance());
        }

    }
View Full Code Here

        assertEquals(dataIn.getLastName(), dataOut.getLastName());
        assertEquals(dataIn.getLoginID(), dataOut.getLoginID());
        assertEquals(dataIn.getPassword(), dataOut.getPassword());
       
        AccountReport report = client.getAccountReport(12345);
        AccountSummary summary1 = (AccountSummary)report.getAccountSummaries().get(0);
        assertEquals(summary1.getAccountType(), "checking");
        AccountSummary summary2 = (AccountSummary)report.getAccountSummaries().get(1);
        assertEquals(summary2.getBalance(), 2000.f);
    }
View Full Code Here

    }

    public AccountReport getAccountReport(int customerID) {

        AccountReport report =AccountFactory.INSTANCE.createAccountReport();
        AccountSummary summary1 = AccountFactory.INSTANCE.createAccountSummary();
        summary1.setAccountNumber("123");
        summary1.setAccountType("checking");
        summary1.setBalance(1000.0f);
        report.getAccountSummaries().add(summary1);
        AccountSummary summary2 = AccountFactory.INSTANCE.createAccountSummary();
        summary2.setAccountNumber("456");
        summary2.setAccountType("savings");
        summary2.setBalance(2000.0f);
        report.getAccountSummaries().add(summary2);
       
        return report;
    }
View Full Code Here

TOP

Related Classes of com.bigbank.account.AccountSummary

Copyright © 2018 www.massapicom. 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.