Package com.highdeal.pnr.hci
Class RateModel
java.lang.Object
com.highdeal.pnr.hci.RateModel
- All Implemented Interfaces:
IXMLMarshallable,XMLMarshallable,ContextualNode
- Direct Known Subclasses:
AccountEventRefillModel,OneShotRateModel,com.highdeal.refilllogic.hci.RefillRecurringRateModel,UsageRateModel
This class is the root class for the different
rates classes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.booleanReturns true if the rate is valid.Gets the description of the rate.getName()Gets the name of the rate.Gets the parent node.Gets the contained rate component.Gets the inherited context.voidmarshal(XMLOutputter output) Deprecated.voidmarshalAttributes(XMLOutputter output) Gives an XML representation of the attributes of an object.voidmarshalChildren(XMLOutputter output) Gives an XML representation of the child objects of an object.voidremove()Removes the contained rate component.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetDescription(String description) Sets the description of the rate.voidSets the name of the rate.voidsetParent(ContextualNode node) Sets the parent.voidsetRateComponent(RateComponentModel rateComponent) Sets the contained rate component.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.highdeal.pnr.hci.ContextualNode
getContext
-
Constructor Details
-
RateModel
public RateModel()
-
-
Method Details
-
getName
Gets the name of the rate.- Returns:
- the name of the rate.
-
setName
Sets the name of the rate.- Parameters:
name- the name of the rate.
-
getDescription
Gets the description of the rate.- Returns:
- the description of the rate.
-
setDescription
Sets the description of the rate.- Parameters:
description- the description of the rate.
-
getRateComponent
Gets the contained rate component.- Returns:
- the contained rate component.
-
setRateComponent
Sets the contained rate component.- Parameters:
rateComponent- the contained rate component.
-
remove
public void remove()Removes the contained rate component. (This is equivalent tosetRateComponent(null).) -
setParent
Sets the parent.- Specified by:
setParentin interfaceContextualNode- Parameters:
node- the parent.
-
getParent
Gets the parent node.- Returns:
- the parent node.
-
inheritedContext
Gets the inherited context.- Specified by:
inheritedContextin interfaceContextualNode- Returns:
- the inherited context.
-
checkValidity
public boolean checkValidity()Returns true if the rate is valid. Rate is valid if all the following conditions are met:- The name is not null or empty.
- The rate component is not null and is valid.
- Returns:
- true if the rate is valid, false otherwise.
-
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
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
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:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Deprecated.Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceIXMLMarshallable- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-
marshalAttributes
Description copied from interface:IXMLMarshallableGives an XML representation of the attributes of an object.- Specified by:
marshalAttributesin interfaceIXMLMarshallable- Parameters:
output- TheXML outputto marshal the object attributes into
-
marshalChildren
Description copied from interface:IXMLMarshallableGives an XML representation of the child objects of an object.- Specified by:
marshalChildrenin interfaceIXMLMarshallable- Parameters:
output- TheXML outputto marshal the child objects into
-