com.ibm.commerce.marketingcenter.events.databeans

Class CampaignLoggingDataBean

  • java.lang.Object
    • com.ibm.commerce.marketingcenter.events.databeans.CampaignLoggingDataBean


  • public class CampaignLoggingDataBean
    extends java.lang.Object
    The campaign logging data to be passed in a Campaign Logging common base event and then persisted to the database. The following code samples demonstrate how to send an event to be persisted to the database in different situations:
    1. When a campaign is displayed to the customer:
          CampaignLoggingDataBean eldb = new CampaignLoggingDataBean(eMarketingSpotId, initiativeId, storeId);
          eldb.setCampaignId(campaignId);
          eldb.setCampaignName(campaignName);
          eldb.setEMarketingSpotName(eMarketingSpotName);
          eldb.setEMarketingSpotTypeId(eMarketingSpotTypeId);
          eldb.setEMarketingSpotTypeName(eMarketingSpotTypeName);
          eldb.setInitiativeName(initiativeName);
          eldb.setResults(results);
          eldb.setShopSegments(shopSegments);
          eldb.setUsrTrafficId(usrTrafficId);
          eldb.setCampaignWasViewed(true);
          CampaignEventUtilities.sendCampaignLoggingEvent(eldb);
       
    2. When a campaign result is clicked by the customer:
          CampaignLoggingDataBean eldb = new CampaignLoggingDataBean(eMarketingSpotId, initiativeId, storeId);
          eldb.setCampaignWasClicked(true);
          CampaignEventUtilities.sendCampaignLoggingEvent(eldb);
       
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CampaignLoggingDataBean()
      This constructor creates an CampaignLoggingDataBean.
      CampaignLoggingDataBean(java.lang.Integer eMarketingSpotId, java.lang.Integer initiativeId, java.lang.Integer storeId)
      This constructor creates an CampaignLoggingDataBean.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getCampaignId()
      This method gets the ID of the campaign.
      java.lang.String getCampaignName()
      This method gets the name of the campaign.
      boolean getCampaignWasClicked()
      This method gets the field that specifies whether or not the campaign was clicked by the customer.
      java.lang.String getCampaignWasClickedAsString()
      This method gets the field that specifies whether or not the campaign was clicked by the customer.
      boolean getCampaignWasViewed()
      This method gets the field that specifies whether or not the campaign was viewed by the customer.
      java.lang.String getCampaignWasViewedAsString()
      This method gets the field that specifies whether or not the campaign was viewed by the customer.
      java.lang.String getEMarketingSpotId()
      This method gets the ID of the e-Marketing Spot.
      java.lang.String getEMarketingSpotName()
      This method gets the name of the e-Marketing Spot.
      java.lang.String getEMarketingSpotTypeId()
      This method gets the ID of the e-Marketing Spot type.
      java.lang.String getEMarketingSpotTypeName()
      This method gets the name of the e-Marketing Spot type.
      java.lang.String getInitiativeId()
      This method gets the ID of the initiative.
      java.lang.String getInitiativeName()
      This method gets the name of the initiative.
      java.lang.String getResults()
      This method gets the campaign result that is shown to the customer.
      java.lang.String getShopSegments()
      This method gets the customer segment identifiers.
      java.lang.String getStoreId()
      This method gets the ID of the store.
      java.lang.String getUsrTrafficId()
      This method gets the ID of the user traffic.
      void setCampaignId(java.lang.Integer campaignId)
      This method sets the ID of the campaign.
      void setCampaignName(java.lang.String campaignName)
      This method sets the name of the campaign.
      void setCampaignWasClicked(boolean wasCampaignClicked)
      This method sets the field that specifies whether or not the campaign was clicked by the customer.
      void setCampaignWasClicked(java.lang.String wasCampaignClicked)
      This method sets the field that specifies whether or not the campaign was clicked by the customer.
      void setCampaignWasViewed(boolean wasCampaignViewed)
      This method sets the field that specifies whether or not the campaign was viewed by the customer.
      void setCampaignWasViewed(java.lang.String wasCampaignViewed)
      This method sets the field that specifies whether or not the campaign was viewed by the customer.
      void setEMarketingSpotId(java.lang.Integer eMarketingSpotId)
      This method sets the ID of the e-Marketing Spot.
      void setEMarketingSpotName(java.lang.String eMarketingSpotName)
      This method sets the name of the e-Marketing Spot.
      void setEMarketingSpotTypeId(java.lang.Integer eMarketingSpotTypeId)
      This method sets the ID of the e-Marketing Spot type.
      void setEMarketingSpotTypeName(java.lang.String eMarketingSpotTypeName)
      This method sets the name of the e-Marketing Spot type.
      void setInitiativeId(java.lang.Integer initiativeId)
      This method sets the ID of the initiative.
      void setInitiativeName(java.lang.String initiativeName)
      This method sets the name of the initiative.
      void setResults(java.lang.String results)
      This method sets the campaign result that is shown to the customer.
      void setShopSegments(java.lang.String shopSegments)
      This method sets the customer segment identifiers.
      void setStoreId(java.lang.Integer storeId)
      This method sets the ID of the store.
      void setUsrTrafficId(java.lang.Long usrTrafficId)
      This method sets the ID of the user traffic.
      java.lang.String toString()
      This method gets the string respresentation of this data bean.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • COPYRIGHT

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

      • CampaignLoggingDataBean

        public CampaignLoggingDataBean()
        This constructor creates an CampaignLoggingDataBean. This constructor just calls the superclass constructor.
      • CampaignLoggingDataBean

        public CampaignLoggingDataBean(java.lang.Integer eMarketingSpotId,
                                       java.lang.Integer initiativeId,
                                       java.lang.Integer storeId)
        This constructor creates an CampaignLoggingDataBean. This constructor calls the superclass constructor then sets values specified by the four parameters.
        Parameters:
        eMarketingSpotId - The e-Marketing Spot ID.
        initiativeId - The initiative ID.
        storeId - The store ID.
    • Method Detail

      • getCampaignId

        public java.lang.String getCampaignId()
        This method gets the ID of the campaign.
        Returns:
        The ID of the campaign.
      • getCampaignName

        public java.lang.String getCampaignName()
        This method gets the name of the campaign.
        Returns:
        The name of the campaign.
      • getCampaignWasClicked

        public boolean getCampaignWasClicked()
        This method gets the field that specifies whether or not the campaign was clicked by the customer.
        Returns:
        The field that specifies whether or not the campaign was clicked by the customer.
      • getCampaignWasClickedAsString

        public java.lang.String getCampaignWasClickedAsString()
        This method gets the field that specifies whether or not the campaign was clicked by the customer.
        Returns:
        The field that specifies whether or not the campaign was clicked by the customer.
      • getCampaignWasViewed

        public boolean getCampaignWasViewed()
        This method gets the field that specifies whether or not the campaign was viewed by the customer.
        Returns:
        The field that specifies whether or not the campaign was viewed by the customer.
      • getCampaignWasViewedAsString

        public java.lang.String getCampaignWasViewedAsString()
        This method gets the field that specifies whether or not the campaign was viewed by the customer.
        Returns:
        The field that specifies whether or not the campaign was viewed by the customer.
      • getEMarketingSpotId

        public java.lang.String getEMarketingSpotId()
        This method gets the ID of the e-Marketing Spot.
        Returns:
        The ID of the e-Marketing Spot.
      • getEMarketingSpotName

        public java.lang.String getEMarketingSpotName()
        This method gets the name of the e-Marketing Spot.
        Returns:
        The name of the e-Marketing Spot.
      • getEMarketingSpotTypeId

        public java.lang.String getEMarketingSpotTypeId()
        This method gets the ID of the e-Marketing Spot type.
        Returns:
        The ID of the e-Marketing Spot type.
      • getEMarketingSpotTypeName

        public java.lang.String getEMarketingSpotTypeName()
        This method gets the name of the e-Marketing Spot type.
        Returns:
        The name of the e-Marketing Spot type.
      • getInitiativeId

        public java.lang.String getInitiativeId()
        This method gets the ID of the initiative.
        Returns:
        The ID of the initiative.
      • getInitiativeName

        public java.lang.String getInitiativeName()
        This method gets the name of the initiative.
        Returns:
        The name of the initiative.
      • getResults

        public java.lang.String getResults()
        This method gets the campaign result that is shown to the customer.
        Returns:
        The campaign result that is shown to the customer.
      • getShopSegments

        public java.lang.String getShopSegments()
        This method gets the customer segment identifiers.
        Returns:
        The customer segment identifiers.
      • getStoreId

        public java.lang.String getStoreId()
        This method gets the ID of the store.
        Returns:
        The ID of the store.
      • getUsrTrafficId

        public java.lang.String getUsrTrafficId()
        This method gets the ID of the user traffic.
        Returns:
        The ID of the user traffic.
      • setCampaignId

        public void setCampaignId(java.lang.Integer campaignId)
        This method sets the ID of the campaign.
        Parameters:
        campaignId - The ID of the campaign.
      • setCampaignName

        public void setCampaignName(java.lang.String campaignName)
        This method sets the name of the campaign.
        Parameters:
        campaignName - The name of the campaign.
      • setCampaignWasClicked

        public void setCampaignWasClicked(boolean wasCampaignClicked)
        This method sets the field that specifies whether or not the campaign was clicked by the customer.
        Parameters:
        wasCampaignClicked - The field that specifies whether or not the campaign was clicked by the customer.
      • setCampaignWasClicked

        public void setCampaignWasClicked(java.lang.String wasCampaignClicked)
        This method sets the field that specifies whether or not the campaign was clicked by the customer.
        Parameters:
        wasCampaignClicked - The field that specifies whether or not the campaign was clicked by the customer.
      • setCampaignWasViewed

        public void setCampaignWasViewed(boolean wasCampaignViewed)
        This method sets the field that specifies whether or not the campaign was viewed by the customer.
        Parameters:
        wasCampaignViewed - The field that specifies whether or not the campaign was viewed by the customer.
      • setCampaignWasViewed

        public void setCampaignWasViewed(java.lang.String wasCampaignViewed)
        This method sets the field that specifies whether or not the campaign was viewed by the customer.
        Parameters:
        wasCampaignViewed - The field that specifies whether or not the campaign was viewed by the customer.
      • setEMarketingSpotId

        public void setEMarketingSpotId(java.lang.Integer eMarketingSpotId)
        This method sets the ID of the e-Marketing Spot.
        Parameters:
        eMarketingSpotId - The ID of the e-Marketing Spot.
      • setEMarketingSpotName

        public void setEMarketingSpotName(java.lang.String eMarketingSpotName)
        This method sets the name of the e-Marketing Spot.
        Parameters:
        eMarketingSpotName - The name of the e-Marketing Spot.
      • setEMarketingSpotTypeId

        public void setEMarketingSpotTypeId(java.lang.Integer eMarketingSpotTypeId)
        This method sets the ID of the e-Marketing Spot type.
        Parameters:
        eMarketingSpotTypeId - The ID of the e-Marketing Spot type.
      • setEMarketingSpotTypeName

        public void setEMarketingSpotTypeName(java.lang.String eMarketingSpotTypeName)
        This method sets the name of the e-Marketing Spot type.
        Parameters:
        eMarketingSpotTypeName - The name of the e-Marketing Spot type.
      • setInitiativeId

        public void setInitiativeId(java.lang.Integer initiativeId)
        This method sets the ID of the initiative.
        Parameters:
        initiativeId - The ID of the initiative.
      • setInitiativeName

        public void setInitiativeName(java.lang.String initiativeName)
        This method sets the name of the initiative.
        Parameters:
        initiativeName - The name of the initiative.
      • setResults

        public void setResults(java.lang.String results)
        This method sets the campaign result that is shown to the customer.
        Parameters:
        results - The campaign result that is shown to the customer.
      • setShopSegments

        public void setShopSegments(java.lang.String shopSegments)
        This method sets the customer segment identifiers.
        Parameters:
        shopSegments - The customer segment identifiers.
      • setStoreId

        public void setStoreId(java.lang.Integer storeId)
        This method sets the ID of the store.
        Parameters:
        storeId - The ID of the store.
      • setUsrTrafficId

        public void setUsrTrafficId(java.lang.Long usrTrafficId)
        This method sets the ID of the user traffic.
        Parameters:
        usrTrafficId - The ID of the user traffic.
      • toString

        public java.lang.String toString()
        This method gets the string respresentation of this data bean.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string respresentation of this data bean.