@Override public SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) { SqlTypeDescriptor descriptor; switch ( sqlCode ) { case Types.BLOB: { // Force BLOB binding. Otherwise, byte[] fields annotated // with @Lob will attempt to use // BlobTypeDescriptor.PRIMITIVE_ARRAY_BINDING. Since the // dialect uses oid for Blobs, byte arrays cannot be used. descriptor = BlobTypeDescriptor.BLOB_BINDING; break; } case Types.CLOB: { descriptor = ClobTypeDescriptor.CLOB_BINDING; break; } default: { descriptor = super.getSqlTypeDescriptorOverride( sqlCode ); break; } } return descriptor; }
@Override protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) { switch (sqlCode) { case Types.BLOB: return BlobTypeDescriptor.PRIMITIVE_ARRAY_BINDING; case Types.CLOB: // Some Sybase drivers cannot support getClob. See HHH-7889 return ClobTypeDescriptor.STREAM_BINDING_EXTRACTING; default: return super.getSqlTypeDescriptorOverride( sqlCode ); } }
public MaterializedBlobType() { super( BlobTypeDescriptor.DEFAULT, PrimitiveByteArrayTypeDescriptor.INSTANCE ); }
public WrappedMaterializedBlobType() { super( BlobTypeDescriptor.DEFAULT, ByteArrayTypeDescriptor.INSTANCE ); }
public SerializableToBlobType() { super( BlobTypeDescriptor.DEFAULT, new SerializableTypeDescriptor( Serializable.class ) ); }
public JsonBlobType() { super(BlobTypeDescriptor.DEFAULT, new JsonTypeDescriptor(Serializable.class)); }
/** * Constructor used by Hibernate: fetches config-time LobHandler and * config-time JTA TransactionManager from LocalSessionFactoryBean. * */ public BufferedContentBlob() { super(BlobTypeDescriptor.STREAM_BINDING, BufferedContentTypeDescriptor.INSTANCE); }