com.tibbo.aggregate.common.datatable

## Class ResultSetDataTable

- java.lang.Object
- - com.tibbo.aggregate.common.datatable.AbstractDataTable
  - - com.tibbo.aggregate.common.datatable.AbstractBigDataTable
    - - com.tibbo.aggregate.common.datatable.ResultSetDataTable

- All Implemented Interfaces:
    DataTable, AttributedObject, PublicCloneable, StringEncodable, java.lang.Cloneable, java.lang.Iterable<DataRecord>

      public class ResultSetDataTable
      extends AbstractBigDataTable

- - ### Field Summary

    - ### Fields inherited from class com.tibbo.aggregate.common.datatable.AbstractDataTable

      `DEFAULT_FORMAT, ELEMENT_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResultSetDataTable(java.sql.ResultSet resultSet)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DataRecord` | `addRecord()` Adds new record to the table.
    `DataTable` | `addRecord(DataRecord record)` Adds new record to the table.
    `DataTable` | `addRecord(int index, DataRecord record)` Adds new record to the table at the specified index.
    `DataRecord` | `addRecord(java.lang.Object... fieldValues)` Adds new record to the table.
    `DataTable` | `clone()` Creates a `SimpleDataTable` that contains same records (in the sense of the object equality but not necessarily the referential equality) as represented by this data table at the moment of cloning.
    `void` | `close()`
    `java.lang.String` | `dataAsString(boolean showFieldNames, boolean showHiddenFields, boolean showPasswords)`
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.Integer` | `findIndex(DataTableQuery query)`
    `DataRecord` | `getRecord(int number)` Returns record with specified index.
    `int` | `hashCode()`
    `boolean` | `isOneCellTable()` Returns true if table has exactly one record and one field.
    `java.util.Iterator<DataRecord>` | `iterator()`
    `java.util.Iterator<DataRecord>` | `iterator(int index)`
    `protected DataRecord` | `removeRecordImpl(int index)`
    `void` | `removeRecords(DataRecord rec)` Removes all records equal to the rec parameter from the table.
    `void` | `reorderRecord(DataRecord record, int index)` Moves specified record to position specified by `index` argument.
    `java.util.List<DataRecord>` | `selectAll(DataTableQuery query)`
    `DataTable` | `setRecord(int index, DataRecord record)` Replaces record at the specified index.
    `void` | `sort(java.util.Comparator<DataRecord> comparator)`
    `void` | `sort(DataTableSorter sorter)`
    `void` | `splitFormat()`
    `java.lang.String` | `toDefaultString()`
    `void` | `validate(Context context, ContextManager contextManager, CallerController caller)` Executes table validators to make sure table data is valid.

    - ### Methods inherited from class com.tibbo.aggregate.common.datatable.AbstractBigDataTable

      `compareTo, decrementRecordCount, getRecordCount, incrementRecordCount, isSimple, makeImmutable, setId, setRecordCount, toSimpleDataTable`

    - ### Methods inherited from class com.tibbo.aggregate.common.datatable.AbstractDataTable

      `addRecords, append, applyCachedFormat, cloneIfImmutable, conform, conformMessage, dataAsString, dataAsString, encode, encode, encode, encode, findIndex, findIndex, fixRecords, get, getDescription, getEncodedData, getEncodedData, getFieldCount, getFormat, getFormat, getFormat, getId, getInvalidationMessage, getQuality, getRecordById, getRecords, getTimestamp, getValue, hasField, isImmutable, isInvalid, joinFormats, rec, removeRecord, removeRecordsByIds, select, select, setFormat, setInvalidationMessage, setQuality, setTimestamp, sort, stream, swapRecords, toString, validateRecord`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### ResultSetDataTable

          public ResultSetDataTable(java.sql.ResultSet resultSet)

  - ### Method Detail

    - #### addRecord

          public DataTable addRecord(DataRecord record)

      Adds new record to the table.

    - #### splitFormat

          public void splitFormat()

      Specified by:
        `splitFormat` in interface `DataTable`
      Overrides:
        `splitFormat` in class `AbstractDataTable`

    - #### addRecord

          public DataRecord addRecord(java.lang.Object... fieldValues)

      Adds new record to the table.

    - #### addRecord

          public DataTable addRecord(int index,
                                     DataRecord record)

      Description copied from interface: `DataTable`
      Adds new record to the table at the specified index.

    - #### addRecord

          public DataRecord addRecord()

      Description copied from interface: `DataTable`
      Adds new record to the table.

    - #### removeRecordImpl

          protected DataRecord removeRecordImpl(int index)

      Specified by:
        `removeRecordImpl` in class `AbstractDataTable`

    - #### validate

          public void validate(Context context,
                               ContextManager contextManager,
                               CallerController caller)
                        throws DataTableException

      Description copied from interface: `DataTable`
      Executes table validators to make sure table data is valid. Throws an error if validation fails.
      Specified by:
        `validate` in interface `DataTable`
      Overrides:
        `validate` in class `AbstractDataTable`
      Throws:
        `DataTableException`

    - #### setRecord

          public DataTable setRecord(int index,
                                     DataRecord record)

      Replaces record at the specified index.

    - #### getRecord

          public DataRecord getRecord(int number)

      Returns record with specified index.

    - #### removeRecords

          public void removeRecords(DataRecord rec)

      Removes all records equal to the rec parameter from the table.

    - #### reorderRecord

          public void reorderRecord(DataRecord record,
                                    int index)

      Description copied from interface: `DataTable`
      Moves specified record to position specified by `index` argument. `record`must belong to this table, otherwise method will throw an `IllegalStateException```

    - #### equals

          public boolean equals(java.lang.Object obj)

      Specified by:
        `equals` in interface `DataTable`
      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `DataTable`
      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toDefaultString

          public java.lang.String toDefaultString()

    - #### dataAsString

          public java.lang.String dataAsString(boolean showFieldNames,
                                               boolean showHiddenFields,
                                               boolean showPasswords)

    - #### isOneCellTable

          public boolean isOneCellTable()

      Returns true if table has exactly one record and one field.

    - #### selectAll

          public java.util.List<DataRecord> selectAll(DataTableQuery query)

      Specified by:
        `selectAll` in interface `DataTable`
      Overrides:
        `selectAll` in class `AbstractDataTable`

    - #### findIndex

          public java.lang.Integer findIndex(DataTableQuery query)

    - #### sort

          public void sort(DataTableSorter sorter)

    - #### sort

          public void sort(java.util.Comparator<DataRecord> comparator)

    - #### iterator

          public java.util.Iterator<DataRecord> iterator()

    - #### iterator

          public java.util.Iterator<DataRecord> iterator(int index)

    - #### clone

          public DataTable clone()

      Creates a `SimpleDataTable` that contains same records (in the sense of the object equality but not necessarily the referential equality) as represented by this data table at the moment of cloning. Does NOT call `super.clone()`
      Specified by:
        `clone` in interface `DataTable`
      Specified by:
        `clone` in interface `PublicCloneable`
      Overrides:
        `clone` in class `AbstractBigDataTable`

    - #### close

          public void close()

      Specified by:
        `close` in interface `DataTable`
      Overrides:
        `close` in class `AbstractDataTable`