ibspan.ecap.merchant.shopdecisions.forecasting
Class DatabaseDataProvider

java.lang.Object
  extended by ibspan.ecap.merchant.shopdecisions.forecasting.DatabaseDataProvider
All Implemented Interfaces:
DataProvider

public class DatabaseDataProvider
extends java.lang.Object
implements DataProvider


Constructor Summary
DatabaseDataProvider()
           
 
Method Summary
 net.sourceforge.openforecast.DataPoint getFuturePoint(java.lang.String productId, java.util.Date startDate, int periodLength, net.sourceforge.openforecast.DataSet historicalData)
          Creates a DataPoint containing the known (independent) future variables used by the forecast evaluator to predict the sales volume of a product.
 net.sourceforge.openforecast.DataSet getHistoricalData(java.lang.String productId, java.util.Date startDate, int periodLength)
          Creates a DataSet containing historical data needed to perform the forecast.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseDataProvider

public DatabaseDataProvider()
Method Detail

getFuturePoint

public net.sourceforge.openforecast.DataPoint getFuturePoint(java.lang.String productId,
                                                             java.util.Date startDate,
                                                             int periodLength,
                                                             net.sourceforge.openforecast.DataSet historicalData)
                                                      throws java.lang.Exception
Description copied from interface: DataProvider
Creates a DataPoint containing the known (independent) future variables used by the forecast evaluator to predict the sales volume of a product.

Specified by:
getFuturePoint in interface DataProvider
Parameters:
productId - the global id of the product to be forecasted
startDate - the date starting from which the sales should be forecasted
periodLength - the length (in days) of the forecast period
Returns:
a DataSet containing historical data needed to perform the forecast
Throws:
java.lang.Exception

getHistoricalData

public net.sourceforge.openforecast.DataSet getHistoricalData(java.lang.String productId,
                                                              java.util.Date startDate,
                                                              int periodLength)
                                                       throws java.lang.Exception
Description copied from interface: DataProvider
Creates a DataSet containing historical data needed to perform the forecast.

Specified by:
getHistoricalData in interface DataProvider
Parameters:
productId - the global id of the product to be forecasted
startDate - the date starting from which the sales should be forecasted
periodLength - the length (in days) of the forecast period
Returns:
a DataSet containing historical data needed to perform the forecast
Throws:
java.lang.Exception - when the retrieval of the data was unsuccessful