com.ibm.commerce.marketingcenter.events.dbobjects
Class CpgnStats

java.lang.Object
  |
  +--com.ibm.commerce.marketingcenter.events.dbobjects.CpgnStats
All Implemented Interfaces:
MktgClickEventHandler, MktgEventHandler, MktgLogEventHandler

public class CpgnStats
extends java.lang.Object
implements MktgClickEventHandler, MktgLogEventHandler

This is the object that will persist (create / update) the event into the CPGNSTATS table.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 java.lang.Integer csclicks
          # times shopper clicked on initiative.
 java.lang.String csintvname
          Initiative name.
 java.lang.String csmpename
          MPE name.
 java.lang.String csmpetype
          MPE Type name.
 java.lang.Integer csviews
          # times initiative was shown to shoppers.
 java.lang.Integer intv_id
          Initiative ID.
 java.lang.Integer mpe_id
          MPE ID.
 java.lang.Integer mpet_id
          MPE Type ID.
 java.lang.Integer storeent_id
          Store entity ID.
 
Constructor Summary
CpgnStats()
          Constructor for CpgnStats.
 
Method Summary
 void addClick(java.util.Hashtable h)
          This method will update a record in the CPGNSTATS table.
 void addClick(java.lang.Integer mpeId, java.lang.Integer initiativeId)
          This method will update a record in the CPGNSTATS table.
 void addClick( TypedProperty tp)
          This method will update a record in the CPGNSTATS table.
 void addClick( TypedProperty tp, java.lang.Integer storeIdentifier)
          This method will update a record in the CPGNSTATS table.
 void addEvent()
          This method will persist/update a record in the CPGNSTATS table.
 void addEvent(java.util.Hashtable h)
          This method will persist/update a record in the CPGNSTATS table.
 void addEvent(java.lang.Integer mpeId, java.lang.String mpeName, java.lang.Integer initiativeId, java.lang.String initiativeName, java.lang.Integer storeId, java.lang.Integer mpeTypeId, java.lang.String mpeTypeName)
          This method will persist/update a record in the CPGNSTATS table.
 void addEvent( TypedProperty tp)
          This method will persist/update a record in the CPGNSTATS table.
 void addEvent( TypedProperty tp, java.lang.Integer storeIdentifier)
          This method will persist/update a record in the CPGNSTATS table.
 java.lang.Integer getClickCount()
          Gets the click count recorded in the current event.
 int getEventType()
          Gets the event type recorded in the current event.
 java.lang.Integer getInitiativeId()
          Gets the initiative ID recorded in the current event.
 java.lang.String getInitiativeName()
          Gets the initiative name recorded in the current event.
 java.lang.Integer getMpeId()
          Gets the MPE ID recorded in the current event.
 java.lang.String getMpeName()
          Gets the MPE name recorded in the current event.
 java.lang.String getMpeType()
          Gets the MPE type recorded in the current event.
 java.lang.Integer getMpeTypeId()
          Gets the MPE type ID recorded in the current event.
 java.lang.Integer getStoreId()
          Gets the store ID recorded in the current event.
 java.lang.Integer getViewCount()
          Gets the view count recorded in the current event.
 void persistClickEvent()
          Persists the current click event by inserting the event details into the database.
 void persistRecommendationEvent()
          Persists the current recommendation event by inserting the event details into the database.
 void processEvent()
          Processes the current click event by persisting the event details into the database.
 void setClickCount(java.lang.Integer newCsclicks)
          Sets the click count recorded in the current event.
 void setEventType(int newEventType)
          Sets the event type recorded in the current event.
 void setInitiativeId(java.lang.Integer newIntv_id)
          Sets the initiative ID recorded in the current event.
 void setInitiativeName(java.lang.String newCsintvname)
          Sets the initiative name recorded in the current event.
 void setMpeId(java.lang.Integer newMpe_id)
          Sets the MPE ID recorded in the current event.
 void setMpeName(java.lang.String newCsmpename)
          Sets the MPE name recorded in the current event.
 void setMpeType(java.lang.String newCsmpetype)
          Sets the MPE type recorded in the current event.
 void setMpeTypeId(java.lang.Integer newMpet_id)
          Sets the MPE type ID recorded in the current event.
 void setStoreId(java.lang.Integer newStore_id)
          Sets the store ID recorded in the current event.
 void setViewCount(java.lang.Integer newCsviews)
          Sets the view count recorded in the current event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values

mpe_id

public java.lang.Integer mpe_id
MPE ID.

csmpename

public java.lang.String csmpename
MPE name.

intv_id

public java.lang.Integer intv_id
Initiative ID.

csintvname

public java.lang.String csintvname
Initiative name.

storeent_id

public java.lang.Integer storeent_id
Store entity ID.

mpet_id

public java.lang.Integer mpet_id
MPE Type ID.

csmpetype

public java.lang.String csmpetype
MPE Type name.

csviews

public java.lang.Integer csviews
# times initiative was shown to shoppers.

csclicks

public java.lang.Integer csclicks
# times shopper clicked on initiative.
Constructor Detail

CpgnStats

public CpgnStats()
Constructor for CpgnStats.
Method Detail

addClick

public void addClick(TypedProperty tp)
This method will update a record in the CPGNSTATS table. If a a record is not found, no work will be done. If a record exists, the click count (# times a recommendation was clicked by the user) is incremented.
Specified by:
addClick in interface MktgClickEventHandler
Parameters:
tp - The TypedProperty that contains all the column=value pairs that are components of the primary key. The TypedProperty key names should be the same names as in the database table. The type should also be the same (e.g. Integer).

addClick

public void addClick(TypedProperty tp,
                     java.lang.Integer storeIdentifier)
This method will update a record in the CPGNSTATS table. If a a record is not found, no work will be done. If a record exists, the click count (# times a recommendation was clicked by the user) is incremented.
Specified by:
addClick in interface MktgClickEventHandler
Parameters:
tp - The TypedProperty that contains all the column=value pairs that are components of the primary key. The TypedProperty key names should be the same names as in the database table. The type should also be the same (e.g. Integer).
storeIdentifier - Not used since this is not a component of the primary key.

addClick

public void addClick(java.lang.Integer mpeId,
                     java.lang.Integer initiativeId)
This method will update a record in the CPGNSTATS table. If a a record is not found, no work will be done. If a record exists, the click count (# times a recommendation was clicked by the user) is incremented.
Parameters:
mpeId - The MPE identifier
initiativeId - The initiative identifer.

addClick

public void addClick(java.util.Hashtable h)
This method will update a record in the CPGNSTATS table. If a a record is not found, no work will be done. If a record exists, the click count (# times a recommendation was clicked by the user) is incremented.
Specified by:
addClick in interface MktgClickEventHandler
Parameters:
h - The Hashtable that contains all the column=value pairs that are components of the primary key. The Hashtable key names should be the same names as in the database table. The type should also be the same (e.g. Integer).

addEvent

public void addEvent()
This method will persist/update a record in the CPGNSTATS table. If a a record is not found, one will be created with the counters set to 0. If a record exists, the view count (# times a recommendation was presented to the user; aka impressions) is incremented. The caller must do all the setXXX prior to calling this.

addEvent

public void addEvent(TypedProperty tp)
This method will persist/update a record in the CPGNSTATS table. If a a record is not found, one will be created with the counters set to 0. If a record exists, the view count (# times a recommendation was presented to the user; aka impressions) is incremented.
Specified by:
addEvent in interface MktgLogEventHandler
Parameters:
tp - The TypedProperty that contains all the column=value pairs. The key name should be the same name as in the database table.

addEvent

public void addEvent(TypedProperty tp,
                     java.lang.Integer storeIdentifier)
This method will persist/update a record in the CPGNSTATS table. If a a record is not found, one will be created with the counters set to 0. If a record exists, the view count (# times a recommendation was presented to the user; aka impressions) is incremented.
Specified by:
addEvent in interface MktgLogEventHandler
Parameters:
tp - The TypedProperty that contains all the column=value pairs. The key name should be the same name as in the database table.
storeIdentifier - The WebSphere Commerce store identifier.

addEvent

public void addEvent(java.lang.Integer mpeId,
                     java.lang.String mpeName,
                     java.lang.Integer initiativeId,
                     java.lang.String initiativeName,
                     java.lang.Integer storeId,
                     java.lang.Integer mpeTypeId,
                     java.lang.String mpeTypeName)
This method will persist/update a record in the CPGNSTATS table. If a a record is not found, one will be created with the counters set to 0. If a record exists, the view count (# times a recommendation was presented to the user; aka impressions) is incremented.
Parameters:
mpeId - the MPE ID
mpeName - the name of the MPE
initiativeId - the initiative ID
initiativeName - the name of the initiative
storeId - the store ID
mpeTypeId - the MPE type ID
mpeTypeName - the name of the MPE type

addEvent

public void addEvent(java.util.Hashtable h)
This method will persist/update a record in the CPGNSTATS table. If a a record is not found, one will be created with the counters set to 0. If a record exists, the view count (# times a recommendation was presented to the user; aka impressions) is incremented.
Specified by:
addEvent in interface MktgLogEventHandler
Parameters:
h - The Hashtable that contains all the column=value pairs. The key name should be the same name as in the database table. The type should also be the same (e.g. Integer).

getClickCount

public java.lang.Integer getClickCount()
Gets the click count recorded in the current event.
Returns:
event click count

getEventType

public int getEventType()
Gets the event type recorded in the current event.
Returns:
event type

getInitiativeId

public java.lang.Integer getInitiativeId()
Gets the initiative ID recorded in the current event.
Returns:
initiative ID

getInitiativeName

public java.lang.String getInitiativeName()
Gets the initiative name recorded in the current event.
Returns:
initiative name

getMpeId

public java.lang.Integer getMpeId()
Gets the MPE ID recorded in the current event.
Returns:
MPE ID

getMpeName

public java.lang.String getMpeName()
Gets the MPE name recorded in the current event.
Returns:
MPE name

getMpeType

public java.lang.String getMpeType()
Gets the MPE type recorded in the current event.
Returns:
MPE type

getMpeTypeId

public java.lang.Integer getMpeTypeId()
Gets the MPE type ID recorded in the current event.
Returns:
MPE type ID

getStoreId

public java.lang.Integer getStoreId()
Gets the store ID recorded in the current event.
Returns:
store ID

getViewCount

public java.lang.Integer getViewCount()
Gets the view count recorded in the current event.
Returns:
event view count

persistClickEvent

public void persistClickEvent()
Persists the current click event by inserting the event details into the database.

persistRecommendationEvent

public void persistRecommendationEvent()
Persists the current recommendation event by inserting the event details into the database.

processEvent

public void processEvent()
Processes the current click event by persisting the event details into the database.

setClickCount

public void setClickCount(java.lang.Integer newCsclicks)
Sets the click count recorded in the current event.
Parameters:
newCsclicks - click count

setEventType

public void setEventType(int newEventType)
Sets the event type recorded in the current event.
Parameters:
newEventType - event type

setInitiativeId

public void setInitiativeId(java.lang.Integer newIntv_id)
Sets the initiative ID recorded in the current event.
Parameters:
newIntv_id - initiative ID

setInitiativeName

public void setInitiativeName(java.lang.String newCsintvname)
Sets the initiative name recorded in the current event.
Parameters:
newCsintvname - initiative name

setMpeId

public void setMpeId(java.lang.Integer newMpe_id)
Sets the MPE ID recorded in the current event.
Parameters:
newMpe_id - MPE ID

setMpeName

public void setMpeName(java.lang.String newCsmpename)
Sets the MPE name recorded in the current event.
Parameters:
newCsmpename - MPE name

setMpeType

public void setMpeType(java.lang.String newCsmpetype)
Sets the MPE type recorded in the current event.
Parameters:
newCsmpetype - MPE type

setMpeTypeId

public void setMpeTypeId(java.lang.Integer newMpet_id)
Sets the MPE type ID recorded in the current event.
Parameters:
newMpet_id - MPE type ID

setStoreId

public void setStoreId(java.lang.Integer newStore_id)
Sets the store ID recorded in the current event.
Parameters:
newStore_id - store ID

setViewCount

public void setViewCount(java.lang.Integer newCsviews)
Sets the view count recorded in the current event.
Parameters:
newCsviews - view count