com.ibm.commerce.marketing.promotion.policy

Class PromotionPolicyKey

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.policy.PromotionPolicyKey
  • All Implemented Interfaces:
    Key, NumericKey, XMLizable, com.ibm.websphere.cache.Sizeable, java.io.Serializable


    public class PromotionPolicyKey
    extends java.lang.Object
    implements XMLizable, NumericKey, com.ibm.websphere.cache.Sizeable
    This class represents a unique promotion policy within a store. The unique promotion policy is identified by the StoreKey and the policy name. XML Snippet for the PromotionPolicyKey.
     <PromotionPolicyKey>
                    <PolicyName>Unique Name for the policy</PolicyName>
                    <StoreKey>
                            <DN>o=root organization</DN>
                            <Identifier>BlueStore 202</Identifier>
                    </StoreKey>
     </PromotionPolicyKey>
     
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      PromotionPolicyKey()
      Default constructor
      PromotionPolicyKey(org.w3c.dom.Node promotionPolicyKeyNode)
      Constructor based on one XML node, which represent a promotion policy key.
      PromotionPolicyKey(StoreKey key, java.lang.String aPolicyName)
      Constructor for PromotionPolicyKey.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object aObject)
      This method checks for equality.
      void fromXML(org.w3c.dom.Node node)
      Build itself from one XML representation.
      java.lang.Number getNumericKey()
      Returns the numericKey.
      long getObjectSize()
      Returns the estimated footprint size in bytes of this object and the objects it contains.
      java.lang.String getPolicyName()
      Returns the policyName.
      StoreKey getStoreKey()
      Returns the storeKey.
      int hashCode()
      This method returns the hash code.
      boolean isNumericKeySet()
      Checks to see if the numeric key is set or not.
      void setNumericKey(java.lang.Number aNumericKey)
      Sets the numericKey.
      void setStoreKey(StoreKey aStoreKey)
      Sets the storeKey.
      java.lang.String toString()
      Give a String presentation of this Promotion Policy key.
      java.lang.String toXML()
      Generate an XML representation for this promotion policy key.
      • Methods inherited from class java.lang.Object

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

      • TAG_PROMOTION_POLICY_KEY

        public static final java.lang.String TAG_PROMOTION_POLICY_KEY
        Promotion policy key tag.
        See Also:
        Constant Field Values
      • TAG_PROMOTION_POLICY_NAME

        public static final java.lang.String TAG_PROMOTION_POLICY_NAME
        Promotion policy name tag.
        See Also:
        Constant Field Values
      • TAG_STORE_NAME

        public static final java.lang.String TAG_STORE_NAME
        The tag of store name, which this promotion policy belongs to.
        See Also:
        Constant Field Values
      • TAG_STORE_OWNER_DN

        public static final java.lang.String TAG_STORE_OWNER_DN
        The tag of store owner's Distinguished Name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PromotionPolicyKey

        public PromotionPolicyKey()
        Default constructor
      • PromotionPolicyKey

        public PromotionPolicyKey(StoreKey key,
                                  java.lang.String aPolicyName)
        Constructor for PromotionPolicyKey.
        Parameters:
        key - The StoreKey.
        aPolicyName - The name of the promotion policy.
      • PromotionPolicyKey

        public PromotionPolicyKey(org.w3c.dom.Node promotionPolicyKeyNode)
        Constructor based on one XML node, which represent a promotion policy key.
        Parameters:
        promotionPolicyKeyNode - The node.
    • Method Detail

      • getObjectSize

        public long getObjectSize()
        Returns the estimated footprint size in bytes of this object and the objects it contains.
        Specified by:
        getObjectSize in interface com.ibm.websphere.cache.Sizeable
        Returns:
        the estimated footprint size in bytes or -1 if a size cannot be determined.
      • getPolicyName

        public java.lang.String getPolicyName()
        Returns the policyName.
        Returns:
        String policy name
      • equals

        public boolean equals(java.lang.Object aObject)
        This method checks for equality.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if the specified object is equal to this object, false otherwise.
        See Also:
        Object.equals(Object)
      • hashCode

        public int hashCode()
        This method returns the hash code.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code.
        See Also:
        Object.hashCode()
      • fromXML

        public void fromXML(org.w3c.dom.Node node)
                     throws DeXMLizationException
        Build itself from one XML representation.
        Specified by:
        fromXML in interface XMLizable
        Parameters:
        node - the XML node based on which a promotion policy key will be built
        Throws:
        DeXMLizationException - when parse of this XML to build a promotion key object fails
      • getNumericKey

        public java.lang.Number getNumericKey()
        Returns the numericKey.
        Specified by:
        getNumericKey in interface NumericKey
        Returns:
        Number
      • setNumericKey

        public void setNumericKey(java.lang.Number aNumericKey)
        Sets the numericKey.
        Parameters:
        aNumericKey - The numericKey to set
      • getStoreKey

        public StoreKey getStoreKey()
        Returns the storeKey.
        Returns:
        StoreKey
      • setStoreKey

        public void setStoreKey(StoreKey aStoreKey)
        Sets the storeKey.
        Parameters:
        aStoreKey - The storeKey to set
      • toString

        public java.lang.String toString()
        Give a String presentation of this Promotion Policy key.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String representation of the Promotion Policy key.