com.highdeal.pnr.hci
Class OfferConditionModel

java.lang.Object
  extended by com.highdeal.pnr.hci.OfferConditionModel
All Implemented Interfaces:
XMLMarshallable

public class OfferConditionModel
extends java.lang.Object
implements 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
OfferConditionModel()
          Builds an empty OfferConditionModel.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String name, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.util.Vector<ChargeConditionModel> getChargeConditions()
          Returns the list of BusinessRelationshipModel.
 OfferConditionContextModel getContext()
          Returns the context of this offer condition.
 ChronologyModel getContextChronology()
          Returns the context chronology of this offer condition.
 java.util.Vector<CounterDescriptionModel> getCounterDescriptions()
          Returns the list of CounterDescriptionModel.
 java.lang.String getOfferCode()
          Returns the target offer code of this offer condition.
 java.util.Vector<CounterDescriptionModel> getOfferContextCounters()
          Gets the list of counters that are shared by the offer.
 java.util.Vector<ParameterModel> getOfferContextParameters(java.util.Date date)
          Gets the list of parameters that are shared by the offer.
 java.util.Vector<TierTableInstanceModel> getOfferContextTierTableInstances(java.util.Date date)
          Gets the list of tier table instances that are shared by the offer.
 java.util.Vector<TranslationInstanceModel> getOfferContextTranslationInstances(java.util.Date date)
          Gets the list of translation instances that are shared by the offer.
 int getOrderMaximum()
          Returns the order maximum of this offer condition.
 int getOrderMinimum()
          Returns the order minimum of this offer condition.
 int getOrderStep()
          Returns the order step of this offer condition.
 OfferModel getParentOffer()
           
 java.lang.String getReference()
          Returns the reference of this offer condition in the database.
 java.lang.String getSubCode()
          Returns the sub code of this offerCondition.
 boolean isOptionalOrder()
          Returns the optional order flag of this offer condition.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setContext(OfferConditionContextModel context)
          Sets the offer context of this offer condition.
 void setOfferCode(java.lang.String offerCode)
          Sets the target offer code of this offer condition.
 void setOptionalOrder(boolean optionalOrder)
          Sets the optional order flag of this offer condition.
 void setOrderMaximum(int orderMaximum)
          Sets the order maximum of this offer condition.
 void setOrderMinimum(int orderMinimum)
          Sets the order minimum of this offer condition.
 void setOrderStep(int orderStep)
          Sets the order step of this offer condition.
 void setParentOffer(OfferModel parentOffer)
           
 void setReference(java.lang.String reference)
          Sets the reference of this offer condition.
 void setSubCode(java.lang.String code)
          Sets the sub code for this offerCondition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfferConditionModel

public OfferConditionModel()
Builds an empty OfferConditionModel.

Method Detail

getSubCode

public java.lang.String getSubCode()
Returns the sub code of this offerCondition.

Returns:
This offerCondition sub code.
See Also:
setSubCode(String)

setSubCode

public void setSubCode(java.lang.String code)
Sets the sub code for this offerCondition.

Parameters:
code -
See Also:
getSubCode()

getOfferCode

public java.lang.String getOfferCode()
Returns the target offer code of this offer condition.

Returns:
This offer condition target offer code.
See Also:
setOfferCode(String)

setOfferCode

public void setOfferCode(java.lang.String offerCode)
Sets the target offer code of this offer condition.

Parameters:
offerCode -
See Also:
getOfferCode()

getReference

public java.lang.String getReference()
Returns the reference of this offer condition in the database.

Returns:
This offer condition reference.
See Also:
setReference(String)

setReference

public void setReference(java.lang.String reference)
Sets the reference of this offer condition.

Parameters:
reference -
See Also:
getReference()

isOptionalOrder

public boolean isOptionalOrder()
Returns the optional order flag of this offer condition.

Returns:
optional order or not.
See Also:
setOptionalOrder(boolean)

setOptionalOrder

public void setOptionalOrder(boolean optionalOrder)
Sets the optional order flag of this offer condition.

Parameters:
optionalOrder -
See Also:
isOptionalOrder()

getOrderMinimum

public int getOrderMinimum()
Returns the order minimum of this offer condition.

Returns:
This offer condition order minimum.
See Also:
setOrderMinimum(int)

setOrderMinimum

public void setOrderMinimum(int orderMinimum)
Sets the order minimum of this offer condition.

Parameters:
orderMinimum -
See Also:
getOrderMinimum()

getOrderMaximum

public int getOrderMaximum()
Returns the order maximum of this offer condition.

Returns:
This offer condition order maximum.
See Also:
setOrderMaximum(int)

setOrderMaximum

public void setOrderMaximum(int orderMaximum)
Sets the order maximum of this offer condition.

Parameters:
orderMaximum -
See Also:
getOrderMaximum()

getOrderStep

public int getOrderStep()
Returns the order step of this offer condition.

Returns:
This offer condition order step.
See Also:
setOrderStep(int)

setOrderStep

public void setOrderStep(int orderStep)
Sets the order step of this offer condition.

Parameters:
orderStep -
See Also:
getOrderStep()

getChargeConditions

public java.util.Vector<ChargeConditionModel> getChargeConditions()
Returns the list of BusinessRelationshipModel.

Returns:
the list of ChargeConditionModel that represents the associated business relationships.

getCounterDescriptions

public java.util.Vector<CounterDescriptionModel> getCounterDescriptions()
Returns the list of CounterDescriptionModel.

Returns:
the list of the associated counters.

getContextChronology

public ChronologyModel getContextChronology()
Returns the context chronology of this offer condition.

Returns:
the context in a Chronology.

setContext

public void setContext(OfferConditionContextModel context)
Sets the offer context of this offer condition.

Parameters:
context - the context of this offer condition.

getContext

public OfferConditionContextModel getContext()
Returns the context of this offer condition.

Returns:
the context of this offer condition.

setParentOffer

public void setParentOffer(OfferModel parentOffer)

getParentOffer

public OfferModel getParentOffer()

getOfferContextCounters

public java.util.Vector<CounterDescriptionModel> getOfferContextCounters()
Gets the list of counters that are shared by the offer.

Returns:
the list of offer counters.

getOfferContextParameters

public java.util.Vector<ParameterModel> getOfferContextParameters(java.util.Date date)
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

public java.util.Vector<TranslationInstanceModel> getOfferContextTranslationInstances(java.util.Date date)
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

public java.util.Vector<TierTableInstanceModel> getOfferContextTierTableInstances(java.util.Date date)
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

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(java.lang.String name,
                     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:
name - 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

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

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)