public final void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { try { if ( value == null ) { LOG.tracev("Binding null to parameter: {0}", index); st.setNull( index, sqlType() ); } else { if (LOG.isTraceEnabled()) LOG.tracev("Binding '{0}' to parameter: {1}", toString(value), index); set( st, value, index ); } } catch ( RuntimeException re ) { LOG.unableToBindValueToParameter( nullSafeToString( value ), index, re.getMessage() ); throw re; } catch ( SQLException se ) { LOG.unableToBindValueToParameter( nullSafeToString( value ), index, se.getMessage() ); throw se; } }
public final void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { try { if ( value == null ) { LOG.tracev("Binding null to parameter: {0}", index); st.setNull( index, sqlType() ); } else { if (LOG.isTraceEnabled()) LOG.tracev("Binding '{0}' to parameter: {1}", toString(value), index); set( st, value, index ); } } catch ( RuntimeException re ) { LOG.unableToBindValueToParameter( nullSafeToString( value ), index, re.getMessage() ); throw re; } catch ( SQLException se ) { LOG.unableToBindValueToParameter( nullSafeToString( value ), index, se.getMessage() ); throw se; } }