jgnash.engine.xml
Class XMLCommodityDAO

java.lang.Object
  extended by jgnash.engine.dao.AbstractDAO
      extended by jgnash.engine.xml.AbstractXMLDAO
          extended by jgnash.engine.xml.XMLCommodityDAO
All Implemented Interfaces:
CommodityDAO

public class XMLCommodityDAO
extends AbstractXMLDAO
implements CommodityDAO

Hides all the db4o commodity code

Version:
$Id$
Author:
Craig Cavanaugh

Field Summary
 
Fields inherited from class jgnash.engine.xml.AbstractXMLDAO
commitCount, container, MAX_COMMIT_TIME
 
Constructor Summary
XMLCommodityDAO(XMLContainer container)
           
 
Method Summary
 boolean addCommodity(CommodityNode node)
           
 void addExchangeRate(ExchangeRate eRate)
           
 boolean addExchangeRateHistory(ExchangeRate rate, ExchangeRateHistoryNode hNode)
           
 boolean addSecurityHistory(SecurityNode node, SecurityHistoryNode hNode)
           
 java.util.Set<CurrencyNode> getActiveCurrencies()
          Returns the active currencies
 java.util.List<CurrencyNode> getCurrencies()
           
 ExchangeRate getExchangeNode(java.lang.String rateId)
           
 java.util.List<ExchangeRate> getExchangeRates()
           
 java.util.List<SecurityNode> getSecurities()
           
 void refreshCommodityNode(CommodityNode node)
           
 void refreshExchangeRate(ExchangeRate rate)
           
 boolean removeExchangeRateHistory(ExchangeRate rate, ExchangeRateHistoryNode hNode)
           
 boolean removeSecurityHistory(SecurityNode node, SecurityHistoryNode hNode)
           
 boolean updateCommodityNode(CommodityNode node)
           
 
Methods inherited from class jgnash.engine.xml.AbstractXMLDAO
commit, commitAndReset
 
Methods inherited from class jgnash.engine.dao.AbstractDAO
stripMarkedForRemoval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLCommodityDAO

XMLCommodityDAO(XMLContainer container)
Method Detail

addCommodity

public boolean addCommodity(CommodityNode node)
Specified by:
addCommodity in interface CommodityDAO

addExchangeRateHistory

public boolean addExchangeRateHistory(ExchangeRate rate,
                                      ExchangeRateHistoryNode hNode)
Specified by:
addExchangeRateHistory in interface CommodityDAO

addSecurityHistory

public boolean addSecurityHistory(SecurityNode node,
                                  SecurityHistoryNode hNode)
Specified by:
addSecurityHistory in interface CommodityDAO

getActiveCurrencies

public java.util.Set<CurrencyNode> getActiveCurrencies()
Description copied from interface: CommodityDAO
Returns the active currencies

Specified by:
getActiveCurrencies in interface CommodityDAO
Returns:
set of active currencies

getCurrencies

public java.util.List<CurrencyNode> getCurrencies()
Specified by:
getCurrencies in interface CommodityDAO

getExchangeNode

public ExchangeRate getExchangeNode(java.lang.String rateId)
Specified by:
getExchangeNode in interface CommodityDAO

getSecurities

public java.util.List<SecurityNode> getSecurities()
Specified by:
getSecurities in interface CommodityDAO

getExchangeRates

public java.util.List<ExchangeRate> getExchangeRates()
Specified by:
getExchangeRates in interface CommodityDAO

refreshCommodityNode

public void refreshCommodityNode(CommodityNode node)
Specified by:
refreshCommodityNode in interface CommodityDAO

refreshExchangeRate

public void refreshExchangeRate(ExchangeRate rate)
Specified by:
refreshExchangeRate in interface CommodityDAO

removeExchangeRateHistory

public boolean removeExchangeRateHistory(ExchangeRate rate,
                                         ExchangeRateHistoryNode hNode)
Specified by:
removeExchangeRateHistory in interface CommodityDAO

removeSecurityHistory

public boolean removeSecurityHistory(SecurityNode node,
                                     SecurityHistoryNode hNode)
Specified by:
removeSecurityHistory in interface CommodityDAO

addExchangeRate

public void addExchangeRate(ExchangeRate eRate)
Specified by:
addExchangeRate in interface CommodityDAO

updateCommodityNode

public boolean updateCommodityNode(CommodityNode node)
Specified by:
updateCommodityNode in interface CommodityDAO