Package com.bigbank.account

Examples of com.bigbank.account.DataGraphRoot


        select.setParameterValue("loginID", logonID);
        TypeHelper helper = TypeHelper.INSTANCE;

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

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

        Collection customers = root.getCustomerProfileData();
        CustomerProfileData customerProfileData = (CustomerProfileData) customers.iterator().next();
        System.out.println(customerProfileData);
        System.out.flush();
        return customerProfileData;
View Full Code Here


        select.setParameterValue("accountNumber", wd.getAccountNumber());
        TypeHelper helper = TypeHelper.INSTANCE;

        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 = ?
View Full Code Here

            select.setParameterValue("loginID", logonID);
            TypeHelper helper = TypeHelper.INSTANCE;

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

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

            Collection customers = root.getCustomerProfileData();
            CustomerProfileData customerProfileData = (CustomerProfileData) customers.iterator().next();
           
           
            return customerProfileData;
        } catch (Exception e) {
View Full Code Here

        select.setParameterValue("loginID", logonID);
        TypeHelper helper = TypeHelper.INSTANCE;

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

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

        Collection customers = root.getCustomerProfileData();
        CustomerProfileData customerProfileData = (CustomerProfileData) customers.iterator().next();
        return customerProfileData;

    }
View Full Code Here

            Connection conn = getConnection();
            select.setConnection(conn);
            select.setParameterValue("id", customerID);
            TypeHelper helper = TypeHelper.INSTANCE;
            select.setDataObjectModel(helper.getType(DataGraphRoot.class));
            DataGraphRoot root = (DataGraphRoot) select.executeQuery();
            accountReport.getAccountSummaries().addAll(root.getAccountSummaries());

            // Get Stocks

            select = Command.FACTORY.createCommand(
                    "SELECT Symbol, quantity, purchasePrice, purchaseDate, purchaseLotNumber  FROM stocks where id = :id", createConfigStream());
            select.setConnection(conn);
            select.setParameterValue("id", customerID);
            select.setDataObjectModel(helper.getType(DataGraphRoot.class));

            // select.addConverter("STOCKS.PURCHASEDATE", DateConverter.class.getName());

            root = (DataGraphRoot) select.executeQuery();
            accountReport.getStockSummaries().addAll(root.getStockSummaries());

            conn.close();

            return accountReport;
        } catch (Exception e) {
View Full Code Here

            Connection conn = getConnection();
            select.setConnection(conn);
            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());
View Full Code Here

            Command read = commandGroup.getCommand("stockbylotSelect");
            TypeHelper helper = TypeHelper.INSTANCE;
            read.setDataObjectModel(helper.getType(DataGraphRoot.class));
            read.setParameterValue("PURCHASELOTNUMBER", purchaseLotNumber);// autoboxing :-)
            DataGraphRoot root = (DataGraphRoot) read.executeQuery();
            List stocks = root.getStockSummaries();
            if (null != stocks && !stocks.isEmpty()) {
                StockSummary stock = (StockSummary) stocks.get(0);
                int newQuatity = Math.max(stock.getQuantity() - quantity, 0);
                if (newQuatity < 1) {
View Full Code Here

TOP

Related Classes of com.bigbank.account.DataGraphRoot

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.