Class ContextualLobCreator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.sql.Blob createBlob()
      Create the basic contextual BLOB reference.
      java.sql.Blob createBlob​(byte[] bytes)
      Create a BLOB reference encapsulating the given byte array.
      java.sql.Blob createBlob​(java.io.InputStream inputStream, long length)
      Create a BLOB reference encapsulating the given binary stream.
      java.sql.Clob createClob()
      Create the basic contextual CLOB reference.
      java.sql.Clob createClob​(java.io.Reader reader, long length)
      Create a CLOB reference encapsulating the given character data.
      java.sql.Clob createClob​(java.lang.String string)
      Create a CLOB reference encapsulating the given String data.
      java.sql.NClob createNClob()
      Create the basic contextual NCLOB reference.
      java.sql.NClob createNClob​(java.io.Reader reader, long length)
      Create a NCLOB reference encapsulating the given character data.
      java.sql.NClob createNClob​(java.lang.String string)
      Create a NCLOB reference encapsulating the given String data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CREATE_BLOB_CALLBACK

        public static final LobCreationContext.Callback<java.sql.Blob> CREATE_BLOB_CALLBACK
        Callback for performing contextual BLOB creation
      • CREATE_CLOB_CALLBACK

        public static final LobCreationContext.Callback<java.sql.Clob> CREATE_CLOB_CALLBACK
        Callback for performing contextual CLOB creation
      • CREATE_NCLOB_CALLBACK

        public static final LobCreationContext.Callback<java.sql.NClob> CREATE_NCLOB_CALLBACK
        Callback for performing contextual NCLOB creation
    • Constructor Detail

      • ContextualLobCreator

        public ContextualLobCreator​(LobCreationContext lobCreationContext)
        Constructs a ContextualLobCreator
        Parameters:
        lobCreationContext - The context for performing LOB creation
    • Method Detail

      • createBlob

        public java.sql.Blob createBlob()
        Create the basic contextual BLOB reference.
        Returns:
        The created BLOB reference.
      • createBlob

        public java.sql.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 java.sql.Blob createBlob​(java.io.InputStream inputStream,
                                        long length)
        Description copied from interface: LobCreator
        Create a BLOB reference encapsulating the given binary stream.
        Specified by:
        createBlob in interface LobCreator
        Parameters:
        inputStream - 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 java.sql.Clob createClob()
        Create the basic contextual CLOB reference.
        Returns:
        The created CLOB reference.
      • createClob

        public java.sql.Clob createClob​(java.lang.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 java.sql.Clob createClob​(java.io.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 java.sql.NClob createNClob()
        Create the basic contextual NCLOB reference.
        Returns:
        The created NCLOB reference.
      • createNClob

        public java.sql.NClob createNClob​(java.lang.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 java.sql.NClob createNClob​(java.io.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