Package omero.gateway.model
Class TableData
- java.lang.Object
-
- omero.gateway.model.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 instanceTableData(TableDataColumn[] columns, java.lang.Object[][] data)
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
TableDataColumn[]
getColumns()
Get the headersjava.lang.Object[][]
getData()
Get the data in form Object['column index']['row data']long
getNumberOfRows()
long
getOffset()
Get the row offset (if thisTableData
represents only a subset of the original table)long
getOriginalFileId()
Get the original file idint
hashCode()
boolean
isCompleted()
boolean
isEmpty()
void
setCompleted()
Manually set completed state (sets thenumberOfRows
to the last row in thedata
array)void
setNumberOfRows(long numberOfRows)
Set the total number of rows in the original tablevoid
setOffset(long offset)
Set the row offset (if thisTableData
represents only a subset of the original table)void
setOriginalFileId(long originalFileId)
Set the originalfile idjava.lang.String
toString()
-
-
-
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 definitionsdata
- 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 definitionsdata
- 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 thisTableData
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 thisTableData
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 thenumberOfRows
to the last row in thedata
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-