com.ibm.commerce.marketing.promotion.dependency

Class OrderItemKey

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


    public class OrderItemKey
    extends java.lang.Object
    implements NumericKey, XMLizable, java.lang.Comparable
    This class represents order item key of OrderItem object.

    XML Snippet for OrderItemKey:

      <OrderItemKey>
            <OrderItemId>1234</OrderItemId>
      </OrderItemKey>
      
     
    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
      OrderItemKey()
      Default Constructor for OrderItemKey.
      OrderItemKey(java.lang.Long anOrderItemId)
      Constructor for OrderItemKey.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int compareTo(java.lang.Object obj)
      This method compares the current object of order item key with another one.
      boolean equals(java.lang.Object obj)
      Returns true if this OrderItem key equals to another OrderItem key.
      void fromXML(org.w3c.dom.Node node)
      Transforms the XML node into its corresponding real Object.
      java.lang.Number getNumericKey()
      Returns the numericKey.
      java.lang.Long getOrderItemId()
      Returns the order item id.
      int hashCode()
      Returns the hashcode of the OrderItem key.
      boolean isNumericKeySet()
      Checks if numericKey is set or not.
      void setNumericKey(java.lang.Number numericKey)
      Sets the numericKey.
      java.lang.String toString()
      Give a String presentation of this OrderItem Key.
      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

      • OrderItemKey

        public OrderItemKey()
        Default Constructor for OrderItemKey.
      • OrderItemKey

        public OrderItemKey(java.lang.Long anOrderItemId)
        Constructor for OrderItemKey.
        Parameters:
        anOrderItemId - java.lang.Long is the order item id.
    • Method Detail

      • getOrderItemId

        public java.lang.Long getOrderItemId()
        Returns the order item id.
        Returns:
        Long is the order item id.
      • toString

        public java.lang.String toString()
        Give a String presentation of this OrderItem Key.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String is a String presentation of this OrderItem Key.
      • equals

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

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

        public java.lang.Number getNumericKey()
        Returns the numericKey.
        Specified by:
        getNumericKey in interface NumericKey
        Returns:
        Number the numericKey.
      • 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 numericKey)
        Sets the numericKey.
        Parameters:
        numericKey - The numericKey to set
      • compareTo

        public int compareTo(java.lang.Object obj)
        This method compares the current object of order item key with another one.
        Specified by:
        compareTo in interface java.lang.Comparable
        Parameters:
        obj - java.lang.Object is an object of order item.
        Returns:
        int 0 if equal, 1 if current objects's orderId greater than that of passed object -1 if current objects's orderId lesser than that of passed object