什么是不推荐使用的Hibernate.createClob(Reader reader,int length) [英] What is the alternate for deprecated Hibernate.createClob(Reader reader, int length)
问题描述
Hibernate.createClob(Reader reader,int length)
在版本3.6.x中已弃用它建议使用Use
LobHelper.createClob(Reader,long)
。 但 LobHelper
是一个接口不是类。
是否存在任何替代的静态方法Hibernate.createClob(Reader reader,int length)
?
我正在使用该类的createBlob(bytes [])。我创建了一个新的类和下面的方法:
pre $ public static Blob createBlob(byte [] bytes){
return NonContextualLobCreator .INSTANCE.wrap(NonContextualLobCreator.INSTANCE.createBlob(字节));
}
Seems like Hibernate.createClob(Reader reader, int length)
is deprecated in version 3.6.x
And it suggests to use Use LobHelper.createClob(Reader, long)
instead.
But LobHelper
is an interface not a class.
Is there any alternate for static method Hibernate.createClob(Reader reader, int length)
?
I was using the createBlob(bytes[]) from that class. I created a new class and the following method
public static Blob createBlob(byte[] bytes) {
return NonContextualLobCreator.INSTANCE.wrap(NonContextualLobCreator.INSTANCE.createBlob(bytes));
}
这篇关于什么是不推荐使用的Hibernate.createClob(Reader reader,int length)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!