LobCreator implementation based on temporary LOBs, using JDBC's
java.sql.Connection#createBlob() /
java.sql.Connection#createClob() mechanism.
Used by DefaultLobHandler's DefaultLobHandler#setCreateTemporaryLob mode.
Can also be used directly to reuse the tracking and freeing of temporary LOBs.
DefaultLobHandler#setCreateTemporaryLob, java.sql.Connection#createBlob() , java.sql.Connection#createClob()
| Modifier and Type | Field and Description |
|---|---|
| protected static final Log | |
| private final Set | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements org. |
| public void | setBlobAsBinaryStream(PreparedStatement
the PreparedStatement to the set the content on ps, int the parameter index to use paramIndex, InputStream the content as binary stream, or binaryStream, int contentLength)null for SQL NULLImplements org. |
| public void | setBlobAsBytes(PreparedStatement
the PreparedStatement to the set the content on ps, int the parameter index to use paramIndex, byte[] the content as byte array, or content)null for SQL NULLImplements org. |
| public void | setClobAsAsciiStream(PreparedStatement
the PreparedStatement to the set the content on ps, int the parameter index to use paramIndex, InputStream the content as ASCII stream, or asciiStream, int contentLength)null for SQL NULLImplements org. |
| public void | setClobAsCharacterStream(PreparedStatement
the PreparedStatement to the set the content on ps, int the parameter index to use paramIndex, Reader the content as character stream, or characterStream, int contentLength)null for SQL NULLImplements org. |
| public void | setClobAsString(PreparedStatement
the PreparedStatement to the set the content on ps, int the parameter index to use paramIndex, String the content as String, or content)null for SQL NULLImplements org. |
| logger | back to summary |
|---|---|
| protected static final Log logger | |
| temporaryBlobs | back to summary |
|---|---|
| private final Set<Blob> temporaryBlobs | |
| temporaryClobs | back to summary |
|---|---|
| private final Set<Clob> temporaryClobs | |
| TemporaryLobCreator | back to summary |
|---|---|
| public TemporaryLobCreator() | |
| close | back to summary |
|---|---|
| public void close() Implements org. Doc from org. Close this LobCreator session and free its temporarily created BLOBs and CLOBs. Will not need to do anything if using PreparedStatement's standard methods, but might be necessary to free database resources if using proprietary means. Note Needs to be invoked after the involved PreparedStatements have been executed or the affected O/R mapping sessions have been flushed. Otherwise, the database resources for the temporary BLOBs might stay allocated.
| |
| setBlobAsBinaryStream | back to summary |
|---|---|
| public void setBlobAsBinaryStream(PreparedStatement ps, int paramIndex, InputStream binaryStream, int contentLength) throws SQLException Implements org. Doc from org. Set the given content as binary stream on the given statement, using the given
parameter index. Might simply invoke
| |
| setBlobAsBytes | back to summary |
|---|---|
| public void setBlobAsBytes(PreparedStatement ps, int paramIndex, byte[] content) throws SQLException Implements org. Doc from org. Set the given content as bytes on the given statement, using the given
parameter index. Might simply invoke
| |
| setClobAsAsciiStream | back to summary |
|---|---|
| public void setClobAsAsciiStream(PreparedStatement ps, int paramIndex, InputStream asciiStream, int contentLength) throws SQLException Implements org. Doc from org. Set the given content as ASCII stream on the given statement, using the given
parameter index. Might simply invoke
| |
| setClobAsCharacterStream | back to summary |
|---|---|
| public void setClobAsCharacterStream(PreparedStatement ps, int paramIndex, Reader characterStream, int contentLength) throws SQLException Implements org. Doc from org. Set the given content as character stream on the given statement, using the given
parameter index. Might simply invoke
| |
| setClobAsString | back to summary |
|---|---|
| public void setClobAsString(PreparedStatement ps, int paramIndex, String content) throws SQLException Implements org. Doc from org. Set the given content as String on the given statement, using the given
parameter index. Might simply invoke
| |