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 use Connection.createBlob() and Connection.createClob(), but NClob references are created locally.
Author:
Steve Ebersole
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • 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: LobCreator
      Create a BLOB reference encapsulating the given byte array.
      Specified by:
      createBlob in interface LobCreator
      Parameters:
      bytes - The byte array to wrap as a blob.
      Returns:
      The created blob, castable to Blob as well as BlobImplementer
    • createBlob

      public Blob createBlob(InputStream stream, long length)
      Description copied from interface: LobCreator
      Create a BLOB reference encapsulating the given binary stream.
      Specified by:
      createBlob in interface LobCreator
      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 as BlobImplementer
    • 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: LobCreator
      Create a CLOB reference encapsulating the given String data.
      Specified by:
      createClob in interface LobCreator
      Parameters:
      string - The String to wrap as a clob.
      Returns:
      The created clob, castable to Clob as well as ClobImplementer
    • createClob

      public Clob createClob(Reader reader, long length)
      Description copied from interface: LobCreator
      Create a CLOB reference encapsulating the given character data.
      Specified by:
      createClob in interface LobCreator
      Parameters:
      reader - The character data reader.
      length - The length of the reader data.
      Returns:
      The created clob, castable to Clob as well as ClobImplementer
    • createNClob

      public NClob createNClob(String string)
      Description copied from interface: LobCreator
      Create a NCLOB reference encapsulating the given String data.
      Specified by:
      createNClob in interface LobCreator
      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
    • createNClob

      public NClob createNClob(Reader reader, long length)
      Description copied from interface: LobCreator
      Create a NCLOB reference encapsulating the given character data.
      Specified by:
      createNClob in interface LobCreator
      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