Package com.bigbank.account

Examples of com.bigbank.account.CustomerProfileData


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

            Collection customers = root.getList("CustomerProfileData");
            CustomerProfileData customerProfileData = (CustomerProfileData) customers.iterator().next();

            return customerProfileData;
        } catch (Exception e) {

            e.printStackTrace();
View Full Code Here


            Command insert = das.createCommand("insert into customers (firstName,lastName,address,email, loginID, password  ) values ('"
                    + customerProfile.getFirstName() + "', '" + customerProfile.getLastName() + "', '" + customerProfile.getAddress() + "', '"
                    + customerProfile.getEmail() + "', '" + customerProfile.getLoginID() + "', '" + customerProfile.getPassword() + "')");

            insert.execute();
            CustomerProfileData ret = getCustomerProfile(customerProfile.getLoginID());
            String cid = ret.getId() + "";
            if (createSavings) {
                insert = das.createCommand("insert into accounts (id,accountNumber, accountType, balance  ) values (" + cid + ", '"
                        + AccountServiceImpl.SAVINGS_ACCOUNT_PREFIX + cid + "', '" + AccountServiceImpl.ACCOUNT_TYPE_SAVINGS + "', " + 1.0F + ")");
                insert.execute();
View Full Code Here

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

        Collection customers = root.getList("CustomerProfileData");
        CustomerProfileData customerProfileData = (CustomerProfileData) customers.iterator().next();
        System.out.println(customerProfileData);
        System.out.flush();
        return customerProfileData;

    }
View Full Code Here

        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

    @Reference
    public ProfileService profileService;

    public int login(String userName, String password) throws RemoteException {

        CustomerProfileData profileData = accountService.getCustomerProfile(userName);

        if (!password.equals(profileData.getPassword())) {
            return INVALID_PASSWORD;
        }

        profileService.setLoggedIn(true);
        profileService.setFirstName(profileData.getFirstName());
        profileService.setLastName(profileData.getLastName());
        profileService.setId(profileData.getId());

        return SUCCESS;
    }
View Full Code Here

            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

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

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

    }
View Full Code Here

            Command insert = Command.FACTORY.createCommand("insert into customers (firstName,lastName,address,email, loginID, password  ) values ('"
                    + customerProfile.getFirstName() + "', '" + customerProfile.getLastName() + "', '" + customerProfile.getAddress() + "', '"
                    + customerProfile.getEmail() + "', '" + customerProfile.getLoginID() + "', '" + customerProfile.getPassword() + "')");
            insert.setConnection(getConnection());
            insert.execute();
            CustomerProfileData ret = getCustomerProfile(customerProfile.getLoginID());
            String cid = ret.getId() + "";
            if (createSavings) {
                insert = Command.FACTORY.createCommand("insert into accounts (id,accountNumber, accountType, balance  ) values (" + cid + ", '"
                        + AccountServiceImpl.SAVINGS_ACCOUNT_PREFIX + cid + "', '" + AccountServiceImpl.ACCOUNT_TYPE_SAVINGS + "', " + 1.0F + ")");
                insert.setConnection(getConnection());
                insert.execute();
View Full Code Here

    }

    private void createAccount(HttpServletRequest pReq, HttpServletResponse pResp, AccountService accountServices) throws ServletException {
        try {
            CustomerProfileData customerProfileData = AccountFactory.INSTANCE.createCustomerProfileData();
            customerProfileData.setFirstName(pReq.getParameter("firstName"));
            customerProfileData.setLastName(pReq.getParameter("lastName"));
            customerProfileData.setAddress(pReq.getParameter("address"));
            customerProfileData.setEmail(pReq.getParameter("email"));
            customerProfileData.setLoginID(pReq.getParameter("loginID"));
            customerProfileData.setPassword(pReq.getParameter("password"));

            CustomerProfileData resp = accountServices.createAccount(customerProfileData, "savings".equals(pReq.getParameter("savings")), "checkings"
                    .equals(pReq.getParameter("checkings")));
            LoginServlet.login(resp.getLoginID(), resp.getPassword());

        } catch (IOException e) {
            throw new ServletException(e);
        }
View Full Code Here

        this.profileService = profileService;
    }

    public int login(String userName, String password) throws RemoteException {

        CustomerProfileData profileData = accountService.getCustomerProfile(userName);

        if (!password.equals(profileData.getPassword())) {
            return INVALID_PASSWORD;
        }

        profileService.setLoggedIn(true);
        profileService.setFirstName(profileData.getFirstName());
        profileService.setLastName(profileData.getLastName());
        profileService.setId(profileData.getId());

        return SUCCESS;
    }
View Full Code Here

TOP

Related Classes of com.bigbank.account.CustomerProfileData

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.