public class AmountTransformer extends Object implements CreateEntityTransformer<Amount>
nullToAmount
is true; also converts any Number/Amount.total value to Amount
and sets it in the Amount.setTotal(Double)
(default else if amountPropertyField
is specified then that is set)Constructor and Description |
---|
AmountTransformer() |
Modifier and Type | Method and Description |
---|---|
String |
getAmountPropertyField()
If not null will set the property field in
Amount instead of setting total (by default) |
boolean |
isNullToAmount()
Convert a null input to an
Amount object if true |
void |
setAmountPropertyField(String amountPropertyField)
If not null will set the property field in
Amount instead of setting total (by default) |
void |
setNullToAmount(boolean nullToAmount)
Convert a null input to an
Amount object if true |
Object |
transform(Object input) |
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public boolean isNullToAmount()
Amount
object if truepublic void setNullToAmount(boolean nullToAmount)
Amount
object if truepublic String getAmountPropertyField()
Amount
instead of setting total (by default)Copyright © 2018. All rights reserved.