java.sql.Blob
and java.sql.Clob
instances in the API, as some JDBC drivers do not support these types as such. The LOB creation part is where {@link LobHandler} implementations usuallydiffer. Possible strategies include usage of PreparedStatement.setBinaryStream/setCharacterStream
but also PreparedStatement.setBlob/setClob
with either a stream argument (requires JDBC 4.0) or java.sql.Blob/Clob
wrapper objects.
A LobCreator represents a session for creating BLOBs: It is not thread-safe and needs to be instantiated for each statement execution or for each transaction. Each LobCreator needs to be closed after completion.
For convenient working with a PreparedStatement and a LobCreator, consider using {@link org.springframework.jdbc.core.JdbcTemplate} with an{@link org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatementCallback}implementation. See the latter's javadoc for details. @author Juergen Hoeller @since 04.12.2003 @see #close() @see LobHandler#getLobCreator() @see DefaultLobHandler.DefaultLobCreator @see OracleLobHandler.OracleLobCreator @see java.sql.PreparedStatement#setBlob @see java.sql.PreparedStatement#setClob @see java.sql.PreparedStatement#setBytes @see java.sql.PreparedStatement#setBinaryStream @see java.sql.PreparedStatement#setString @see java.sql.PreparedStatement#setAsciiStream @see java.sql.PreparedStatement#setCharacterStream
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|