Class TierTableModel

java.lang.Object
com.highdeal.pnr.hci.TierTableModel
All Implemented Interfaces:
ITagNameProvider, XMLMarshallable, ICatalogObject

public class TierTableModel extends Object implements XMLMarshallable, ICatalogObject, ITagNameProvider
This Java class represents a tier table as seen when it comes from the back-end database; It is part of the master data owned by a service provider.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="tierTable">
   <xs:complexType>
    <xs:sequence>
     <xs:element ref="tierTableOutAttribute" minOccurs="1" maxOccurs="5"/>
     <xs:element ref="tierTableInstance" minOccurs="0" maxOccurs="unbounded"/>
     <xs:element name="tierTableInstanceChronology" minOccurs="0" maxOccurs="1">
         <xs:complexType>
           <xs:sequence>
             <xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
    </xs:sequence>
     <xs:attribute name="description" type="xs:string"/>
     <xs:attribute name="owner" type="xs:string" use="required"/>
     <xs:attribute name="code" type="xs:string" use="required"/>
     <xs:attribute name="reference" type="xs:string"/>
   </xs:complexType>
 </xs:element>

 <xs:element name="tierTableInstanceChronology">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>

  • Field Details

    • TAG_NAME

      public static final String TAG_NAME
      The value of that constant is the XML tag name of the Tier Table.
      See Also:
    • MAX_OUT_ATTRIBUTES

      public static final int MAX_OUT_ATTRIBUTES
      The maximum output attribute count: 5
      See Also:
  • Constructor Details

    • TierTableModel

      public TierTableModel()
      Builds an empty TierTableModel.
    • TierTableModel

      public TierTableModel(String code, String description)
      Builds a TierTableModel from a code and a description.
      Parameters:
      code - The code
      description - The description
  • Method Details

    • getReference

      public String getReference()
      Gets the reference.
      Returns:
      The reference
    • setReference

      public void setReference(String r)
      Sets the reference.
      Parameters:
      r - The reference
    • getInstance

      public TierTableInstanceModel getInstance()
      Gets the instance.
      Returns:
      The instance
    • setInstance

      public void setInstance(TierTableInstanceModel i)
      Sets the instance.
      Parameters:
      i - The instance
    • getCode

      public String getCode()
      Gets the code.
      Returns:
      The code
    • setCode

      public void setCode(String c)
      Sets the code.
      Parameters:
      c - The code
    • getDescription

      public String getDescription()
      Gets the description.
      Returns:
      The description
    • setDescription

      public void setDescription(String d)
      Sets the description.
      Parameters:
      d - The description
    • setOutAttributes

      public void setOutAttributes(Vector<TierTableOutAttributeModel> outAttributes)
      Sets the out attributes.
      Parameters:
      outAttributes - A Vector of TierTableOutAttributeModel representing the out attributes
    • getOutAttributes

      public Vector<TierTableOutAttributeModel> getOutAttributes()
      Gets the out attributes.
      Returns:
      A Vector of TierTableOutAttributeModel representing the out attributes
    • addOutAttribute

      public void addOutAttribute(TierTableOutAttributeModel attribute)
      Adds an out attribute.
      Parameters:
      attribute - The out attribute to add
    • removeOutAttribute

      public void removeOutAttribute(int index)
      Removes an out attribute.
      Parameters:
      index - The index of the out attribute to remove
    • getOwner

      public String getOwner()
      Gets the owner.
      Specified by:
      getOwner in interface ICatalogObject
      Returns:
      The data owner
    • setOwner

      public void setOwner(String p)
      Sets the owner.
      Parameters:
      p - The data owner
    • getInstanceChronology

      public ChronologyModel getInstanceChronology()
      Gets the instance chronology.
      Returns:
      An instance chronology with TierTableInstanceModel elements
    • checkValidity

      public boolean checkValidity()
      Returns true if the tier table is valid.
      Returns:
      true if the tier table is valid, false otherwise
    • getTagName

      public String getTagName()
      Description copied from interface: ITagNameProvider
      Gets the XML tag name of the HCI model.
      Specified by:
      getTagName in interface ITagNameProvider
      Returns:
      The XML tag name
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current element
    • addChild

      public void addChild(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(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
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Specified by:
      marshal in interface XMLMarshallable
      Parameters:
      output - The XML output to marshal the object into