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
Clob
s 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
Session.getLobHelper()
.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
free()
static Clob
generateProxy
(Reader reader, long length) Generates aClob
proxy using a character reader of given length.static Clob
generateProxy
(String string) Generates aClob
proxy using the string data.getCharacterStream
(long start, long length) getSubString
(long start, int length) Gets access to the data underlying this CLOB.long
length()
long
long
protected void
setAsciiStream
(long pos) setCharacterStream
(long pos) int
int
void
truncate
(long len)
-
Constructor Details
-
Method Details
-
length
public long length() -
getAsciiStream
- Specified by:
getAsciiStream
in interfaceClob
- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceClob
- Throws:
SQLException
-
getUnderlyingStream
Description copied from interface:ClobImplementer
Gets access to the data underlying this CLOB.- Specified by:
getUnderlyingStream
in interfaceClobImplementer
- Returns:
- Access to the underlying data.
-
position
- Specified by:
position
in interfaceClob
- Throws:
SQLException
-
position
- Specified by:
position
in interfaceClob
- Throws:
SQLException
-
setString
- Specified by:
setString
in interfaceClob
- Throws:
SQLException
-
setString
- Specified by:
setString
in interfaceClob
- Throws:
SQLException
-
setAsciiStream
- Specified by:
setAsciiStream
in interfaceClob
-
setCharacterStream
- Specified by:
setCharacterStream
in interfaceClob
-
truncate
- Specified by:
truncate
in interfaceClob
- Throws:
SQLException
-
getSubString
- Specified by:
getSubString
in interfaceClob
- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceClob
- Throws:
SQLException
-
free
- Specified by:
free
in interfaceClob
- Throws:
SQLException
-
resetIfNeeded
protected void resetIfNeeded() -
generateProxy
Generates aClob
proxy using the string data.- Parameters:
string
- The data to be wrapped as aClob
.- Returns:
- The generated proxy.
-
generateProxy
Generates aClob
proxy using a character reader of given length.- Parameters:
reader
- The character readerlength
- The length of the character reader- Returns:
- The generated proxy.
-