Code example for BigDecimal

Methods: floatValue

0
		SQLQuery query = session.createSQLQuery(sql.toString());
		query.setParameter("conta", conta.getConta());
		query.setParameter("data", data);
		BigDecimal saldo = (BigDecimal) query.uniqueResult();
		if (saldo != null) {
			return saldo.floatValue();
		} 
		return 0f; 
	} 
 
}