Package org.apache.stonehenge.stocktrader

Examples of org.apache.stonehenge.stocktrader.CustomAccountBean


                            selectCustomerLogin = sqlConnection.prepareStatement(SQL_SELECT_CUSTOMER_LOGIN);
                            selectCustomerLogin.setString(1, userId);
                            ResultSet rs = selectCustomerLogin.executeQuery();
                            if (rs.next()) {
                                try {
                                    CustomAccountBean accountData = new CustomAccountBean(
                                            rs.getInt(1), userId,
                                            StockTraderUtility
                                                    .convertToCalendar(rs
                                                    .getDate(2)), rs
                                                    .getBigDecimal(3), rs
View Full Code Here


            getCustomerByUserId = sqlConnection.prepareStatement(SQL_SELECT_GET_CUSTOMER_BY_USERID);
            getCustomerByUserId.setString(1, userId);
            ResultSet rs = getCustomerByUserId.executeQuery();
            if (rs.next()) {
                try {
                    CustomAccountBean bean = new CustomAccountBean(
                            rs.getInt(1), rs.getString(2), StockTraderUtility
                                    .convertToCalendar(rs.getDate(3)), rs
                                    .getBigDecimal(4), rs.getInt(5), rs
                                    .getBigDecimal(6), StockTraderUtility
                                    .convertToCalendar(rs.getDate(7)), rs
View Full Code Here

                            selectCustomerLogin = sqlConnection.prepareStatement(SQL_SELECT_CUSTOMER_LOGIN);
                            selectCustomerLogin.setString(1, userId);
                            ResultSet rs = selectCustomerLogin.executeQuery();
                            if (rs.next()) {
                                try {
                                    CustomAccountBean accountData = new CustomAccountBean(
                                            rs.getInt(1),
                                            userId,
                                            StockTraderUtility.convertToCalendar(rs.getDate(2)),
                                            rs.getBigDecimal(3),
                                            rs.getInt(4),
View Full Code Here

            getCustomerByUserId = sqlConnection.prepareStatement(SQL_SELECT_GET_CUSTOMER_BY_USERID);
            getCustomerByUserId.setString(1, userId);
            ResultSet rs = getCustomerByUserId.executeQuery();
            if (rs.next()) {
                try {
                    CustomAccountBean bean = new CustomAccountBean(
                            rs.getInt(1),
                            rs.getString(2),
                            StockTraderUtility.convertToCalendar(rs.getDate(3)),
                            rs.getBigDecimal(4),
                            rs.getInt(5),
View Full Code Here

    buyResponse.setBuyReturn(order);
    return buyResponse;
  }

  public GetAccountDataResponse getAccountData(GetAccountData getAccountData) {
    CustomAccountBean accountData;
    try {
      accountData = mgr.getAccountData(getAccountData.getUserID());
    } catch (DAOException e) {
      logger.debug("", e);
      throw new RuntimeException(e);
View Full Code Here

      logger.debug("TradeServiceImpl.isOnline()");
    }
  }

  public LoginResponse login(Login login) {
    CustomAccountBean param;
    try {
      param = mgr.login(login.getUserID(), login.getPassword());
    } catch (DAOException e) {
      logger.debug("", e);
      throw new RuntimeException(e);
View Full Code Here

    LogoutResponse response = new LogoutResponse();
    return response;
  }

  public RegisterResponse register(Register register) {
    CustomAccountBean param;
    try {
      param = mgr.register(
                    register.getUserID(),
                    register.getPassword(),
          register.getFullname(),
View Full Code Here

      String creditcard, BigDecimal openBalance) throws DAOException {
    CustomerDAO customerDAO = factory.getCustomerDAO();
    CustomAccountProfileBean customerProfile = new CustomAccountProfileBean(
        userId, password, fullName, address, email, creditcard);
    customerDAO.insertAccountProfile(customerProfile);
    CustomAccountBean customer = new CustomAccountBean(0, userId, Calendar
        .getInstance(), openBalance, 0, openBalance, Calendar
        .getInstance(), 0);
    return customer;
  }
View Full Code Here

                  .prepareStatement(SQL_SELECT_CUSTOMER_LOGIN);
              selectCustomerLogin.setString(1, userId);
              ResultSet rs = selectCustomerLogin.executeQuery();
              if (rs.next()) {
                try {
                  CustomAccountBean accountData = new CustomAccountBean(
                      rs.getInt(1), userId,
                      StockTraderUtility
                          .convertToCalendar(rs
                              .getDate(2)), rs
                          .getBigDecimal(3), rs
View Full Code Here

          .prepareStatement(SQL_SELECT_GET_CUSTOMER_BY_USERID);
      getCustomerByUserId.setString(1, userId);
      ResultSet rs = getCustomerByUserId.executeQuery();
      if (rs.next()) {
        try {
          CustomAccountBean bean = new CustomAccountBean(
              rs.getInt(1), rs.getString(2), StockTraderUtility
                  .convertToCalendar(rs.getDate(3)), rs
                  .getBigDecimal(4), rs.getInt(5), rs
                  .getBigDecimal(6), StockTraderUtility
                  .convertToCalendar(rs.getDate(7)), rs
View Full Code Here

TOP

Related Classes of org.apache.stonehenge.stocktrader.CustomAccountBean

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.