Examples of BinaryStream


Examples of org.hibernate.type.descriptor.BinaryStream

  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 {
        if ( options.useStreamForLobBinding() ) {
          final BinaryStream binaryStream = javaTypeDescriptor.unwrap( value, BinaryStream.class, options );
          st.setBinaryStream( index, binaryStream.getInputStream(), binaryStream.getLength() );
        }
        else {
          st.setBlob( index, javaTypeDescriptor.unwrap( value, Blob.class, options ) );
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.