Top Description Methods
org.hibernate.engine.jdbc

public Interface LobCreator

Known Direct Implementers
org.hibernate.engine.jdbc.NonContextualLobCreator, org.hibernate.engine.jdbc.AbstractLobCreator, org.hibernate.engine.jdbc.ContextualLobCreator
Imports
java.sql.Blob, .Clob, java.io.InputStream, .Reader

Contract for creating various LOB references.
Authors
Steve Ebersole, Gail Badner

Method Summary

Modifier and TypeMethod and Description
public Blob

Returns:

The created blob, castable to Blob as well as BlobImplementer
createBlob
(byte[]
The byte array to wrap as a blob.
bytes
)

Create a BLOB reference encapsulating the given byte array.

public Blob

Returns:

The created blob, castable to Blob as well as BlobImplementer
createBlob
(InputStream
The binary stream to wrap as a blob.
stream
,
long
The length of the stream.
length
)

Create a BLOB reference encapsulating the given binary stream.

public Clob

Returns:

The created clob, castable to Clob as well as ClobImplementer
createClob
(String
The String to wrap as a clob.
string
)

Create a CLOB reference encapsulating the given String data.

public Clob

Returns:

The created clob, castable to Clob as well as ClobImplementer
createClob
(Reader
The character data reader.
reader
,
long
The length of the reader data.
length
)

Create a CLOB reference encapsulating the given character data.

public Clob

Returns:

The created NCLOB, castable as Clob as well as NClobImplementer. In JDK 1.6 environments, also castable to java.sql.NClob
createNClob
(String
The String to wrap as a NCLOB.
string
)

Create a NCLOB reference encapsulating the given String data.

public Clob

Returns:

The created NCLOB, castable as Clob as well as NClobImplementer. In JDK 1.6 environments, also castable to java.sql.NClob
createNClob
(Reader
The character data reader.
reader
,
long
The length of the reader data.
length
)

Create a NCLOB reference encapsulating the given character data.

public Blob

Returns:

The wrapped blob which will be castable to Blob as well as WrappedBlob.
wrap
(Blob
The blob to be wrapped.
blob
)

Wrap the given blob in a serializable wrapper.

public Clob

Returns:

The wrapped clob which will be castable to Clob as well as WrappedClob.
wrap
(Clob
The clob to be wrapped.
clob
)

Wrap the given clob in a serializable wrapper.

Method Detail

createBlobback to summary
public Blob createBlob(byte[] bytes)

Create a BLOB reference encapsulating the given byte array.

Parameters
bytes:byte[]

The byte array to wrap as a blob.

Returns:Blob

The created blob, castable to Blob as well as BlobImplementer

createBlobback to summary
public Blob createBlob(InputStream stream, long length)

Create a BLOB reference encapsulating the given binary stream.

Parameters
stream:InputStream

The binary stream to wrap as a blob.

length:long

The length of the stream.

Returns:Blob

The created blob, castable to Blob as well as BlobImplementer

createClobback to summary
public Clob createClob(String string)

Create a CLOB reference encapsulating the given String data.

Parameters
string:String

The String to wrap as a clob.

Returns:Clob

The created clob, castable to Clob as well as ClobImplementer

createClobback to summary
public Clob createClob(Reader reader, long length)

Create a CLOB reference encapsulating the given character data.

Parameters
reader:Reader

The character data reader.

length:long

The length of the reader data.

Returns:Clob

The created clob, castable to Clob as well as ClobImplementer

createNClobback to summary
public Clob createNClob(String string)

Create a NCLOB reference encapsulating the given String data.

Parameters
string:String

The String to wrap as a NCLOB.

Returns:Clob

The created NCLOB, castable as Clob as well as NClobImplementer. In JDK 1.6 environments, also castable to java.sql.NClob

createNClobback to summary
public Clob createNClob(Reader reader, long length)

Create a NCLOB reference encapsulating the given character data.

Parameters
reader:Reader

The character data reader.

length:long

The length of the reader data.

Returns:Clob

The created NCLOB, castable as Clob as well as NClobImplementer. In JDK 1.6 environments, also castable to java.sql.NClob

wrapback to summary
public Blob wrap(Blob blob)

Wrap the given blob in a serializable wrapper.

Parameters
blob:Blob

The blob to be wrapped.

Returns:Blob

The wrapped blob which will be castable to Blob as well as WrappedBlob.

wrapback to summary
public Clob wrap(Clob clob)

Wrap the given clob in a serializable wrapper.

Parameters
clob:Clob

The clob to be wrapped.

Returns:Clob

The wrapped clob which will be castable to Clob as well as WrappedClob.