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; 
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE