Package com.highdeal.pnr.hci
Class RecurringRateModel
java.lang.Object
com.highdeal.pnr.hci.RateModel
com.highdeal.refilllogic.hci.RefillRecurringRateModel
com.highdeal.pnr.hci.RecurringRateModel
- All Implemented Interfaces:
IXMLMarshallable,XMLMarshallable,ContextualNode
public class RecurringRateModel
extends com.highdeal.refilllogic.hci.RefillRecurringRateModel
This
Java class represents a recurring rate.XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="recurring">
<xs:complexType>
<xs:sequence>
<xs:element ref="component" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="calendarType" type="xs:string" default="gregorian"/>
<xs:attribute name="propagatedEvent" type="xs:boolean" default="false"/>
<xs:attribute name="frequency" type="xs:string"/>
<xs:attribute name="prepaid" type="xs:boolean" default="false"/>
<xs:attribute name="prepaidPeriods" type="xs:decimal"/>
<xs:attribute name="prorata" type="xs:boolean" default="false"/>
<xs:attribute name="timeUnit" type="xs:decimal"/>
<xs:attribute name="roundingMode" type="xs:decimal"/>
<xs:attribute name="roundingStep" type="xs:decimal"/>
<xs:attribute name="fraction" type="xs:decimal"/>
<xs:attribute name="splitRefund" type="xs:boolean" default="false"/>
<xs:attribute name="birthdayPropertyName" type="xs:string" default="default.agreement_creation_date"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
</xs:element>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a RecurringRateModel with Birthday Date set to default property of agreement creation date. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the recurring rate is valid.getContext(ContextualNode child) Gets the context for the specified child.intGets the prepaid periods count.Gets the prorata model.booleanTests if the recurring rate is prepaid.booleanTests if the recurring rate is proratable.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetPrepaid(boolean prepaid) Sets the prepaid flag.voidsetPrepaidPeriods(int periods) Sets the prepaid periods count.voidSets the prorata model.voidsetProratable(boolean proratable) Sets the proratable flag.Methods inherited from class com.highdeal.refilllogic.hci.RefillRecurringRateModel
getBirthdayPropertyName, getCalendarType, getFrequency, isPropagatedEvent, marshal, setBirthdayPropertyName, setCalendarType, setFrequency, setPropagatedEventMethods inherited from class com.highdeal.pnr.hci.RateModel
addCharacterData, addChild, getDescription, getName, getParent, getRateComponent, inheritedContext, marshalAttributes, marshalChildren, remove, setDescription, setName, setParent, setRateComponent
-
Field Details
-
TAG_NAME
The XML tag name of this data model: recurring.- See Also:
-
-
Constructor Details
-
RecurringRateModel
public RecurringRateModel()Creates a RecurringRateModel with Birthday Date set to default property of agreement creation date.
-
-
Method Details
-
setPrepaid
public void setPrepaid(boolean prepaid) Sets the prepaid flag.- Parameters:
prepaid- true if prepaid, false otherwise
-
isPrepaid
public boolean isPrepaid()Tests if the recurring rate is prepaid.- Returns:
- true if prepaid, false otherwise
-
getPrepaidPeriods
public int getPrepaidPeriods()Gets the prepaid periods count.- Returns:
- The prepaid periods count
-
setPrepaidPeriods
public void setPrepaidPeriods(int periods) Sets the prepaid periods count.- Parameters:
periods- The prepaid periods count
-
setProratable
public void setProratable(boolean proratable) Sets the proratable flag.- Parameters:
proratable- true if proratable, false otherwise
-
isProratable
public boolean isProratable()Tests if the recurring rate is proratable.- Returns:
- true if proratable, false otherwise
-
setProrata
Sets the prorata model.- Parameters:
p- The prorata model
-
getProrata
Gets the prorata model.- Returns:
- The prorata model
-
checkValidity
public boolean checkValidity()Returns true if the recurring rate is valid. Recurring rate is valid if all the following conditions are met:- The RateModel.checkValidity() returned true.
- Frequency is not null.
- Propagated event flag is set or proratable is not set or prorata is valid.
- Overrides:
checkValidityin classcom.highdeal.refilllogic.hci.RefillRecurringRateModel- Returns:
- true if the rate is valid, false otherwise
-
getContext
Gets the context for the specified child.- Specified by:
getContextin interfaceContextualNode- Overrides:
getContextin classcom.highdeal.refilllogic.hci.RefillRecurringRateModel- Parameters:
child- The child node- Returns:
- The context
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Overrides:
setAttributesin classcom.highdeal.refilllogic.hci.RefillRecurringRateModel- Parameters:
atts- TheXML attributesof the current element
-