org.wso2.carbon.dataservices.sql.driver.processor.reader

## Class DataTable

- java.lang.Object
- - org.wso2.carbon.dataservices.sql.driver.processor.reader.DataTable

- Direct Known Subclasses:
    FixedDataTable

      public abstract class DataTable
      extends Object

  This interface represents a data table the parser will work on.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataTable(String tableName, boolean hasHeader)`
    `DataTable(String tableName, ColumnInfo[] headers)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `addRow(DataRow dataRow)`
    `abstract Map<Integer,DataRow>` | `applyCondition(String column, String value, String operator)`
    `abstract void` | `deleteRows(int... rowIds)`
    `ColumnInfo` | `getHeader(String name)`
    `ColumnInfo[]` | `getHeaders()`
    `abstract Map<Integer,DataRow>` | `getRows()`
    `String` | `getTableName()`
    `boolean` | `hasHeader()`
    `void` | `setHeaders(ColumnInfo[] headers)`
    `abstract void` | `updateRows(DataRow... dataRows)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DataTable

          public DataTable(String tableName,
                           boolean hasHeader)

    - #### DataTable

          public DataTable(String tableName,
                           ColumnInfo[] headers)

  - ### Method Detail

    - #### getRows

          public abstract Map<Integer,DataRow> getRows()
                                                throws SQLException

      Throws:
        `SQLException`

    - #### addRow

          public abstract void addRow(DataRow dataRow)
                               throws SQLException

      Throws:
        `SQLException`

    - #### updateRows

          public abstract void updateRows(DataRow... dataRows)
                                   throws SQLException

      Throws:
        `SQLException`

    - #### deleteRows

          public abstract void deleteRows(int... rowIds)
                                   throws SQLException

      Throws:
        `SQLException`

    - #### applyCondition

          public abstract Map<Integer,DataRow> applyCondition(String column,
                                                              String value,
                                                              String operator)
                                                       throws SQLException

      Throws:
        `SQLException`

    - #### getTableName

          public String getTableName()

    - #### getHeaders

          public ColumnInfo[] getHeaders()
                                  throws SQLException

      Throws:
        `SQLException`

    - #### setHeaders

          public void setHeaders(ColumnInfo[] headers)

    - #### hasHeader

          public boolean hasHeader()

    - #### getHeader

          public ColumnInfo getHeader(String name)
                               throws SQLException

      Throws:
        `SQLException`

Copyright © 2023 WSO2. All rights reserved.