ibspan.ecap.merchant.shopdecisions.dataadministration
Class DemandFactProcessor

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

public class DemandFactProcessor
extends java.lang.Object

A class responsible for extracting the appropriate information from the demand details and creating a supplies fact object.

Author:
Micha³ Drozdowicz

Constructor Summary
DemandFactProcessor()
           
 
Method Summary
 DemandFact createDemandFact(int productKey, int dateKey, DemandData data)
          Creates the demand fact.
 DemandFact createDemandFact(int productKey, int dateKey, int registeredClients)
          Creates the demand fact filling it with information about the number of buyers registered wanting to buy the product.
 void updateDemandFact(DemandFact fact, DemandData data)
          Updates the demand fact with new information about the demand gathered from the CIC.
 void updateDemandFact(DemandFact fact, int registeredClients)
          Updates the demand fact with new information about the number of clients registered to buy the product.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemandFactProcessor

public DemandFactProcessor()
Method Detail

createDemandFact

public DemandFact createDemandFact(int productKey,
                                   int dateKey,
                                   DemandData data)
Creates the demand fact.

Parameters:
productKey - the key to the product dimension entry that describes the product for which the demand was checked.
dateKey - the key to the date dimension entry that describes the date when the demand has been checked.
data - the demand data
Returns:
the demand fact

updateDemandFact

public void updateDemandFact(DemandFact fact,
                             DemandData data)
Updates the demand fact with new information about the demand gathered from the CIC.

Parameters:
fact - the fact data to update

createDemandFact

public DemandFact createDemandFact(int productKey,
                                   int dateKey,
                                   int registeredClients)
Creates the demand fact filling it with information about the number of buyers registered wanting to buy the product.

Parameters:
productKey - the product key
dateKey - the date key
registeredClients - the registered clients
Returns:
the demand fact

updateDemandFact

public void updateDemandFact(DemandFact fact,
                             int registeredClients)
Updates the demand fact with new information about the number of clients registered to buy the product.

Parameters:
fact - the fact data to update
registeredClients - the number of clients registered to buy the product.