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 Details

  • 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

      public void setProrata(ProrataModel p)
      Sets the prorata model.
      Parameters:
      p - The prorata model
    • getProrata

      public ProrataModel 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:
      checkValidity in class com.highdeal.refilllogic.hci.RefillRecurringRateModel
      Returns:
      true if the rate is valid, false otherwise
    • getContext

      public RatingContextDescription getContext(ContextualNode child)
      Gets the context for the specified child.
      Specified by:
      getContext in interface ContextualNode
      Overrides:
      getContext in class com.highdeal.refilllogic.hci.RefillRecurringRateModel
      Parameters:
      child - The child node
      Returns:
      The context
    • 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
      Overrides:
      setAttributes in class com.highdeal.refilllogic.hci.RefillRecurringRateModel
      Parameters:
      atts - The XML attributes of the current element