Package org.hibernate.engine.jdbc
Interface LobCreator
- All Known Implementing Classes:
AbstractLobCreator,BlobAndClobCreator,NonContextualLobCreator,StandardLobCreator
public interface LobCreator
Contract for creating various LOB references.
- See Also:
- API Note:
- This class is not intended to be called directly by the application program.
Instead, use
Hibernate.getLobHelper().
-
Method Summary
Modifier and TypeMethodDescriptioncreateBlob(byte[] bytes) Create a BLOB reference encapsulating the given byte array.createBlob(InputStream stream, long length) Create a BLOB reference encapsulating the given binary stream.createClob(Reader reader, long length) Create a CLOB reference encapsulating the given character data.createClob(String string) Create a CLOB reference encapsulating the given String data.createNClob(Reader reader, long length) Create a NCLOB reference encapsulating the given character data.createNClob(String string) Create a NCLOB reference encapsulating the given String data.toJdbcBlob(Blob clob) Return an instance which can actually be written to a JDBCPreparedStatement.toJdbcClob(Clob clob) Return an instance which can actually be written to a JDBCPreparedStatement.toJdbcNClob(NClob clob) Return an instance which can actually be written to a JDBCPreparedStatement.Wrap the given blob in a serializable wrapper.Wrap the given clob in a serializable wrapper.Wrap the given nclob in a serializable wrapper.
-
Method Details
-
wrap
Wrap the given blob in a serializable wrapper.- Parameters:
blob- The blob to be wrapped.- Returns:
- The wrapped blob which will be castable to
Blobas well asWrappedBlob.
-
wrap
Wrap the given clob in a serializable wrapper.- Parameters:
clob- The clob to be wrapped.- Returns:
- The wrapped clob which will be castable to
Clobas well asWrappedClob.
-
wrap
Wrap the given nclob in a serializable wrapper.- Parameters:
nclob- The nclob to be wrapped.- Returns:
- The wrapped nclob which will be castable to
NClobas well asWrappedNClob.
-
createBlob
Create a BLOB reference encapsulating the given byte array.- Parameters:
bytes- The byte array to wrap as a blob.- Returns:
- The created blob, castable to
Blobas well asBlobImplementer
-
createBlob
Create a BLOB reference encapsulating the given binary stream.- Parameters:
stream- The binary stream to wrap as a blob.length- The length of the stream.- Returns:
- The created blob, castable to
Blobas well asBlobImplementer
-
createClob
Create a CLOB reference encapsulating the given String data.- Parameters:
string- The String to wrap as a clob.- Returns:
- The created clob, castable to
Clobas well asClobImplementer
-
createClob
Create a CLOB reference encapsulating the given character data.- Parameters:
reader- The character data reader.length- The length of the reader data.- Returns:
- The created clob, castable to
Clobas well asClobImplementer
-
createNClob
Create a NCLOB reference encapsulating the given String data.- Parameters:
string- The String to wrap as a NCLOB.- Returns:
- The created NCLOB, castable as
Clobas well asNClobImplementer. In JDK 1.6 environments, also castable to java.sql.NClob
-
createNClob
Create a NCLOB reference encapsulating the given character data.- Parameters:
reader- The character data reader.length- The length of the reader data.- Returns:
- The created NCLOB, castable as
Clobas well asNClobImplementer. In JDK 1.6 environments, also castable to java.sql.NClob
-
toJdbcBlob
Return an instance which can actually be written to a JDBCPreparedStatement.- Since:
- 7.0
- See Also:
- API Note:
- This is needed for Oracle
-
toJdbcClob
Return an instance which can actually be written to a JDBCPreparedStatement.- Since:
- 7.0
- See Also:
- API Note:
- This is needed for Oracle
-
toJdbcNClob
Return an instance which can actually be written to a JDBCPreparedStatement.- Since:
- 7.0
- See Also:
- API Note:
- This is needed for Oracle
-