public class

NonContextualLobCreator

extends AbstractLobCreator
implements LobCreator
java.lang.Object
   ↳ org.hibernate.engine.jdbc.AbstractLobCreator
     ↳ org.hibernate.engine.jdbc.NonContextualLobCreator

Class Overview

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.

Summary

Fields
public static final NonContextualLobCreator INSTANCE
Public Methods
Blob createBlob(InputStream stream, long length)
Create a BLOB reference encapsulating the given binary stream.
Blob createBlob(byte[] bytes)
Create a BLOB reference encapsulating the given byte array.
Clob createClob(String string)
Create a CLOB reference encapsulating the given String data.
Clob createClob(Reader reader, long length)
Create a CLOB reference encapsulating the given character data.
Clob createNClob(Reader reader, long length)
Create a NCLOB reference encapsulating the given character data.
Clob createNClob(String string)
Create a NCLOB reference encapsulating the given String data.
[Expand]
Inherited Methods
From class org.hibernate.engine.jdbc.AbstractLobCreator
From class java.lang.Object
From interface org.hibernate.engine.jdbc.LobCreator

Fields

public static final NonContextualLobCreator INSTANCE

Public Methods

public Blob createBlob (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

public Blob createBlob (byte[] bytes)

Create a BLOB reference encapsulating the given byte array.

Parameters
bytes The byte array to wrap as a blob.
Returns

public Clob createClob (String string)

Create a CLOB reference encapsulating the given String data.

Parameters
string The String to wrap as a clob.
Returns

public Clob createClob (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

public Clob createNClob (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

public Clob createNClob (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