Package org.apache.stonehenge.stocktrader.dal

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


            updateAccountProfile.setString(5, customerAccountProfile.getFullName());
            updateAccountProfile.setString(6, customerAccountProfile.getUserID());
            updateAccountProfile.executeUpdate();
            return customerAccountProfile;
        } catch (SQLException e) {
            throw new DAOException("", e);
        } finally {
            if (updateAccountProfile != null) {
                try {
                    updateAccountProfile.close();
                } catch (SQLException e) {
View Full Code Here


                    logger.debug("", e);
                }
            }
            return holdings;
        } catch (SQLException e) {
            throw new DAOException("", e);
        } finally {
            if (selectHoldings != null) {
                try {
                    selectHoldings.close();
                } catch (SQLException e) {
View Full Code Here

    try {
      OrderDAO orderDAO = new MySQLOrderDAO(getConnection());
      return orderDAO;
    } catch (SQLException e) {
      logger.debug("", e);
      throw new DAOException("Exception was thrown when instantiating MySQLOrderDAO object",e);
    }
  }
View Full Code Here

    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

    try {
      MarketSummaryDAO marketSummaryDAO = new MySQLMarketSummaryDAO(getConnection());
      return marketSummaryDAO;
    } catch (SQLException e) {
      logger.debug("", e);
      throw new DAOException("Exception was thrown when instantiating a MarketSummaryDAO",e);
    }
  }
View Full Code Here

        } catch (SQLException e) {
          logger.debug("", e);
        }
      }
    } catch (SQLException e) {
      throw new DAOException("", e);
    } finally {
      try {
        if (selectQuote != null) {
          selectQuote.close();
        }
View Full Code Here

        } catch (SQLException e) {
          logger.debug("", e);
        }
        return quote;
      } else {
        throw new DAOException("No quote entry found");
      }
    } catch (SQLException e) {
      throw new DAOException("", e);
    } finally {
      try {
        if (qouteForUpdateStat != null) {
          qouteForUpdateStat.close();
        }
View Full Code Here

      updateStockPriceVolumeStat.setFloat(5, (float) quantity);
      updateStockPriceVolumeStat.setString(6, quote.getSymbol());
      updateStockPriceVolumeStat.executeUpdate();

    } catch (SQLException e) {
      throw new DAOException("", e);
    } finally {
      try {
        if (updateStockPriceVolumeStat != null) {
          updateStockPriceVolumeStat.close();
        }
View Full Code Here

        } catch (SQLException e) {
          logger.debug("", e);
        }
      }
    } catch (SQLException e) {
      throw new DAOException("", e);
    } finally {
      if (gainers != null) {
        try {
          gainers.close();
        } catch (SQLException e) {
          logger.debug("", e);
        }
      }
    }
    List<CustomQuoteBean> topLosers = new ArrayList<CustomQuoteBean>();
    PreparedStatement losers = null;
    try {
      losers = sqlConnection.prepareStatement(SQL_SELECT_MARKETSUMMARY_LOSERS);
      ResultSet rs = losers.executeQuery();

      try {
        for (int i = 0; rs.next() && i < 5; i++) {
          CustomQuoteBean quote = new CustomQuoteBean(
              rs.getString(1),
                            rs.getString(2),
                            rs.getDouble(3),
              rs.getBigDecimal(4),
                            rs.getBigDecimal(5),
                            rs.getBigDecimal(6),
                            rs.getBigDecimal(7),
                            rs.getDouble(8));
          topLosers.add(quote);
        }
      } finally {
        try {
          rs.close();
        } catch (SQLException e) {
          logger.debug("", e);
        }
      }
    } catch (SQLException e) {
      throw new DAOException("", e);
    } finally {
      if (losers != null) {
        try {
          losers.close();
        } catch (SQLException e) {
View Full Code Here

        } catch (SQLException e) {
          logger.debug("", e);
        }
      }
    } catch (SQLException e) {
      throw new DAOException("", e);
    } finally {
      try {
        if (selectQuote != null) {
          selectQuote.close();
        }
View Full Code Here

TOP

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

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.