com.groupdocs.assembly.system.data

Class DataTableReader

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close()
      Closes the current DataTableReader.
      java.lang.Object get(int ordinal)
      Gets the value of the specified column in its native format given the column ordinal.
      java.lang.Object get(java.lang.String name)
      Gets the value of the specified column in its native format given the column name.
      int getDepth()
      The depth of nesting for the current row of the DataTableReader.
      int getFieldCount()
      Returns the number of columns in the current row.
      java.lang.Class getFieldType(int ordinal)
      Gets the Class that is the data type of the object.
      java.lang.String getName(int ordinal)
      Gets the value of the specified column as a String.
      int getRecordsAffected()
      Gets the number of rows inserted, changed, or deleted by execution of the SQL statement.
      DataTable getSchemaTable()
      Returns a DataTable that describes the column metadata of the DataTableReader.
      java.lang.Object getValue(int ordinal)
      Gets the value of the specified column in its native format.
      boolean hasRows()
      Gets a value that indicates whether the DataTableReader contains one or more rows.
      boolean isClosed()
      Gets a value that indicates whether the DataTableReader is closed.
      java.util.Iterator iterator()
      Returns an enumerator that can be used to iterate through the item collection.
      boolean nextResult()
      Advances the DataTableReader to the next result set, if any.
      boolean read()
      Advances the DataTableReader to the next record.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • getFieldCount

        public final int getFieldCount()
        Returns the number of columns in the current row.
        Returns:
        When not positioned in a valid result set, 0; otherwise the number of columns in the current row.
      • isClosed

        public final boolean isClosed()
        Gets a value that indicates whether the DataTableReader is closed.
        Returns:
        Returns true if the DataTableReader is closed; otherwise, false.
      • get

        public final java.lang.Object get(int ordinal)
        Gets the value of the specified column in its native format given the column ordinal.
        Parameters:
        ordinal - The zero-based column ordinal.
        Returns:
        The value of the specified column in its native format.
      • getName

        public final java.lang.String getName(int ordinal)
        Gets the value of the specified column as a String.
        Parameters:
        ordinal - The zero-based column ordinal
        Returns:
        The name of the specified column.
      • getFieldType

        public final java.lang.Class getFieldType(int ordinal)
        Gets the Class that is the data type of the object.
        Parameters:
        ordinal - The zero-based column ordinal.
        Returns:
        The Class that is the data type of the object.
      • getValue

        public final java.lang.Object getValue(int ordinal)
        Gets the value of the specified column in its native format.
        Parameters:
        ordinal - The zero-based column ordinal
        Returns:
        The value of the specified column. This method returns DBNull for null columns.
      • read

        public final boolean read()
        Advances the DataTableReader to the next record.
        Returns:
        true if there was another row to read; otherwise false.
      • getDepth

        public final int getDepth()
        The depth of nesting for the current row of the DataTableReader.
        Returns:
        The depth of nesting for the current row; always zero.
      • getRecordsAffected

        public final int getRecordsAffected()
        Gets the number of rows inserted, changed, or deleted by execution of the SQL statement.
        Returns:
        The DataTableReader does not support this property and always returns 0.
      • nextResult

        public final boolean nextResult()
        Advances the DataTableReader to the next result set, if any.
        Returns:
        true if there was another result set; otherwise false.
      • hasRows

        public final boolean hasRows()
        Gets a value that indicates whether the DataTableReader contains one or more rows.
        Returns:
        true if the DataTableReader contains one or more rows; otherwise false.
      • iterator

        public final java.util.Iterator iterator()
        Returns an enumerator that can be used to iterate through the item collection.
        Returns:
        An Iterator object that represents the item collection.
      • get

        public final java.lang.Object get(java.lang.String name)
        Gets the value of the specified column in its native format given the column name.
        Specified by:
        get in class DbDataReader
        Parameters:
        name - The name of the column.
        Returns:
        The value of the specified column in its native format.