Class TableData


  • public class TableData
    extends java.lang.Object
    A simple data 'container' for an OMERO.table
    • Constructor Summary

      Constructors 
      Constructor Description
      TableData​(java.util.List<TableDataColumn> columns, java.util.List<java.util.List<java.lang.Object>> data)
      Creates a new instance
      TableData​(TableDataColumn[] columns, java.lang.Object[][] data)
      Creates a new instance
    • Constructor Detail

      • TableData

        public TableData​(java.util.List<TableDataColumn> columns,
                         java.util.List<java.util.List<java.lang.Object>> data)
        Creates a new instance
        Parameters:
        columns - The column definitions
        data - The data in form of List of columns
      • TableData

        public TableData​(TableDataColumn[] columns,
                         java.lang.Object[][] data)
        Creates a new instance
        Parameters:
        columns - The column definitions
        data - The data in form data['column index']['row data']
    • Method Detail

      • getColumns

        public TableDataColumn[] getColumns()
        Get the headers
        Returns:
        See above
      • getData

        public java.lang.Object[][] getData()
        Get the data in form Object['column index']['row data']
        Returns:
        See above
      • getOffset

        public long getOffset()
        Get the row offset (if this TableData represents only a subset of the original table)
        Returns:
        See above
      • getOriginalFileId

        public long getOriginalFileId()
        Get the original file id
        Returns:
        See above
      • setOriginalFileId

        public void setOriginalFileId​(long originalFileId)
        Set the originalfile id
        Parameters:
        originalFileId - The originalfile id
      • setOffset

        public void setOffset​(long offset)
        Set the row offset (if this TableData represents only a subset of the original table)
        Parameters:
        offset - The row offset
      • isEmpty

        public boolean isEmpty()
        Returns:
        true if this TableData object doesn't contain any data, false if it does contain data.
      • isCompleted

        public boolean isCompleted()
        Returns:
        true if the last available row is contained, false if there's more data available in the original table
      • setCompleted

        public void setCompleted()
        Manually set completed state (sets the numberOfRows to the last row in the data array)
      • getNumberOfRows

        public long getNumberOfRows()
        Returns:
        The total number of rows in the original table (this doesn't have to match data[x].length, depending on how many rows are loaded)
      • setNumberOfRows

        public void setNumberOfRows​(long numberOfRows)
        Set the total number of rows in the original table
        Parameters:
        numberOfRows - See above
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

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