Package org.hibernate.engine.jdbc
Class NonContextualLobCreator
- java.lang.Object
-
- org.hibernate.engine.jdbc.AbstractLobCreator
-
- org.hibernate.engine.jdbc.NonContextualLobCreator
-
- All Implemented Interfaces:
LobCreator
public class NonContextualLobCreator extends AbstractLobCreator implements LobCreator
LobCreatorimplementation using non-contextual or local creation, meaning that we generate the LOB references ourselves as opposed to delegating to the JDBCConnection.
-
-
Field Summary
Fields Modifier and Type Field Description static NonContextualLobCreatorINSTANCESingleton access
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.BlobcreateBlob(byte[] bytes)Create a BLOB reference encapsulating the given byte array.java.sql.BlobcreateBlob(java.io.InputStream stream, long length)Create a BLOB reference encapsulating the given binary stream.java.sql.ClobcreateClob(java.io.Reader reader, long length)Create a CLOB reference encapsulating the given character data.java.sql.ClobcreateClob(java.lang.String string)Create a CLOB reference encapsulating the given String data.java.sql.NClobcreateNClob(java.io.Reader reader, long length)Create a NCLOB reference encapsulating the given character data.java.sql.NClobcreateNClob(java.lang.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
-
INSTANCE
public static final NonContextualLobCreator INSTANCE
Singleton access
-
-
Method Detail
-
createBlob
public java.sql.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 java.sql.Blob createBlob(java.io.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 java.sql.Clob createClob(java.lang.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 java.sql.Clob createClob(java.io.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 java.sql.NClob createNClob(java.lang.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 java.sql.NClob createNClob(java.io.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
-
-