Class BasicExtractor<J>

    • Method Detail

      • extract

        public J extract​(java.sql.ResultSet rs,
                         java.lang.String name,
                         WrapperOptions options)
                  throws java.sql.SQLException
        Description copied from interface: ValueExtractor
        Extract value from result set
        Specified by:
        extract in interface ValueExtractor<J>
        Parameters:
        rs - The result set from which to extract the value
        name - The name by which to extract the value from the result set
        options - The options
        Returns:
        The extracted value
        Throws:
        java.sql.SQLException - Indicates a JDBC error occurred.
      • doExtract

        protected abstract J doExtract​(java.sql.ResultSet rs,
                                       java.lang.String name,
                                       WrapperOptions options)
                                throws java.sql.SQLException
        Perform the extraction.

        Called from extract(java.sql.ResultSet, java.lang.String, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consulting ResultSet.wasNull()) is done there.

        Parameters:
        rs - The result set
        name - The value name in the result set
        options - The binding options
        Returns:
        The extracted value.
        Throws:
        java.sql.SQLException - Indicates a problem access the result set
      • extract

        public J extract​(java.sql.CallableStatement statement,
                         int index,
                         WrapperOptions options)
                  throws java.sql.SQLException
        Specified by:
        extract in interface ValueExtractor<J>
        Throws:
        java.sql.SQLException
      • doExtract

        protected abstract J doExtract​(java.sql.CallableStatement statement,
                                       int index,
                                       WrapperOptions options)
                                throws java.sql.SQLException
        Perform the extraction.

        Called from extract(java.sql.ResultSet, java.lang.String, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consulting ResultSet.wasNull()) is done there.

        Parameters:
        statement - The callable statement containing the output parameter
        index - The index (position) of the output parameter
        options - The binding options
        Returns:
        The extracted value.
        Throws:
        java.sql.SQLException - Indicates a problem accessing the parameter value
      • extract

        public J extract​(java.sql.CallableStatement statement,
                         java.lang.String[] paramNames,
                         WrapperOptions options)
                  throws java.sql.SQLException
        Specified by:
        extract in interface ValueExtractor<J>
        Throws:
        java.sql.SQLException
      • doExtract

        protected abstract J doExtract​(java.sql.CallableStatement statement,
                                       java.lang.String name,
                                       WrapperOptions options)
                                throws java.sql.SQLException
        Perform the extraction.

        Called from extract(java.sql.ResultSet, java.lang.String, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consulting ResultSet.wasNull()) is done there.

        Parameters:
        statement - The callable statement containing the output parameter
        name - The output parameter name
        options - The binding options
        Returns:
        The extracted value.
        Throws:
        java.sql.SQLException - Indicates a problem accessing the parameter value