com.groupdocs.assembly.system.data

Class DataRow

  • java.lang.Object
    • com.groupdocs.assembly.system.data.DataRow


  • public class DataRow
    extends java.lang.Object
    Represents a row of data in a DataTable.
    • Constructor Detail

      • DataRow

        protected DataRow(DataTable table)
        Initializes a new instance of this class.
    • Method Detail

      • readFrom

        public boolean readFrom(java.sql.ResultSet resultSet)
                         throws java.sql.SQLException
        Reads values from the ResultSet
        Parameters:
        resultSet - storage to read from
        Returns:
        true if no read errors occurred
        Throws:
        java.sql.SQLException - if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
      • get

        public java.lang.Object get(int columnIndex)
        Gets the data stored in the column specified by index.
        Parameters:
        columnIndex - The zero-based index of the column.
        Returns:
        An Object that contains the data.
      • get

        public java.lang.Object get(java.lang.String columnName)
        Gets the data stored in the column specified by name.
        Parameters:
        columnName - The name of the column.
        Returns:
        An Object that contains the data.
      • get

        public java.lang.Object get(DataColumn column)
        Gets the data stored in the specified DataColumn.
        Parameters:
        column - A DataColumn that contains the data.
        Returns:
        An Object that contains the data.
      • getTable

        public DataTable getTable()
        Gets the DataTable for which this row has a schema.
        Returns:
        The DataTable to which this row belongs.
      • set

        public void set(int value,
                        java.lang.Object columnIndex)
        Sets the data stored in the column specified by index.
        Parameters:
        value - An Object that contains the data.
        columnIndex - The zero-based index of the column.
      • set

        public void set(java.lang.String value,
                        java.lang.Object columnName)
        Sets the data stored in the column specified by name.
        Parameters:
        value - An Object that contains the data.
        columnName - The name of the column.
      • set

        public void set(DataColumn value,
                        java.lang.Object column)
        Sets the data stored in the specified DataColumn.
        Parameters:
        value - An Object that contains the data.
        column - A DataColumn that contains the data.
      • getRowState

        public int getRowState()
        Gets the current state of the row with regard to its relationship to the DataRowCollection.
        Returns:
        One of the DataRowState values. The returned value is a bitwise combination of DataRowState constants.
      • setRowState

        public void setRowState(int state)
      • delete

        public void delete()
        Deletes the DataRow.
      • setOriginalValue

        public void setOriginalValue(java.lang.String columnName,
                                     java.lang.Object data)
      • getOriginalValue

        public java.lang.Object getOriginalValue(java.lang.String columnName)
      • getItemArray

        public java.lang.Object[] getItemArray()
        Gets all the values for this row through an array.
        Returns:
        An array of type Object.
      • setItemArray

        public void setItemArray(java.lang.Object[] value)
        Sets all the values for this row through an array.
        Parameters:
        value - An array of type Object.
      • getKeyValues

        public java.lang.Object[] getKeyValues(DataKey childKey)
      • remove

        public void remove(int index)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object