Class BlobAndClobCreator
- java.lang.Object
-
- org.hibernate.engine.jdbc.AbstractLobCreator
-
- org.hibernate.engine.jdbc.env.internal.BlobAndClobCreator
-
- All Implemented Interfaces:
LobCreator
- Direct Known Subclasses:
StandardLobCreator
public class BlobAndClobCreator extends AbstractLobCreator implements LobCreator
LobCreator which can useConnection.createBlob()andConnection.createClob(), butNClobreferences are created locally.- See Also:
NClobProxy
-
-
Field Summary
Fields Modifier and Type Field Description static LobCreationContext.Callback<Blob>CREATE_BLOB_CALLBACKCallback for performing contextual BLOB creationstatic LobCreationContext.Callback<Clob>CREATE_CLOB_CALLBACKCallback for performing contextual CLOB creationprotected LobCreationContextlobCreationContext
-
Constructor Summary
Constructors Constructor Description BlobAndClobCreator(LobCreationContext lobCreationContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlobcreateBlob()Create the basic contextual BLOB reference.BlobcreateBlob(byte[] bytes)Create a BLOB reference encapsulating the given byte array.BlobcreateBlob(InputStream stream, long length)Create a BLOB reference encapsulating the given binary stream.ClobcreateClob()Create the basic contextual CLOB reference.ClobcreateClob(Reader reader, long length)Create a CLOB reference encapsulating the given character data.ClobcreateClob(String string)Create a CLOB reference encapsulating the given String data.NClobcreateNClob(Reader reader, long length)Create a NCLOB reference encapsulating the given character data.NClobcreateNClob(String string)Create a NCLOB reference encapsulating the given String data.-
Methods inherited from class org.hibernate.engine.jdbc.AbstractLobCreator
wrap, wrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.engine.jdbc.LobCreator
wrap, wrap, wrap
-
-
-
-
Field Detail
-
CREATE_BLOB_CALLBACK
public static final LobCreationContext.Callback<Blob> CREATE_BLOB_CALLBACK
Callback for performing contextual BLOB creation
-
CREATE_CLOB_CALLBACK
public static final LobCreationContext.Callback<Clob> CREATE_CLOB_CALLBACK
Callback for performing contextual CLOB creation
-
lobCreationContext
protected final LobCreationContext lobCreationContext
-
-
Constructor Detail
-
BlobAndClobCreator
public BlobAndClobCreator(LobCreationContext lobCreationContext)
-
-
Method Detail
-
createBlob
public Blob createBlob()
Create the basic contextual BLOB reference.- Returns:
- The created BLOB reference.
-
createBlob
public Blob createBlob(byte[] bytes)
Description copied from interface:LobCreatorCreate a BLOB reference encapsulating the given byte array.- Specified by:
createBlobin interfaceLobCreator- Parameters:
bytes- The byte array to wrap as a blob.- Returns:
- The created blob, castable to
Blobas well asBlobImplementer
-
createBlob
public Blob createBlob(InputStream stream, long length)
Description copied from interface:LobCreatorCreate a BLOB reference encapsulating the given binary stream.- Specified by:
createBlobin interfaceLobCreator- 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
public Clob createClob()
Create the basic contextual CLOB reference.- Returns:
- The created CLOB reference.
-
createClob
public Clob createClob(String string)
Description copied from interface:LobCreatorCreate a CLOB reference encapsulating the given String data.- Specified by:
createClobin interfaceLobCreator- Parameters:
string- The String to wrap as a clob.- Returns:
- The created clob, castable to
Clobas well asClobImplementer
-
createClob
public Clob createClob(Reader reader, long length)
Description copied from interface:LobCreatorCreate a CLOB reference encapsulating the given character data.- Specified by:
createClobin interfaceLobCreator- Parameters:
reader- The character data reader.length- The length of the reader data.- Returns:
- The created clob, castable to
Clobas well asClobImplementer
-
createNClob
public NClob createNClob(String string)
Description copied from interface:LobCreatorCreate a NCLOB reference encapsulating the given String data.- Specified by:
createNClobin interfaceLobCreator- 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
public NClob createNClob(Reader reader, long length)
Description copied from interface:LobCreatorCreate a NCLOB reference encapsulating the given character data.- Specified by:
createNClobin interfaceLobCreator- 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
-
-