com.ibm.commerce.marketing.promotion.choice.gift

Class CatalogEntryGiftItem

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.choice.gift.CatalogEntryGiftItem
  • All Implemented Interfaces:
    GiftItem, XMLizable, java.io.Serializable


    public class CatalogEntryGiftItem
    extends java.lang.Object
    implements GiftItem
    This class implements GiftItem interface and it defines a gift item with CatalogEntryKey. XML Snippet for this GiftItem:
     <p>
     <GiftItem impl="com.ibm.commerce.marketing.promotion.choice.gift.CatalogEntryGiftItem">
            <Quantity>1</Quantity>
            <CatalogEntryKey>
                    <SKU>SKU-20101099</SKU>
                    <DN>o=Root Organization</DN>        
            </CatalogEntryKey>        
     </GiftItem>
     </p>
     
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void fromXML(org.w3c.dom.Node anXMLNode)
      Transforms the XML node into its corresponding real Object.
      Key getKey()
      Gets the key object for the gift item.
      java.lang.Integer getQuantity()
      Gets the quantity associated with this gift item.
      void setKey(Key aKey)
      Sets a CatalogEntryKey object as the gift item key.
      void setQuantity(java.lang.Integer aQuantity)
      Sets the quantity associated with this gift item.
      java.lang.String toXML()
      Please note that this implementation will cache the result XML after first call to this method.
      • Methods inherited from class java.lang.Object

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

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • TAG_QUANTITY

        public static final java.lang.String TAG_QUANTITY
        XML tag - Quantity
        See Also:
        Constant Field Values
      • TAG_CATALOG_ENTRY_KEY

        public static final java.lang.String TAG_CATALOG_ENTRY_KEY
        XML tag - CatalogEntryKey
        See Also:
        Constant Field Values
    • Constructor Detail

      • CatalogEntryGiftItem

        public CatalogEntryGiftItem()
    • Method Detail

      • getKey

        public Key getKey()
        Gets the key object for the gift item. This method returns a CatalogEntryKey object.
        Specified by:
        getKey in interface GiftItem
        Returns:
        The gift item key object.
        See Also:
        GiftItem.getKey()
      • setKey

        public void setKey(Key aKey)
        Sets a CatalogEntryKey object as the gift item key.
        Specified by:
        setKey in interface GiftItem
        Parameters:
        aKey - The CatalogEntryKey object to set.
      • getQuantity

        public java.lang.Integer getQuantity()
        Gets the quantity associated with this gift item.
        Specified by:
        getQuantity in interface GiftItem
        Returns:
        The quantity associated with the gift item.
        See Also:
        GiftItem.getQuantity()
      • toXML

        public java.lang.String toXML()
                               throws XMLizationException
        Please note that this implementation will cache the result XML after first call to this method. It is expected that contents of this object should not be changed once this method is called. Create a new instance if change is required.
        Specified by:
        toXML in interface XMLizable
        Returns:
        The string format of the XML that represents this XMLizable object
        Throws:
        XMLizationException - when this process fails
        See Also:
        XMLizable.toXML()
      • setQuantity

        public void setQuantity(java.lang.Integer aQuantity)
        Sets the quantity associated with this gift item.
        Specified by:
        setQuantity in interface GiftItem
        Parameters:
        aQuantity - The quantity to set.