Class NonContextualLobCreator
java.lang.Object
org.hibernate.engine.jdbc.env.internal.AbstractLobCreator
org.hibernate.engine.jdbc.env.internal.NonContextualLobCreator
- All Implemented Interfaces:
LobCreator
LobCreator
implementation using non-contextual or local creation, meaning that we generate the LOB
references ourselves as opposed to delegating to the JDBC connection.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateBlob
(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.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.env.internal.AbstractLobCreator
toJdbcBlob, toJdbcClob, toJdbcNClob, 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
toJdbcBlob, toJdbcClob, toJdbcNClob, wrap, wrap, wrap
-
Field Details
-
INSTANCE
Singleton access
-
-
Method Details
-
createBlob
Description copied from interface:LobCreator
Create a BLOB reference encapsulating the given byte array.- Specified by:
createBlob
in interfaceLobCreator
- Parameters:
bytes
- The byte array to wrap as a blob.- Returns:
- The created blob, castable to
Blob
as well asBlobImplementer
-
createBlob
Description copied from interface:LobCreator
Create a BLOB reference encapsulating the given binary stream.- Specified by:
createBlob
in interfaceLobCreator
- Parameters:
stream
- The binary stream to wrap as a blob.length
- The length of the stream.- Returns:
- The created blob, castable to
Blob
as well asBlobImplementer
-
createClob
Description copied from interface:LobCreator
Create a CLOB reference encapsulating the given String data.- Specified by:
createClob
in interfaceLobCreator
- Parameters:
string
- The String to wrap as a clob.- Returns:
- The created clob, castable to
Clob
as well asClobImplementer
-
createClob
Description copied from interface:LobCreator
Create a CLOB reference encapsulating the given character data.- Specified by:
createClob
in interfaceLobCreator
- Parameters:
reader
- The character data reader.length
- The length of the reader data.- Returns:
- The created clob, castable to
Clob
as well asClobImplementer
-
createNClob
Description copied from interface:LobCreator
Create a NCLOB reference encapsulating the given String data.- Specified by:
createNClob
in interfaceLobCreator
- Parameters:
string
- The String to wrap as a NCLOB.- Returns:
- The created NCLOB, castable as
Clob
as well asNClobImplementer
. In JDK 1.6 environments, also castable to java.sql.NClob
-
createNClob
Description copied from interface:LobCreator
Create a NCLOB reference encapsulating the given character data.- Specified by:
createNClob
in interfaceLobCreator
- Parameters:
reader
- The character data reader.length
- The length of the reader data.- Returns:
- The created NCLOB, castable as
Clob
as well asNClobImplementer
. In JDK 1.6 environments, also castable to java.sql.NClob
-