Package omero.gateway.model
Class TableData
- java.lang.Object
-
- omero.gateway.model.TableData
-
public class TableData extends java.lang.ObjectA 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 booleanequals(java.lang.Object obj)TableDataColumn[]getColumns()Get the headersjava.lang.Object[][]getData()Get the data in form Object['column index']['row data']longgetNumberOfRows()longgetOffset()Get the row offset (if thisTableDatarepresents only a subset of the original table)longgetOriginalFileId()Get the original file idinthashCode()booleanisCompleted()booleanisEmpty()voidsetCompleted()Manually set completed state (sets thenumberOfRowsto the last row in thedataarray)voidsetNumberOfRows(long numberOfRows)Set the total number of rows in the original tablevoidsetOffset(long offset)Set the row offset (if thisTableDatarepresents only a subset of the original table)voidsetOriginalFileId(long originalFileId)Set the originalfile idjava.lang.StringtoString()
-
-
-
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 thisTableDatarepresents 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 thisTableDatarepresents only a subset of the original table)- Parameters:
offset- The row offset
-
isEmpty
public boolean isEmpty()
- Returns:
trueif this TableData object doesn't contain any data,falseif it does contain data.
-
isCompleted
public boolean isCompleted()
- Returns:
trueif the last available row is contained,falseif there's more data available in the original table
-
setCompleted
public void setCompleted()
Manually set completed state (sets thenumberOfRowsto the last row in thedataarray)
-
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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-