Skip navigation links
com.highdeal.pnr.hci

Class ProductModel

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String TAG_NAME 
    • Constructor Summary

      Constructors 
      Constructor and Description
      ProductModel()
      Builds an empty product.
      ProductModel(java.lang.String code, java.lang.String description)
      Builds a product from a code and a description.
      ProductModel(java.lang.String code, java.lang.String description, java.lang.String p)
      Builds a product from a code, a description and a vendor.
    • Constructor Detail

      • ProductModel

        public ProductModel()
        Builds an empty product.
      • ProductModel

        public ProductModel(java.lang.String code,
                            java.lang.String description)
        Builds a product from a code and a description.
        Parameters:
        code - The code of the product
        description - The description of the product
      • ProductModel

        public ProductModel(java.lang.String code,
                            java.lang.String description,
                            java.lang.String p)
        Builds a product from a code, a description and a vendor.
        Parameters:
        code - The code of the product
        description - The description of the product
        p - The vendor of the product
    • Method Detail

      • getReference

        public java.lang.String getReference()
        Returns the reference of the product.
        Returns:
        the reference of the product
      • setReference

        public void setReference(java.lang.String reference)
        Sets the reference of the product.
        Parameters:
        reference - The reference
      • getCode

        public java.lang.String getCode()
        Returns the code of the product.
        Returns:
        the code of the product
      • setCode

        public void setCode(java.lang.String code)
        Sets the code of the product.
        Parameters:
        code - The code of this product
      • getDescription

        public java.lang.String getDescription()
        Returns the description of the product.
        Returns:
        the description of the product
      • setDescription

        public void setDescription(java.lang.String description)
        Sets the description of the product.
        Parameters:
        description - the description of this product.
      • getOwner

        public java.lang.String getOwner()
        Description copied from interface: ICatalogObject
        Returns the catalog owner of the object.
        Specified by:
        getOwner in interface ICatalogObject
        Returns:
        The catalog owner of the object
      • getVendor

        public java.lang.String getVendor()
        Returns the vendor of the product.
        Returns:
        the vendor of the product
      • setVendor

        public void setVendor(java.lang.String v)
        Sets the vendor of the product.
        Parameters:
        v - The vendor of the product
      • addChargeableItemDescription

        public void addChargeableItemDescription(ChargeableItemDescriptionModel cid)
        Adds a chargeable item description to the list which defines the product.
        Parameters:
        cid - The ChargeableItemDescriptionModel to add
      • removeChargeableItemDescription

        public void removeChargeableItemDescription(int index)
        Removes a chargeable item description from the list which defines the product.
        Parameters:
        index - The index of the chargeable item description to remove
      • checkValidity

        public boolean checkValidity()
        Tests if the product is valid. Product is valid if its name is not null or empty, and if all chargeable items are valid with unique names.
        Returns:
        true if the product is valid, false otherwise.
      • addChild

        public void addChild(java.lang.String tagName,
                             XMLMarshallable child)
        Description copied from interface: XMLMarshallable
        Adds a child to the object, the child representing the marshallable object which must be added to the element.
        Specified by:
        addChild in interface XMLMarshallable
        Parameters:
        tagName - The name of tag for the child
        child - The child to be added
      • addCharacterData

        public void addCharacterData(java.lang.String cData)
        Description copied from interface: XMLMarshallable
        Adds character data to the content element.
        Specified by:
        addCharacterData in interface XMLMarshallable
        Parameters:
        cData - The character data to be added
Document Published: November 2017 (SAP CC 5.0 SP 0 and Later)