org.apache.aries.samples.ariestrader.core
Class TradeDBManagerImpl

java.lang.Object
  extended by org.apache.aries.samples.ariestrader.core.TradeDBManagerImpl
All Implemented Interfaces:
TradeDBManager

public class TradeDBManagerImpl
extends Object
implements TradeDBManager

TradeDBManagerImpl centralizes and simplifies the DB configuration methods that are shared by some TradeServices implementations.

See Also:
TradeDBManager

Constructor Summary
TradeDBManagerImpl()
          Zero arg constructor for TradeDBManagerImpl
 
Method Summary
 String checkDBProductName()
          Return a String containing the DBProductName configured for the current DataSource used by TradeBuildDB
 void destroy()
           
 void init()
           
 boolean recreateDBTables(Object[] sqlBuffer, PrintWriter out)
          Recreate DataBase Tables for AriesTrader used by TradeBuildDB
 RunStatsDataBean resetTrade(boolean deleteAll)
          Reset the statistics for the Test AriesTrader Scenario used by TradeConfigServlet
 void setDataSource(DataSource dataSource)
          set data source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TradeDBManagerImpl

public TradeDBManagerImpl()
Zero arg constructor for TradeDBManagerImpl

Method Detail

setDataSource

public void setDataSource(DataSource dataSource)
set data source


checkDBProductName

public String checkDBProductName()
                          throws Exception
Return a String containing the DBProductName configured for the current DataSource used by TradeBuildDB

Specified by:
checkDBProductName in interface TradeDBManager
Returns:
A String of the currently configured DataSource
Throws:
Exception

recreateDBTables

public boolean recreateDBTables(Object[] sqlBuffer,
                                PrintWriter out)
                         throws Exception
Recreate DataBase Tables for AriesTrader used by TradeBuildDB

Specified by:
recreateDBTables in interface TradeDBManager
Returns:
boolean of success/failure in recreate of DB tables
Throws:
Exception

resetTrade

public RunStatsDataBean resetTrade(boolean deleteAll)
                            throws Exception
Reset the statistics for the Test AriesTrader Scenario used by TradeConfigServlet

Specified by:
resetTrade in interface TradeDBManager
Returns:
the RunStatsDataBean
Throws:
Exception

init

public void init()

destroy

public void destroy()


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.