StocksMonitor 1.5.0

hirondelle.stocks.quotes
Class QuotesDAO

Object
  extended by QuotesDAO

public final class QuotesDAO
extends Object

Given a set of stocks in a Portfolio, will retrieve current price information from the web, and return corresponding Quote objects.


Nested Class Summary
static class QuotesDAO.UseMonitor
          Enumeration for the two states of aUseMonitor passed to the constructor.
 
Constructor Summary
QuotesDAO(QuotesDAO.UseMonitor aUseMonitor, Collection<Stock> aStocks)
          Constructor.
 
Method Summary
 List<Quote> getQuotes()
          Fetch current stock price data from the web.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuotesDAO

public QuotesDAO(QuotesDAO.UseMonitor aUseMonitor,
                 Collection<Stock> aStocks)
Constructor.

Parameters:
aUseMonitor - indicates if a ProgressMonitor should be used during fetch operations.
aStocks - is a possibly-empty collection of Stock objects, with a definite iteration order.
Method Detail

getQuotes

public List<Quote> getQuotes()
                      throws DataAccessException
Fetch current stock price data from the web.

Returns:
List of Quote objects, whose size and iteration order matches that of the collection of Stock objects passed to the constructor; if that collection is empty, then return an empty List; if a ticker is invalid, then it is still included in the result, but its price will be zero.
Throws:
DataAccessException

StocksMonitor 1.5.0

Copyright Hirondelle Systems - License - Generated 2008Jul12.10.53