org.torweg.pulse.util.xml.bind
Class CurrencyXmlAdapter
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.util.Currency>
org.torweg.pulse.util.xml.bind.CurrencyXmlAdapter
public class CurrencyXmlAdapter
- extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.util.Currency>
an adapter for marshaling and unmarshaling a Currency using the
ISO 4217 currency code (
@XmlJavaTypeAdapter(CurrencyXmlAdapter.class) ).
- Version:
- $Revision: 1426 $
- Author:
- Daniel Dietz
|
Method Summary |
java.lang.String |
marshal(java.util.Currency currency)
marshals the currency to its ISO 4217 code. |
java.util.Currency |
unmarshal(java.lang.String currencyCode)
unmarshals the currecy from its ISO 4217 code. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CurrencyXmlAdapter
public CurrencyXmlAdapter()
marshal
public java.lang.String marshal(java.util.Currency currency)
- marshals the currency to its ISO 4217 code.
- Specified by:
marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.util.Currency>
- Parameters:
currency - the Currency
- Returns:
- the currency-code
- See Also:
XmlAdapter.marshal(java.lang.Object)
unmarshal
public java.util.Currency unmarshal(java.lang.String currencyCode)
- unmarshals the currecy from its ISO 4217 code.
- Specified by:
unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.util.Currency>
- Parameters:
currencyCode - the currency code
- Returns:
- the
Currency - See Also:
XmlAdapter.unmarshal(java.lang.Object)