public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { mutableType.set(st, value, index); }
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { //TODO: would be nice to handle proxy classes elegantly! Hibernate.STRING.set(st, ( (Class) value ).getName(), index); }
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { //TODO: would be nice to handle proxy classes elegantly! Hibernate.STRING.set(st, ( (Class) value ).getName(), index); }
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { Hibernate.STRING.set(st, ( (TimeZone) value ).getID(), index); }
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { Hibernate.STRING.set(st, value.toString(), index); }
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { Hibernate.STRING.set(st, value.toString(), index); }
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { Hibernate.STRING.set(st, ( (TimeZone) value ).getID(), index); }
/** * @see org.hibernate.type.NullableType#set(PreparedStatement, Object, int) */ public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { Object code; try { code = CURRENCY_GET_CODE.invoke(value, null); } catch (Exception e) { throw new HibernateException("Could not get Currency code", e); } Hibernate.STRING.set(st, code, index); }
/** * @see org.hibernate.type.NullableType#set(PreparedStatement, Object, int) */ public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { Object code; try { code = CURRENCY_GET_CODE.invoke(value, null); } catch (Exception e) { throw new HibernateException("Could not get Currency code", e); } Hibernate.STRING.set(st, code, index); }
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { Hibernate.BINARY.set(st, toBytes(value), index); }
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { Hibernate.BINARY.set(st, toBytes(value), index); }
public final void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { if (value==null) { if (IS_TRACE_ENABLED) { LogFactory.getLog( getClass() ).trace("binding null to parameter: " + index); } st.setNull( index, sqlType() ); } else { if (IS_TRACE_ENABLED) { LogFactory.getLog( getClass() ).trace("binding '" + toString(value) + "' to parameter: " + index); } set(st, value, index); } }
public void nullSafeSet( PreparedStatement st, Object value, int index ) throws HibernateException, SQLException { try { if ( value == null ) { st.setNull( index, type.sqlType() ); } else { Object identifier = identifierMethod.invoke( value, new Object[0] ); type.set( st, identifier, index ); } } catch ( Exception e ) { throw new HibernateException( "Exception while invoking identifierMethod '" + identifierMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e ); } }
public void nullSafeSet( PreparedStatement st, Object value, int index ) throws HibernateException, SQLException { try { if ( value == null ) { st.setNull( index, type.sqlType() ); } else { Object identifier = identifierMethod.invoke( value, new Object[0] ); type.set( st, identifier, index ); } } catch ( Exception e ) { throw new HibernateException( "Exception while invoking identifierMethod '" + identifierMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e ); } }
public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { try { if (value == null) { st.setNull(index, type.sqlType()); } else { Object identifier = identifierMethod.invoke(value, new Object[0]); type.set(st, identifier, index); } } catch (Exception e) { throw new HibernateException("Exception while invoking identifierMethod '" + identifierMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e); } }
@Override public void nullSafeSet( PreparedStatement st, Object value, int index ) throws HibernateException, SQLException { try { if ( value == null ) { st.setNull( index, type.sqlType() ); } else { Object identifier = identifierMethod.invoke( value, new Object[0] ); type.set( st, identifier, index ); } } catch ( Exception e ) { throw new HibernateException( "Exception while invoking identifierMethod '" + identifierMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e ); } }
public void nullSafeSet(PreparedStatement st, Object value, int index) throws SQLException { try { if (value == null) { st.setNull(index, type.sqlType()); } else { Object identifier = identifierMethod.invoke(value, new Object[0]); type.set(st, identifier, index); } } catch (Exception e) { throw new HibernateException( "Exception while invoking identifierMethod '" + identifierMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e); } }
public final void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException { try { if ( value == null ) { if ( IS_TRACE_ENABLED ) { log().trace( "binding null to parameter: " + index ); } st.setNull( index, sqlType() ); } else { if ( IS_TRACE_ENABLED ) { log().trace( "binding '" + toString( value ) + "' to parameter: " + index ); } set( st, value, index ); } } catch ( RuntimeException re ) { log().info( "could not bind value '" + toString( value ) + "' to parameter: " + index + "; " + re.getMessage() ); throw re; } catch ( SQLException se ) { log().info( "could not bind value '" + toString( value ) + "' to parameter: " + 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; } }
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; } }