Package org.hibernate.engine.jdbc
Class NClobProxy
- java.lang.Object
-
- org.hibernate.engine.jdbc.ClobProxy
-
- org.hibernate.engine.jdbc.NClobProxy
-
- All Implemented Interfaces:
InvocationHandler
@Internal public class NClobProxy extends ClobProxy
Manages aspects of proxyingNClob
s 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 as
Clob
(NClob
extendsClob
)and in JDK 1.6+ environments, they are also typed toNClob
.- See Also:
ClobProxy
,BlobProxy
,LobCreator
,LobHelper
- API Note:
- This class is not intended to be called directly by the application program.
Instead, use
Session.getLobHelper()
.
-
-
Field Summary
Fields Modifier and Type Field Description static Class<?>[]
PROXY_INTERFACES
The interfaces used to generate the proxy
-
Constructor Summary
Constructors Modifier Constructor Description protected
NClobProxy(Reader reader, long length)
protected
NClobProxy(String string)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NClob
generateProxy(Reader reader, long length)
Generates aNClob
proxy using a character reader of given length.static NClob
generateProxy(String string)
Generates aClob
proxy using the string data.protected static ClassLoader
getProxyClassLoader()
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
-
-
-
-
Field Detail
-
PROXY_INTERFACES
public static final Class<?>[] PROXY_INTERFACES
The interfaces used to generate the proxy
-
-
Method Detail
-
generateProxy
public static NClob generateProxy(String string)
Generates aClob
proxy using the string data.- Parameters:
string
- The data to be wrapped as aClob
.- Returns:
- The generated proxy.
-
generateProxy
public static NClob generateProxy(Reader reader, long length)
Generates aNClob
proxy 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 ClassLoader getProxyClassLoader()
Determines the appropriate class loader to which the generated proxy should be scoped.- Returns:
- The class loader appropriate for proxy construction.
-
-