SAP CC 1.0
API 4.2 (Core)

com.highdeal.pnr.hci
Class ProrataModel

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

public class ProrataModel
extends java.lang.Object
implements XMLMarshallable

This class represents a prorata.


Field Summary
static int DAYS
          Time unit in days.
static int HOURS
          Time unit in hours.
static int MINUTES
          Time unit in minutes.
static int ROUND_DOWN
          Rounding down mode.
static int ROUND_NEAREST
          Rounding to nearest mode.
static int ROUND_UP
          Rounding up mode.
static int SECONDS
          Time unit in seconds.
 
Constructor Summary
ProrataModel()
          Builds an empty ProrataModel.
ProrataModel(int unit, java.math.BigDecimal step, int mode, java.math.BigDecimal fraction, boolean fractionDefined)
          Builds a ProrataModel.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the objects, the child represents the marshallable object to be added into the content tree.
 java.math.BigDecimal getFraction()
          Gets the fraction.
 int getRoundingMode()
          Gets the rounding mode.
 java.math.BigDecimal getRoundingStep()
          Gets the rounding step.
 int getTimeUnit()
          Gets the time unit.
 boolean isFractionDefined()
          Tests if the fraction is defined.
 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 setFraction(java.math.BigDecimal fraction)
          Sets the fraction.
 void setFractionDefined(boolean defined)
          Sets the fraction defined.
 void setRoundingMode(int mode)
          Sets the rounding mode.
 void setRoundingStep(java.math.BigDecimal step)
          Sets the rounding step.
 void setTimeUnit(int unit)
          Sets the time unit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SECONDS

public static final int SECONDS
Time unit in seconds.

See Also:
Constant Field Values

MINUTES

public static final int MINUTES
Time unit in minutes.

See Also:
Constant Field Values

HOURS

public static final int HOURS
Time unit in hours.

See Also:
Constant Field Values

DAYS

public static final int DAYS
Time unit in days.

See Also:
Constant Field Values

ROUND_UP

public static final int ROUND_UP
Rounding up mode.

See Also:
Constant Field Values

ROUND_DOWN

public static final int ROUND_DOWN
Rounding down mode.

See Also:
Constant Field Values

ROUND_NEAREST

public static final int ROUND_NEAREST
Rounding to nearest mode.

See Also:
Constant Field Values
Constructor Detail

ProrataModel

public ProrataModel()
Builds an empty ProrataModel.


ProrataModel

public ProrataModel(int unit,
                    java.math.BigDecimal step,
                    int mode,
                    java.math.BigDecimal fraction,
                    boolean fractionDefined)
Builds a ProrataModel.

Parameters:
unit - the time unit, see setTimeUnit.
step - the rounding step.
mode - the rounding mode, see setRoundingMode.
fraction - the fraction.
fractionDefined - set the fraction defined.
Method Detail

setTimeUnit

public void setTimeUnit(int unit)
Sets the time unit. Allowed values are :

Parameters:
unit - the time unit.

getTimeUnit

public int getTimeUnit()
Gets the time unit. Returned values are :

Returns:
the time unit.

setRoundingStep

public void setRoundingStep(java.math.BigDecimal step)
Sets the rounding step.

Parameters:
step - the rounding step.

getRoundingStep

public java.math.BigDecimal getRoundingStep()
Gets the rounding step.

Returns:
the rounding step.

setRoundingMode

public void setRoundingMode(int mode)
Sets the rounding mode. Allowed values are :

Parameters:
mode - the rounding mode.

getRoundingMode

public int getRoundingMode()
Gets the rounding mode. Returned values are :

Returns:
the rounding mode.

setFraction

public void setFraction(java.math.BigDecimal fraction)
Sets the fraction.

Parameters:
fraction - the fraction.

getFraction

public java.math.BigDecimal getFraction()
Gets the fraction.

Returns:
the fraction.

setFractionDefined

public void setFractionDefined(boolean defined)
Sets the fraction defined.

Parameters:
defined - the fraction defined.

isFractionDefined

public boolean isFractionDefined()
Tests if the fraction is defined.

Returns:
true if the fraction is defined, false otherwise.

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
Parameters:
atts - the XML attributes of the current tag.

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.

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the objects, the child represents the marshallable object to be added into the content tree.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - the name of tag for the child.
child - the child to be added.

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
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.