Code example for PreparedStatement

Methods: setBigDecimal

0
			bigDecimal.setScale(0, BigDecimal.ROUND_UNNECESSARY).unscaledValue();
	} 
 
	public void set(PreparedStatement st, Object value, int index)
	throws HibernateException, SQLException { 
		st.setBigDecimal( index, new BigDecimal( (BigInteger) value ) );
	} 
 
	public int sqlType() { 
		return Types.NUMERIC;
	} 
 
	public String toString(Object value) throws HibernateException {
		return value.toString();
	} 
 
	public Class getReturnedClass() {
		return BigInteger.class;
	} 
 
	public boolean isEqual(Object x, Object y) {