Java 类org.hibernate.type.descriptor.sql.BlobTypeDescriptor 实例源码

项目:lams    文件:PostgreSQL81Dialect.java   
@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;
}
项目:lams    文件:SybaseDialect.java   
@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 );
    }
}
项目:lams    文件:MaterializedBlobType.java   
public MaterializedBlobType() {
    super( BlobTypeDescriptor.DEFAULT, PrimitiveByteArrayTypeDescriptor.INSTANCE );
}
项目:lams    文件:WrappedMaterializedBlobType.java   
public WrappedMaterializedBlobType() {
    super( BlobTypeDescriptor.DEFAULT, ByteArrayTypeDescriptor.INSTANCE );
}
项目:lams    文件:SerializableToBlobType.java   
public SerializableToBlobType() {
    super( BlobTypeDescriptor.DEFAULT, new SerializableTypeDescriptor( Serializable.class ) );
}
项目:perecoder    文件:JsonBlobType.java   
public JsonBlobType() {
    super(BlobTypeDescriptor.DEFAULT, new JsonTypeDescriptor(Serializable.class));
}
项目:cosmo    文件:BufferedContentBlob.java   
/**
 * Constructor used by Hibernate: fetches config-time LobHandler and
 * config-time JTA TransactionManager from LocalSessionFactoryBean.
 *
 */
public BufferedContentBlob() {
    super(BlobTypeDescriptor.STREAM_BINDING, BufferedContentTypeDescriptor.INSTANCE);
}