Package com.highdeal.pnr.hci
Class CurrencyModel
java.lang.Object
com.highdeal.pnr.hci.CurrencyModel
- All Implemented Interfaces:
XMLMarshallable
This class represents a currency defined in SAP CC, made up with the following attributes:.
- code: The currency unique code.
- precision: The currency precision.
- name: The currency name.
- ISOCode: The code of the associated ISO 4217 currency.
- precision: The currency precision.
- name: The currency name.
- ISOCode: The code of the associated ISO 4217 currency.
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="currency">
<xs:complexType>
<xs:attribute name="code" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="precision" use="required">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="999"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="name" use="optional" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="ISOCode" use="optional" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
-
Field Summary
Fields -
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.getCode()Gets this currency code.Gets this currency ISO 4217 code.getName()Gets this currency name.intGets this currency precision.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets code to this currency.voidsetISOCode(String ISOCode) Sets ISO 4217 code to this currency.voidSets name to this currency.voidsetPrecision(int precision) Sets precision to this currency.
-
Field Details
-
MODEL_NAME
- See Also:
-
-
Constructor Details
-
CurrencyModel
public CurrencyModel()
-
-
Method Details
-
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
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-
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
-
getCode
Gets this currency code.- Returns:
- the code of the currency.
-
setCode
Sets code to this currency.- Parameters:
code- the code of the currency.
-
getPrecision
public int getPrecision()Gets this currency precision.- Returns:
- the precision of the currency.
-
setPrecision
public void setPrecision(int precision) Sets precision to this currency.- Parameters:
precision- the precision of the currency.
-
getName
Gets this currency name.- Returns:
- the name of the currency.
-
setName
Sets name to this currency.- Parameters:
name- the name of the currency.
-
getISOCode
Gets this currency ISO 4217 code.- Returns:
- the ISO 4217 code of the currency.
-
setISOCode
Sets ISO 4217 code to this currency.- Parameters:
ISOCode- the ISO 4217 code of the currency.
-