不推荐使用的Hibernate.createClob(Reader reader,int length)的替代品是什么

Ash*_*raf 4 hibernate clob deprecated

似乎Hibernate.createClob(Reader reader, int length)在版本3.6.x中已弃用.它建议使用Use LobHelper.createClob(Reader, long)代替.

但是LobHelper接口不是一个类.

有替代品 static method Hibernate.createClob(Reader reader, int length)吗?

小智 5

我正在使用该类的createBlob(bytes []).我创建了一个新类和以下方法

    public static Blob createBlob(byte[] bytes) {
       return NonContextualLobCreator.INSTANCE.wrap(NonContextualLobCreator.INSTANCE.createBlob(bytes));
    }
Run Code Online (Sandbox Code Playgroud)