Package com.highdeal.pnr.hci
Class OfferConditionModel
java.lang.Object
com.highdeal.pnr.hci.OfferConditionModel
- All Implemented Interfaces:
XMLMarshallable
This class represents the information to subscribe
and use an offer inside a packaged offer.
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="offerCondition">
<xs:complexType>
<xs:sequence>
<xs:element ref="chargeCondition" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="counterDescription" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="offerConditionContext" minOccurs="0" maxOccurs="1"/>
<xs:element ref="offerConditionContextChronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="subCode" type="xs:string" use="required"/>
<xs:attribute name="offerCode" type="xs:string" use="required"/>
<xs:attribute name="reference" type="xs:string"/>
<xs:attribute name="optionalOrder" type="xs:boolean" default="false"/>
<xs:attribute name="orderMinimum" type="xs:decimal" default="1"/>
<xs:attribute name="orderMaximum" type="xs:decimal" default="1"/>
<xs:attribute name="orderStep" type="xs:decimal" default="1"/>
</xs:complexType>
</xs:element>
<xs:element name="offerConditionContextChronology">
<xs:complexType>
<xs:sequence>
<xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String name, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Returns the list of BusinessRelationshipModel.Returns the context of this offer condition.Returns the context chronology of this offer condition.Returns the list ofCounterDescriptionModel.Returns the target offer code of this offer condition.Gets the list of counters that are shared by the offer.Gets the list of parameters that are shared by the offer.Gets the list of tier table instances that are shared by the offer.Gets the list of translation instances that are shared by the offer.intReturns the order maximum of this offer condition.intReturns the order minimum of this offer condition.intReturns the order step of this offer condition.Returns the reference of this offer condition in the database.Returns the sub code of this offerCondition.booleanReturns the optional order flag of this offer condition.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetContext(OfferConditionContextModel context) Sets the offer context of this offer condition.voidsetOfferCode(String offerCode) Sets the target offer code of this offer condition.voidsetOptionalOrder(boolean optionalOrder) Sets the optional order flag of this offer condition.voidsetOrderMaximum(int orderMaximum) Sets the order maximum of this offer condition.voidsetOrderMinimum(int orderMinimum) Sets the order minimum of this offer condition.voidsetOrderStep(int orderStep) Sets the order step of this offer condition.voidsetParentOffer(OfferModel parentOffer) voidsetReference(String reference) Sets the reference of this offer condition.voidsetSubCode(String code) Sets the sub code for this offerCondition.
-
Constructor Details
-
OfferConditionModel
public OfferConditionModel()Builds an empty OfferConditionModel.
-
-
Method Details
-
getSubCode
Returns the sub code of this offerCondition.- Returns:
- This offerCondition sub code.
- See Also:
-
setSubCode
Sets the sub code for this offerCondition.- Parameters:
code-- See Also:
-
getOfferCode
Returns the target offer code of this offer condition.- Returns:
- This offer condition target offer code.
- See Also:
-
setOfferCode
Sets the target offer code of this offer condition.- Parameters:
offerCode-- See Also:
-
getReference
Returns the reference of this offer condition in the database.- Returns:
- This offer condition reference.
- See Also:
-
setReference
Sets the reference of this offer condition.- Parameters:
reference-- See Also:
-
isOptionalOrder
public boolean isOptionalOrder()Returns the optional order flag of this offer condition.- Returns:
- optional order or not.
- See Also:
-
setOptionalOrder
public void setOptionalOrder(boolean optionalOrder) Sets the optional order flag of this offer condition.- Parameters:
optionalOrder-- See Also:
-
getOrderMinimum
public int getOrderMinimum()Returns the order minimum of this offer condition.- Returns:
- This offer condition order minimum.
- See Also:
-
setOrderMinimum
public void setOrderMinimum(int orderMinimum) Sets the order minimum of this offer condition.- Parameters:
orderMinimum-- See Also:
-
getOrderMaximum
public int getOrderMaximum()Returns the order maximum of this offer condition.- Returns:
- This offer condition order maximum.
- See Also:
-
setOrderMaximum
public void setOrderMaximum(int orderMaximum) Sets the order maximum of this offer condition.- Parameters:
orderMaximum-- See Also:
-
getOrderStep
public int getOrderStep()Returns the order step of this offer condition.- Returns:
- This offer condition order step.
- See Also:
-
setOrderStep
public void setOrderStep(int orderStep) Sets the order step of this offer condition.- Parameters:
orderStep-- See Also:
-
getChargeConditions
Returns the list of BusinessRelationshipModel.- Returns:
- the list of
ChargeConditionModelthat represents the associated business relationships.
-
getCounterDescriptions
Returns the list ofCounterDescriptionModel.- Returns:
- the list of the associated counters.
-
getContextChronology
Returns the context chronology of this offer condition.- Returns:
- the
contextin a Chronology.
-
setContext
Sets the offer context of this offer condition.- Parameters:
context- the context of this offer condition.
-
getContext
Returns the context of this offer condition.- Returns:
- the context of this offer condition.
-
setParentOffer
-
getParentOffer
-
getOfferContextCounters
Gets the list of counters that are shared by the offer.- Returns:
- the list of offer
counters.
-
getOfferContextParameters
Gets the list of parameters that are shared by the offer. it firstly looks in the edition context and if null, looks in the context chronology at the specified date.- Parameters:
date- the date to look in the chronology.- Returns:
- the list of offer
parameters.
-
getOfferContextTranslationInstances
Gets the list of translation instances that are shared by the offer. it firstly looks in the edition context and if null, looks in the context chronology at the specified date.- Parameters:
date- the date to look in the chronology.- Returns:
- the list of offer
instances.
-
getOfferContextTierTableInstances
Gets the list of tier table instances that are shared by the offer. it firstly looks in the edition context and if null, looks in the context chronology at the specified date.- Parameters:
date- the date to look in the chronology.- Returns:
- the list of offer
instances.
-
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:
name- 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
-