org.hibernate.engine.jdbc
Interface LobCreator

All Known Implementing Classes:
AbstractLobCreator, ContextualLobCreator, NonContextualLobCreator

public interface LobCreator

Contract for creating various LOB references.

Author:
Steve Ebersole, Gail Badner

Method Summary
 java.sql.Blob createBlob(byte[] bytes)
          Create a BLOB reference encapsulating the given byte array.
 java.sql.Blob createBlob(java.io.InputStream stream, long length)
          Create a BLOB reference encapsulating the given binary stream.
 java.sql.Clob createClob(java.io.Reader reader, long length)
          Create a CLOB reference encapsulating the given character data.
 java.sql.Clob createClob(java.lang.String string)
          Create a CLOB reference encapsulating the given String data.
 java.sql.Clob createNClob(java.io.Reader reader, long length)
          Create a NCLOB reference encapsulating the given character data.
 java.sql.Clob createNClob(java.lang.String string)
          Create a NCLOB reference encapsulating the given String data.
 java.sql.Blob wrap(java.sql.Blob blob)
          Wrap the given blob in a serializable wrapper.
 java.sql.Clob wrap(java.sql.Clob clob)
          Wrap the given clob in a serializable wrapper.
 

Method Detail

wrap

java.sql.Blob wrap(java.sql.Blob blob)
Wrap the given blob in a serializable wrapper.

Parameters:
blob - The blob to be wrapped.
Returns:
The wrapped blob which will be castable to Blob as well as WrappedBlob.

wrap

java.sql.Clob wrap(java.sql.Clob clob)
Wrap the given clob in a serializable wrapper.

Parameters:
clob - The clob to be wrapped.
Returns:
The wrapped clob which will be castable to Clob as well as WrappedClob.

createBlob

java.sql.Blob createBlob(byte[] bytes)
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 Blob as well as BlobImplementer

createBlob

java.sql.Blob createBlob(java.io.InputStream stream,
                         long length)
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 Blob as well as BlobImplementer

createClob

java.sql.Clob createClob(java.lang.String string)
Create a CLOB reference encapsulating the given String data.

Parameters:
string - The String to wrap as a clob.
Returns:
The created clob, castable to Clob as well as ClobImplementer

createClob

java.sql.Clob createClob(java.io.Reader reader,
                         long length)
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 Clob as well as ClobImplementer

createNClob

java.sql.Clob createNClob(java.lang.String string)
Create a NCLOB reference encapsulating the given String data.

Parameters:
string - The String to wrap as a NCLOB.
Returns:
The created NCLOB, castable as Clob as well as NClobImplementer. In JDK 1.6 environments, also castable to java.sql.NClob

createNClob

java.sql.Clob createNClob(java.io.Reader reader,
                          long length)
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 Clob as well as NClobImplementer. In JDK 1.6 environments, also castable to java.sql.NClob


Copyright © 2011. All Rights Reserved.