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
LobCreator which can use
Connection.createBlob() and Connection.createClob(),
but NClob references are created locally.- Author:
- Steve Ebersole
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LobCreationContext.Callback<Blob>Callback for performing contextual BLOB creationstatic final LobCreationContext.Callback<Clob>Callback for performing contextual CLOB creationprotected final LobCreationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate the basic contextual BLOB reference.createBlob(byte[] bytes) Create a BLOB reference encapsulating the given byte array.createBlob(InputStream stream, long length) Create a BLOB reference encapsulating the given binary stream.Create the basic contextual CLOB reference.createClob(Reader reader, long length) Create a CLOB reference encapsulating the given character data.createClob(String string) Create a CLOB reference encapsulating the given String data.createNClob(Reader reader, long length) Create a NCLOB reference encapsulating the given character data.createNClob(String string) Create a NCLOB reference encapsulating the given String data.Methods inherited from class org.hibernate.engine.jdbc.AbstractLobCreator
wrap, wrap, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.engine.jdbc.LobCreator
wrap, wrap, wrap
-
Field Details
-
CREATE_BLOB_CALLBACK
Callback for performing contextual BLOB creation -
CREATE_CLOB_CALLBACK
Callback for performing contextual CLOB creation -
lobCreationContext
-
-
Constructor Details
-
BlobAndClobCreator
-
-
Method Details
-
createBlob
Create the basic contextual BLOB reference.- Returns:
- The created BLOB reference.
-
createBlob
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
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
Create the basic contextual CLOB reference.- Returns:
- The created CLOB reference.
-
createClob
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
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
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
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
-