Class BigDecimalRoundingAdapter
java.lang.Object
jakarta.xml.bind.annotation.adapters.XmlAdapter<String,BigDecimal>
org.broadleafcommerce.common.util.xml.BigDecimalRoundingAdapter
public class BigDecimalRoundingAdapter
extends jakarta.xml.bind.annotation.adapters.XmlAdapter<String,BigDecimal>
This class allows us to round Big Decimals to 2 decimal places, generally for
marshalling purposes. This is to be used with
javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters
.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BigDecimalRoundingAdapter
public BigDecimalRoundingAdapter()
-
-
Method Details
-
unmarshal
- Specified by:
unmarshal
in classjakarta.xml.bind.annotation.adapters.XmlAdapter<String,
BigDecimal> - Throws:
Exception
-
marshal
- Specified by:
marshal
in classjakarta.xml.bind.annotation.adapters.XmlAdapter<String,
BigDecimal> - Throws:
Exception
-