Java Code Examples for org.joda.money.Money#getAmount()

The following examples show how to use org.joda.money.Money#getAmount() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BigDecimalColumnMoneyMapper.java    From jadira with Apache License 2.0 5 votes vote down vote up
@Override
public BigDecimal toNonNullValue(Money value) {
	if (!currencyUnit.equals(value.getCurrencyUnit())) {
		throw new IllegalStateException("Expected currency " + currencyUnit.getCurrencyCode() + " but was " + value.getCurrencyUnit());
	}
    return value.getAmount();
}
 
Example 2
Source File: PersistentMoneyAmountAndCurrencyAsInteger.java    From jadira with Apache License 2.0 4 votes vote down vote up
@Override
protected Object[] toConvertedColumns(Money value) {

    return new Object[] { value.getCurrencyUnit(), value.getAmount() };
}
 
Example 3
Source File: PersistentMoneyAmountAndCurrency.java    From jadira with Apache License 2.0 4 votes vote down vote up
@Override
protected Object[] toConvertedColumns(Money value) {

    return new Object[] { value.getCurrencyUnit(), value.getAmount() };
}