SAP CC 1.0
API 4.2 (Core)

com.highdeal.pnr.hci
Class RecurringRateModel

java.lang.Object
  extended by com.highdeal.pnr.hci.RateModel
      extended by com.highdeal.pnr.hci.RecurringRateModel
All Implemented Interfaces:
XMLMarshallable, ContextualNode

public class RecurringRateModel
extends RateModel

This class represents a recurring rate.


XML Schema Fragment
<xs:element name="recurring">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="component" minOccurs="0" maxOccurs="1"/>
     </xs:sequence>
     <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="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>

Constructor Summary
RecurringRateModel()
          Creates a RecurringRateModel with Birthday Date set to default property of agreement creation date.
 
Method Summary
 boolean checkValidity()
          Returns true if the recurring rate is valid.
 java.lang.String getBirthdayPropertyName()
          Gets the birthday property name.
 RatingContextDescription getContext(ContextualNode child)
          Gets the context for the specified child.
 RecurringDateModel getFrequency()
          Gets the frequency.
 int getPrepaidPeriods()
          Gets the prepaid periods count.
 ProrataModel getProrata()
          Gets the prorata model.
 boolean isPrepaid()
          Tests if the recurring rate is prepaid.
 boolean isPropagatedEvent()
          Tests if the recurring rate is propagated event.
 boolean isProratable()
          Tests if the recurring rate is proratable.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, and of its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the tag beeing processed.
 void setBirthdayPropertyName(java.lang.String propertyName)
          Sets birthday property name.
 void setFrequency(RecurringDateModel frequency)
          Sets the frequency.
 void setPrepaid(boolean prepaid)
          Sets the prepaid flag.
 void setPrepaidPeriods(int periods)
          Sets the prepaid periods count.
 void setPropagatedEvent(boolean propagatedEvent)
          Sets the propagated event flag.
 void setProrata(ProrataModel p)
          Sets the prorata model.
 void setProratable(boolean proratable)
          Sets the proratable flag.
 
Methods inherited from class com.highdeal.pnr.hci.RateModel
addCharacterData, addChild, getDescription, getName, getParent, getRateComponent, inheritedContext, remove, setDescription, setName, setParent, setRateComponent, SqueezeIn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecurringRateModel

public RecurringRateModel()
Creates a RecurringRateModel with Birthday Date set to default property of agreement creation date.

Method Detail

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.

setFrequency

public void setFrequency(RecurringDateModel frequency)
Sets the frequency.

Parameters:
frequency - the frequency.

getFrequency

public RecurringDateModel getFrequency()
Gets the frequency.

Returns:
the frequency.

setPropagatedEvent

public void setPropagatedEvent(boolean propagatedEvent)
Sets the propagated event flag.

Parameters:
propagatedEvent - true if propagated event, false otherwise.

isPropagatedEvent

public boolean isPropagatedEvent()
Tests if the recurring rate is propagated event.

Returns:
true if propagated event, false otherwise.

getBirthdayPropertyName

public java.lang.String getBirthdayPropertyName()
Gets the birthday property name.

Returns:
the property name.

setBirthdayPropertyName

public void setBirthdayPropertyName(java.lang.String propertyName)
Sets birthday property name.

Parameters:
propertyName - the property name.

checkValidity

public boolean checkValidity()
Returns true if the recurring rate is valid. Recurring rate is valid if all the following conditions are met:

Overrides:
checkValidity in class RateModel
Returns:
true if the rate is valid, false otherwise.

getContext

public RatingContextDescription getContext(ContextualNode child)
Gets the context for the specified child.

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 tag beeing processed.

Specified by:
setAttributes in interface XMLMarshallable
Overrides:
setAttributes in class RateModel
Parameters:
atts - the XML attributes of the current tag.

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, and of its children.

Specified by:
marshal in interface XMLMarshallable
Overrides:
marshal in class RateModel
Parameters:
output - the XML output to marshall the object into.

SAP CC 1.0
API 4.2 (Core)


API Reference - July 2009

SAP Convergent Charging 1.0 (build R4.2.1.35.0.0)
CONVERGENT CHARGING 4.2

(c) Copyright 2009 SAP AG. All rights reserved.