Example usage for org.hibernate.engine.jdbc SerializableClobProxy getWrappedClob

List of usage examples for org.hibernate.engine.jdbc SerializableClobProxy getWrappedClob

Introduction

In this page you can find the example usage for org.hibernate.engine.jdbc SerializableClobProxy getWrappedClob.

Prototype

public Clob getWrappedClob() 

Source Link

Document

Access to the wrapped Clob reference

Usage

From source file:cognition.pipeline.data.helper.ClobHelper.java

License:Apache License

private String getString(Object expectedClob) {
    SerializableClobProxy clobProxy = (SerializableClobProxy) Proxy.getInvocationHandler(expectedClob);
    Clob wrappedClob = clobProxy.getWrappedClob();
    try {//w w  w.ja v a2s.  c om
        return wrappedClob.getSubString(1, (int) wrappedClob.length());
    } catch (SQLException e) {
        e.printStackTrace();
        return "error: could not retrieve text";
    }
}