Package org.hibernate.engine.jdbc
Class NClobProxy
- java.lang.Object
-
- org.hibernate.engine.jdbc.ClobProxy
-
- org.hibernate.engine.jdbc.NClobProxy
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
public class NClobProxy extends ClobProxy
Manages aspects of proxying java.sql.NClobs for non-contextual creation, including proxy creation and handling proxy invocations. We use proxies here solely to avoid JDBC version incompatibilities. Generated proxies are typed asClob(java.sql.NClob extendsClob) and in JDK 1.6+ environments, they are also typed to java.sql.NClob
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Class[]PROXY_INTERFACESThe interfaces used to generate the proxy
-
Constructor Summary
Constructors Modifier Constructor Description protectedNClobProxy(java.io.Reader reader, long length)protectedNClobProxy(java.lang.String string)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.sql.NClobgenerateProxy(java.io.Reader reader, long length)Generates aNClobproxy using a character reader of given length.static java.sql.NClobgenerateProxy(java.lang.String string)Generates aClobproxy using the string data.protected static java.lang.ClassLoadergetProxyClassLoader()Determines the appropriate class loader to which the generated proxy should be scoped.-
Methods inherited from class org.hibernate.engine.jdbc.ClobProxy
getAsciiStream, getCharacterStream, getLength, getSubString, getUnderlyingStream, invoke, resetIfNeeded
-
-
-
-
Method Detail
-
generateProxy
public static java.sql.NClob generateProxy(java.lang.String string)
Generates aClobproxy using the string data.- Parameters:
string- The data to be wrapped as aClob.- Returns:
- The generated proxy.
-
generateProxy
public static java.sql.NClob generateProxy(java.io.Reader reader, long length)Generates aNClobproxy using a character reader of given length.- Parameters:
reader- The character readerlength- The length of the character reader- Returns:
- The generated proxy.
-
getProxyClassLoader
protected static java.lang.ClassLoader getProxyClassLoader()
Determines the appropriate class loader to which the generated proxy should be scoped.- Returns:
- The class loader appropriate for proxy construction.
-
-