Package com.highdeal.pnr.hci
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum output attribute count: 5static final StringThe value of that constant is the XML tag name of the Tier Table. -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty TierTableModel.TierTableModel(String code, String description) Builds a TierTableModel from a code and a description. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.voidaddOutAttribute(TierTableOutAttributeModel attribute) Adds an out attribute.booleanReturns true if the tier table is valid.getCode()Gets the code.Gets the description.Gets the instance.Gets the instance chronology.Gets the out attributes.getOwner()Gets the owner.Gets the reference.Gets the XML tag name of the HCI model.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidremoveOutAttribute(int index) Removes an out attribute.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets the code.voidSets the description.voidSets the instance.voidsetOutAttributes(Vector<TierTableOutAttributeModel> outAttributes) Sets the out attributes.voidSets the owner.voidSets the reference.
-
Field Details
-
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_ATTRIBUTESThe maximum output attribute count: 5- See Also:
-
-
Constructor Details
-
TierTableModel
public TierTableModel()Builds an empty TierTableModel. -
TierTableModel
Builds a TierTableModel from a code and a description.- Parameters:
code- The codedescription- The description
-
-
Method Details
-
getReference
Gets the reference.- Returns:
- The reference
-
setReference
Sets the reference.- Parameters:
r- The reference
-
getInstance
Gets the instance.- Returns:
- The instance
-
setInstance
Sets the instance.- Parameters:
i- The instance
-
getCode
Gets the code.- Returns:
- The code
-
setCode
Sets the code.- Parameters:
c- The code
-
getDescription
Gets the description.- Returns:
- The description
-
setDescription
Sets the description.- Parameters:
d- The description
-
setOutAttributes
Sets the out attributes.- Parameters:
outAttributes- A Vector ofTierTableOutAttributeModelrepresenting the out attributes
-
getOutAttributes
Gets the out attributes.- Returns:
- A Vector of
TierTableOutAttributeModelrepresenting the out attributes
-
addOutAttribute
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
Gets the owner.- Specified by:
getOwnerin interfaceICatalogObject- Returns:
- The data owner
-
setOwner
Sets the owner.- Parameters:
p- The data owner
-
getInstanceChronology
Gets the instance chronology.- Returns:
- An instance chronology with
TierTableInstanceModelelements
-
checkValidity
public boolean checkValidity()Returns true if the tier table is valid.- Returns:
trueif the tier table is valid, false otherwise
-
getTagName
Description copied from interface:ITagNameProviderGets the XML tag name of the HCI model.- Specified by:
getTagNamein interfaceITagNameProvider- Returns:
- The XML tag name
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-