package AbstractClasses.Database;

import AbstractClasses.Trade.Trade;
import AbstractClasses.CommunicationLayer.Search;
import AbstractClasses.CommunicationLayer.SearchResult;
import AbstractClasses.Trade.UPI;
import java.util.Date;

/**
 * 
 * @author Wai-Wai Ng
 */
abstract class Database{
    
    /**
     * Adds a trade to the database
     * @param trade a trade to be added to the database
     */
    abstract void addTrade(Trade trade);
    
    /**
     * Adds a CSV file listing trades to the database
     * @param csv the relevant CSV file
     */
    abstract void addTrades(CSVTradeFile csv);
    
    /**
     * 
     * @param s the search parameters
     * @return all data matching the search 
     */
    abstract SearchResult search(Search s);
    
    /**
     * 
     * @return The time the database was last updated
     */
    abstract Date getLastUpdateTime();
    
    
    /**
     * 
     * @return A list of previously saved searches
     */
    abstract Search[] getSavedSearches();
    
    /**
     * 
     * @param s The string to search against
     * @return A list of UPIs which have the parameter as a substring
     */
    abstract UPI[] getMatchingUPI(String s);
}

@@ -438,32 +438,158 @@
 de trade);%0A    %0A
+     /**%0A     * %0A     * @return The time the database was last updated%0A     */%0A    abstract Date getLastUpdateTime();%0A       %0A
     /**%0A     * A
@@ -882,32 +882,33 @@
 Search s);%0A    %0A
+%0A
     /**%0A     * %0A
@@ -919,98 +919,80 @@
  * @
-return The time the database was last updated%0A     */%0A    abstract Date getLastUpdateTime(
+param s the search to save%0A     */%0A    abstract void saveSearch(Search s
 );%0A 

Add saveSearch()