ibspan.ecap.merchant.shopdecisions.dataadministration
Class DataAdministrationModule

java.lang.Object
  extended by ibspan.ecap.merchant.shopdecisions.dataadministration.DataAdministrationModule

public class DataAdministrationModule
extends java.lang.Object

A module responsible for staging and administering the data in the data warehouse. Singleton.

Author:
Micha³ Drozdowicz

Method Summary
static DataAdministrationModule getInstance()
          Gets the single instance of DataAdministrationModule.
 void initDateDimension(java.util.Date startDate, int days)
           
 void recordBuyerRegistrations(BuyerRegistrationInfo info)
          Records buyer registrations.
 void recordDemandData(DemandData data)
          Records demand data.
 void recordFinishedTransactionDetails(TransactionLog log)
          Records finished transaction details in the database.
 void recordForecastData(ForecastDescription forecast)
           
 void recordNegotiationDetails(NegotiationLog log)
          Records negotiation details in the database.
 void recordWarehouseDeliveryDetails(DeliveryLog log)
          Records warehouse delivery details.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DataAdministrationModule getInstance()
Gets the single instance of DataAdministrationModule.

Returns:
single instance of DataAdministrationModule

initDateDimension

public void initDateDimension(java.util.Date startDate,
                              int days)

recordNegotiationDetails

public void recordNegotiationDetails(NegotiationLog log)
                              throws DataAccessException
Records negotiation details in the database.

Parameters:
log - the information about the negotiation
Throws:
DataAccessException - exception is thrown if an error during accessing the database occurs thus causing the operation to fail.

recordFinishedTransactionDetails

public void recordFinishedTransactionDetails(TransactionLog log)
                                      throws DataAccessException,
                                             InvalidOperationException
Records finished transaction details in the database.

Parameters:
log - the information about the finished transaction
Throws:
DataAccessException - exception is thrown if an error during accessing the database occurs thus causing the operation to fail.
InvalidOperationException - exception is thrown if the negotiation corresponding to the specified transaction hadn't been recorded before.

recordWarehouseDeliveryDetails

public void recordWarehouseDeliveryDetails(DeliveryLog log)
                                    throws DataAccessException
Records warehouse delivery details.

Parameters:
log - the information about a product delivery to the warehouse.
Throws:
DataAccessException - exception is thrown if an error during accessing the database occurs thus causing the operation to fail.

recordDemandData

public void recordDemandData(DemandData data)
                      throws DataAccessException
Records demand data.

Parameters:
data - the demand data
Throws:
DataAccessException - exception is thrown if an error during accessing the database occurs thus causing the operation to fail.

recordBuyerRegistrations

public void recordBuyerRegistrations(BuyerRegistrationInfo info)
                              throws DataAccessException
Records buyer registrations.

Parameters:
info - the info
Throws:
DataAccessException - the data access exception

recordForecastData

public void recordForecastData(ForecastDescription forecast)
                        throws DataAccessException
Throws:
DataAccessException