Top Description Fields Constructors Methods
org.hibernate.engine.jdbc

public Class NonContextualLobCreator

extends AbstractLobCreator
implements LobCreator
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.jdbc.LobCreator
Imports
java.sql.Blob, .Clob, java.io.InputStream, .Reader

LobCreator implementation using non-contextual or local creation, meaning that we generate the LOB references ourselves as opposed to delegating to the JDBC java.sql.Connection.
Authors
Steve Ebersole, Gail Badner

Field Summary

Modifier and TypeField and Description
public static final NonContextualLobCreator

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Blob
createBlob(byte[]
The byte array to wrap as a blob.
bytes
)

Implements org.hibernate.engine.jdbc.LobCreator.createBlob.

Create a BLOB reference encapsulating the given byte array.
public Blob
createBlob(InputStream
The binary stream to wrap as a blob.
stream
,
long
The length of the stream.
length
)

Implements org.hibernate.engine.jdbc.LobCreator.createBlob.

Create a BLOB reference encapsulating the given binary stream.
public Clob
createClob(String
The String to wrap as a clob.
string
)

Implements org.hibernate.engine.jdbc.LobCreator.createClob.

Create a CLOB reference encapsulating the given String data.
public Clob
createClob(Reader
The character data reader.
reader
,
long
The length of the reader data.
length
)

Implements org.hibernate.engine.jdbc.LobCreator.createClob.

Create a CLOB reference encapsulating the given character data.
public Clob
createNClob(String
The String to wrap as a NCLOB.
string
)

Implements org.hibernate.engine.jdbc.LobCreator.createNClob.

Create a NCLOB reference encapsulating the given String data.
public Clob
createNClob(Reader
The character data reader.
reader
,
long
The length of the reader data.
length
)

Implements org.hibernate.engine.jdbc.LobCreator.createNClob.

Create a NCLOB reference encapsulating the given character data.
Inherited from org.hibernate.engine.jdbc.AbstractLobCreator:
wrapwrap

Field Detail

INSTANCEback to summary
public static final NonContextualLobCreator INSTANCE

Constructor Detail

NonContextualLobCreatorback to summary
private NonContextualLobCreator()

Method Detail

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

Implements org.hibernate.engine.jdbc.LobCreator.createBlob.

Doc from org.hibernate.engine.jdbc.LobCreator.createBlob.

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)

Implements org.hibernate.engine.jdbc.LobCreator.createBlob.

Doc from org.hibernate.engine.jdbc.LobCreator.createBlob.

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)

Implements org.hibernate.engine.jdbc.LobCreator.createClob.

Doc from org.hibernate.engine.jdbc.LobCreator.createClob.

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)

Implements org.hibernate.engine.jdbc.LobCreator.createClob.

Doc from org.hibernate.engine.jdbc.LobCreator.createClob.

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)

Implements org.hibernate.engine.jdbc.LobCreator.createNClob.

Doc from org.hibernate.engine.jdbc.LobCreator.createNClob.

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)

Implements org.hibernate.engine.jdbc.LobCreator.createNClob.

Doc from org.hibernate.engine.jdbc.LobCreator.createNClob.

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