com.ibm.commerce.marketing.promotion.dependency

Class CategoryKey

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.dependency.CategoryKey
  • All Implemented Interfaces:
    Key, NumericKey, XMLizable, java.io.Serializable


    public class CategoryKey
    extends java.lang.Object
    implements XMLizable, NumericKey
    The key to represent a category in the store. A CategoryKey is composed of a Distinguished Name (DN) and a name for the category entry.

    XML Snippet of CategoryKey:

      <CategoryKey>
            <DN>ou=b2c,o=seller organization,o=root organization</DN>
            <Name>Furniture</Name>
      </CategoryKey>
      
     
    See Also:
    Serialized Form
    • Field Summary

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

      Constructors 
      Constructor and Description
      CategoryKey()
      Default Constructor for CategoryKey.
      CategoryKey(java.lang.String aDN, java.lang.String aName)
      Constructor for CategoryKey.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj)
      Returns true if this Category key equals to another Category key.
      void fromXML(org.w3c.dom.Node node)
      Transforms the XML node into its corresponding real Object.
      java.lang.String getDN()
      Returns the DN associated with category key.
      java.lang.String getName()
      Returns the name associated with category key.
      java.lang.Number getNumericKey()
      Returns the numeric key of the category key.
      int hashCode()
      Returns the hashcode of the Category key.
      boolean isNumericKeySet()
      Checks if numericKey is set or not.
      void setDN(java.lang.String aDN)
      Sets the DN of key.
      void setName(java.lang.String aName)
      Sets the Name of the key.
      void setNumericKey(java.lang.Number aNumericKey)
      Sets the numeric key of the category key.
      java.lang.String toString()
      Give a String representation of this CategoryKey.
      java.lang.String toXML()
      Converts the object into its corresponding XML format representation.
      • Methods inherited from class java.lang.Object

        getClass, 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

      • CategoryKey

        public CategoryKey()
        Default Constructor for CategoryKey.
      • CategoryKey

        public CategoryKey(java.lang.String aDN,
                           java.lang.String aName)
        Constructor for CategoryKey.
        Parameters:
        aDN - java.lang.String of DN
        aName - java.lang.String of category key name
    • Method Detail

      • getDN

        public java.lang.String getDN()
        Returns the DN associated with category key.
        Returns:
        String DN associated with category key.
      • getName

        public java.lang.String getName()
        Returns the name associated with category key.
        Returns:
        String the name associated with category key.
      • toString

        public java.lang.String toString()
        Give a String representation of this CategoryKey.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String for this CategoryKey.
      • equals

        public boolean equals(java.lang.Object obj)
        Returns true if this Category key equals to another Category key.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - Object of category key
        Returns:
        boolean true if both category keys are equal; false otherwise.
      • hashCode

        public int hashCode()
        Returns the hashcode of the Category key.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashcode of the Category key.
      • getNumericKey

        public java.lang.Number getNumericKey()
        Returns the numeric key of the category key.
        Specified by:
        getNumericKey in interface NumericKey
        Returns:
        Number which is the numeric key of the category key.
      • isNumericKeySet

        public boolean isNumericKeySet()
        Checks if numericKey is set or not.
        Specified by:
        isNumericKeySet in interface NumericKey
        Returns:
        boolean true if key is set; false otherwise.
      • setNumericKey

        public void setNumericKey(java.lang.Number aNumericKey)
        Sets the numeric key of the category key.
        Parameters:
        aNumericKey - is to set numeric key of the category key.
      • setDN

        public void setDN(java.lang.String aDN)
        Sets the DN of key.
        Parameters:
        aDN - The DN to set.
      • setName

        public void setName(java.lang.String aName)
        Sets the Name of the key.
        Parameters:
        aName - The Name to set.