Package org.hibernate.engine.jdbc.proxy
Class ClobProxy
java.lang.Object
org.hibernate.engine.jdbc.proxy.ClobProxy
- All Implemented Interfaces:
Clob,ClobImplementer
- Direct Known Subclasses:
NClobProxy
Manages aspects of proxying
Clobs for non-contextual creation, including proxy creation and
handling proxy invocations. We use proxies here solely to avoid JDBC version incompatibilities.- See Also:
- API Note:
- This class is not intended to be called directly by the application program.
Instead, use
Hibernate.getLobHelper().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfree()static ClobgenerateProxy(Reader reader, long length) Generates aClobproxy using a character reader of given length.static ClobgenerateProxy(String string) Generates aClobproxy using the string data.getCharacterStream(long start, long length) getSubString(long start, int length) Gets access to the data underlying this CLOB.longlength()longlongprotected voidsetAsciiStream(long pos) setCharacterStream(long pos) intintvoidtruncate(long len)
-
Constructor Details
-
Method Details
-
length
public long length() -
getAsciiStream
- Specified by:
getAsciiStreamin interfaceClob- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStreamin interfaceClob- Throws:
SQLException
-
getUnderlyingStream
Description copied from interface:ClobImplementerGets access to the data underlying this CLOB.- Specified by:
getUnderlyingStreamin interfaceClobImplementer- Returns:
- Access to the underlying data.
-
position
- Specified by:
positionin interfaceClob- Throws:
SQLException
-
position
- Specified by:
positionin interfaceClob- Throws:
SQLException
-
setString
- Specified by:
setStringin interfaceClob- Throws:
SQLException
-
setString
- Specified by:
setStringin interfaceClob- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStreamin interfaceClob
-
setCharacterStream
- Specified by:
setCharacterStreamin interfaceClob
-
truncate
- Specified by:
truncatein interfaceClob- Throws:
SQLException
-
getSubString
- Specified by:
getSubStringin interfaceClob- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStreamin interfaceClob- Throws:
SQLException
-
free
- Specified by:
freein interfaceClob- Throws:
SQLException
-
resetIfNeeded
protected void resetIfNeeded() -
generateProxy
Generates aClobproxy using the string data.- Parameters:
string- The data to be wrapped as aClob.- Returns:
- The generated proxy.
-
generateProxy
Generates aClobproxy using a character reader of given length.- Parameters:
reader- The character readerlength- The length of the character reader- Returns:
- The generated proxy.
-