public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { BigDecimal amt = StandardBasicTypes.BIG_DECIMAL.nullSafeGet( rs, names[0], session); Currency cur = StandardBasicTypes.CURRENCY.nullSafeGet( rs, names[1], session ); if ( amt == null ) return null; return new MonetaryAmount( amt, cur ); }
public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { BigDecimal amt = StandardBasicTypes.BIG_DECIMAL.nullSafeGet( rs, names[0], session); Currency cur = StandardBasicTypes.CURRENCY.nullSafeGet( rs, names[1], session ); if ( amt == null ) return null; return new MonetaryAmount( amt, cur ); }
@Override public Object nullSafeGet( ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { BigDecimal amt = StandardBasicTypes.BIG_DECIMAL.nullSafeGet( rs, names[0], session ); Currency cur = StandardBasicTypes.CURRENCY.nullSafeGet( rs, names[1], session ); if (amt==null) return null; return new MonetoryAmount(amt, cur); }
@Override public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { return new Percentage((BigDecimal) BIG_DECIMAL.nullSafeGet(rs, names, session, owner)); }
@Override public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException { BigDecimal amount = BigDecimalType.INSTANCE.nullSafeGet(rs, names[0], session); String currencyCode = StringType.INSTANCE.nullSafeGet(rs, names[1], session); return amount == null && currencyCode == null ? null : Money.of(CurrencyUnit.getInstance(currencyCode), amount); }