Class MoneyUtil
java.lang.Object
com.aoindustries.aoserv.client.billing.MoneyUtil
Helper functions for
Money
.- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Money
null-safe getDto for Money.static Money
null-safe money conversion.static Money
static Money
getMoney
(Currency currency, BigDecimal value) null-safe money conversion.static Money
static Money
static void
writeMoney
(Money money, StreamableOutput out) static void
writeNullMoney
(Money money, StreamableOutput out)
-
Method Details
-
getDto
null-safe getDto for Money. -
getMoney
null-safe money conversion. -
getMoney
null-safe money conversion. -
getMoney
public static Money getMoney(ResultSet result, String currencyColumnLabel, String valueColumnLabel) throws SQLException Gets aMoney
type from two columns of aResultSet
. Supportsnull
. If value is non-null then currency must also be non-null.- Throws:
SQLException
-
writeMoney
- Throws:
IOException
-
writeNullMoney
- Throws:
IOException
-
readMoney
- Throws:
IOException
-
readNullMoney
- Throws:
IOException
-