Package org.apache.stonehenge.stocktrader.dal

Examples of org.apache.stonehenge.stocktrader.dal.CustomerDAO


      throws DAOException {
    if (logger.isDebugEnabled()) {
      logger.debug("HoldingDataModel.getHoldingForUpdate()\nOrder ID :" + orderId);
    }
    DAOFactory fac = MSSQLDAOFactory.getInstance();
    CustomerDAO customerDAO = fac.getCustomerDAO();
    return customerDAO.getHoldingForUpdate(orderId);
  }
View Full Code Here


      throws DAOException {
    if (logger.isDebugEnabled()) {
      logger.debug("OrderDAO.updateAccountBalance(int,BigDecimal)\nAccount ID :" + accountId + "\nTotal :" + total);
    }
    DAOFactory fac = MSSQLDAOFactory.getInstance();
    CustomerDAO customerDAO = fac.getCustomerDAO();
    customerDAO.updateAccountBalance(accountId, total);
  }
View Full Code Here

  }

  public CustomerDAO getCustomerDAO() throws DAOException {
    logger.debug("MSSQLDAOFactory.getOrderDAO");
    try {
      CustomerDAO customerDAO = new MSSQLCustomerDAO(getConnection());
      return customerDAO;
    } catch (SQLException e) {
      logger.debug("", e);
      throw new DAOException("Exception was thrown when instantiating a MSSQLCustomerDAO", e);
    }
View Full Code Here

  }

  public CustomerDAO getCustomerDAO() throws DAOException {
    logger.debug("MySQLDAOFactory.getCustomerDAO");
    try {
      CustomerDAO customerDAO = new MySQLCustomerDAO(getConnection());
      return customerDAO;
    } catch (SQLException e) {
      logger.debug("", e);
      throw new DAOException("Exception was thrown when instantiating a MySQLCustomerDAO",e);
    }
View Full Code Here

  public TraderServiceManager() {
    factory = DAOFactory.getFacotry();
  }

  public CustomAccountBean login(String userId, String password) throws DAOException {
    CustomerDAO customerDAO = factory.getCustomerDAO();
    return customerDAO.login(userId, password);
  }
View Full Code Here

  }

  public CustomerDAO getCustomerDAO() throws DAOException {
    logger.debug("MySQLDAOFactory.getCustomerDAO");
    try {
      CustomerDAO customerDAO = new MySQLCustomerDAO(getConnection());
      return customerDAO;
    } catch (SQLException e) {
      logger.debug("", e);
      throw new DAOException("Exception was thrown when instantiating a MySQLCustomerDAO",e);
    }
View Full Code Here

    if (logger.isDebugEnabled()) {
      logger.debug("HoldingDataModel.getHoldingForUpdate()\nOrder ID :"
          + orderId);
    }
    DAOFactory fac = MSSQLDAOFactory.getInstance();
    CustomerDAO customerDAO = fac.getCustomerDAO();
    return customerDAO.getHoldingForUpdate(orderId);
  }
View Full Code Here

      logger
          .debug("OrderDAO.updateAccountBalance(int,BigDecimal)\nAccount ID :"
              + accountId + "\nTotal :" + total);
    }
    DAOFactory fac = MSSQLDAOFactory.getInstance();
    CustomerDAO customerDAO = fac.getCustomerDAO();
    customerDAO.updateAccountBalance(accountId, total);
  }
View Full Code Here

    public boolean validate(PasswordValidationCallback.Request request) throws
            PasswordValidationCallback.PasswordValidationException {
        PasswordValidationCallback.PlainTextPasswordRequest plainTextRequest =
                (PasswordValidationCallback.PlainTextPasswordRequest) request;
        try {
            CustomerDAO user = DAOFactory.getFacotry().getCustomerDAO();
            CustomAccountProfileBean profileBean = user.getAccountProfileData(plainTextRequest.getUsername());
            if (profileBean != null && profileBean.getPassword().equals(plainTextRequest.getPassword())) {
                return true;
            }
        } catch (DAOException e) {
            e.printStackTrace();
View Full Code Here

    public boolean validate(PasswordValidationCallback.Request request) throws
            PasswordValidationCallback.PasswordValidationException {
        PasswordValidationCallback.PlainTextPasswordRequest plainTextRequest =
                (PasswordValidationCallback.PlainTextPasswordRequest) request;
        try {
            CustomerDAO user = DAOFactory.getFacotry().getCustomerDAO();
            CustomAccountProfileBean profileBean = user.getAccountProfileData(plainTextRequest.getUsername());
            if (profileBean != null && profileBean.getPassword().equals(plainTextRequest.getPassword())) {
                return true;
            }
        } catch (DAOException e) {
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.stonehenge.stocktrader.dal.CustomerDAO

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.