@Override @SuppressWarnings("unchecked") public <X> ValueBinder<X> getBinder(JavaTypeDescriptor<X> javaTypeDescriptor) { // Get the binder for the intermediate type representation final ValueBinder realBinder = delegate.getBinder( intermediateJavaTypeDescriptor ); return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override @SuppressWarnings("unchecked") protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { final Object convertedValue; try { convertedValue = converter.convertToDatabaseColumn( value ); } catch (PersistenceException pe) { throw pe; } catch (RuntimeException re) { throw new PersistenceException( "Error attempting to apply AttributeConverter", re ); } realBinder.bind( st, convertedValue, index, options ); } }; }
public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>(javaTypeDescriptor, (SqlTypeDescriptor) this) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { if (cal == null) { st.setDate(index, javaTypeDescriptor.unwrap(value, Date.class, options)); } else { st.setDate(index, javaTypeDescriptor.unwrap(value, Date.class, options), cal); } } }; }
public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setObject( index, javaTypeDescriptor.unwrap( value, UUID.class, options ), getSqlType() ); } }; }
public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setBoolean( index, javaTypeDescriptor.unwrap( value, Boolean.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setTime( index, javaTypeDescriptor.unwrap( value, Time.class, options ) ); } }; }
public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setBytes( index, javaTypeDescriptor.unwrap( value, byte[].class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(JavaTypeDescriptor<X> javaTypeDescriptor) { if ( Serializable.class.isAssignableFrom( javaTypeDescriptor.getJavaTypeClass() ) ) { return VarbinaryTypeDescriptor.INSTANCE.getBinder( javaTypeDescriptor ); } return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setObject( index, value, jdbcTypeCode ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setLong( index, javaTypeDescriptor.unwrap( value, Long.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setTimestamp( index, javaTypeDescriptor.unwrap( value, Timestamp.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setDouble( index, javaTypeDescriptor.unwrap( value, Double.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setShort( index, javaTypeDescriptor.unwrap( value, Short.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setBigDecimal( index, javaTypeDescriptor.unwrap( value, BigDecimal.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setFloat( index, javaTypeDescriptor.unwrap( value, Float.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setInt( index, javaTypeDescriptor.unwrap( value, Integer.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setString( index, javaTypeDescriptor.unwrap( value, String.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setDate( index, javaTypeDescriptor.unwrap( value, Date.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setNString( index, javaTypeDescriptor.unwrap( value, String.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setBoolean( index, javaTypeDescriptor.unwrap( value, Boolean.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>( javaTypeDescriptor, this ) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setByte( index, javaTypeDescriptor.unwrap( value, Byte.class, options ) ); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>(javaTypeDescriptor, this) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { AbstractArrayTypeDescriptor<Object> abstractArrayTypeDescriptor = (AbstractArrayTypeDescriptor<Object>) javaTypeDescriptor; st.setArray(index, st.getConnection().createArrayOf( abstractArrayTypeDescriptor.getSqlArrayType(), abstractArrayTypeDescriptor.unwrap(value, Object[].class, options) )); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>(javaTypeDescriptor, this) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setObject(index, javaTypeDescriptor.unwrap(value, JsonNode.class, options), getSqlType()); } }; }
@Override public <X> ValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>(javaTypeDescriptor, this) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setString(index, javaTypeDescriptor.unwrap(value, String.class, options)); } }; }
public <X> ValueBinder<X> getBinder( final JavaTypeDescriptor<X> javaTypeDescriptor) { return new BasicBinder<X>(javaTypeDescriptor, this) { @Override protected void doBind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException { st.setInt(index, javaTypeDescriptor.unwrap(value, Integer.class, options)); } }; }
@Override public <X> ValueBinder<X> getBinder(JavaTypeDescriptor<X> javaTypeDescriptor) { return getClobBinder( javaTypeDescriptor ); }
@Override public <X> ValueBinder<X> getBinder(JavaTypeDescriptor<X> javaTypeDescriptor) { return getNClobBinder( javaTypeDescriptor ); }
@Override public <X> ValueBinder<X> getBinder(JavaTypeDescriptor<X> arg0) { return null; }
/** * Get the binder (setting JDBC in-going parameter values) capable of handling values of the type described by the * passed descriptor. * * @param javaTypeDescriptor The descriptor describing the types of Java values to be bound * * @return The appropriate binder. */ public <X> ValueBinder<X> getBinder(JavaTypeDescriptor<X> javaTypeDescriptor);