| java.lang.Object example.stock.Database example.stock.AlertDatabase
AlertDatabase | public class AlertDatabase extends Database (Code) | | This class provides an implementation of the Database
class specific to alert records.
|
Method Summary | |
public synchronized RecordEnumeration | enumerateRecords(String tkrSymbol, int price) | public synchronized void | removeUselessAlerts(String tkrSymbol) This methods cleans out the database of all alerts that match the
tkrSymbol passed in. |
AlertDatabase | public AlertDatabase()(Code) | | Default Constructor
|
enumerateRecords | public synchronized RecordEnumeration enumerateRecords(String tkrSymbol, int price) throws RecordStoreNotOpenException(Code) | | Get a RecordEnumeration of records in the database who
match the AlertFilter conditions
RecordEnumeration of all stock records that matchthe RecordFilter Parameters: tkrSymbol - The name of the stock to retrieve alerts for Parameters: price - The price of the stock to retrieve alerts for RecordStoreNotOpenException is thrown whentrying to close a RecordStore that is not open |
removeUselessAlerts | public synchronized void removeUselessAlerts(String tkrSymbol)(Code) | | This methods cleans out the database of all alerts that match the
tkrSymbol passed in. An appropriate use would be when
removing a stock from the database, all alerts for that stock are no
longer valid, so call this method then.
Parameters: tkrSymbol - The name of the stock to match with alerts |
Methods inherited from example.stock.Database | public synchronized void add(String record) throws RecordStoreNotOpenException, RecordStoreFullException, RecordStoreException(Code)(Java Doc) public void cleanUp(String fileName) throws RecordStoreNotFoundException, RecordStoreException(Code)(Java Doc) public void close() throws RecordStoreNotOpenException, RecordStoreException(Code)(Java Doc) public synchronized void delete(String s) throws RecordStoreNotOpenException, RecordStoreException(Code)(Java Doc) public int getNumRecords() throws RecordStoreNotOpenException(Code)(Java Doc) public void open(String fileName) throws RecordStoreNotFoundException, RecordStoreException, RecordStoreFullException(Code)(Java Doc) public synchronized String search(String s) throws RecordStoreNotOpenException, RecordStoreException(Code)(Java Doc) public synchronized void update(String s, byte[] data) throws RecordStoreNotOpenException, RecordStoreFullException, RecordStoreException(Code)(Java Doc)
|
|
|