Represents a tabular data source that can be listed, paged and rendered as rows of cells for Kademi's reporting and query engine. Implementations wrap a saved query, an aggregation, a join of other tables, or any other data set that a report or export can consume; a Table is looked up by id via QueryManager.getTable and its methods are exported to GraalJS so report scripts can read its headers and rows directly.


Properties

PropertyReturnsDescription
descriptionStringHuman readable description of what this table contains, shown to a report author when choosing a table.
headersList<String>Column header labels for this table, in the same order as the cells produced by getRows.
tableIdStringUnique id used to look this table up via QueryManager.getTable, and to reference it from report and export configuration.

Methods

getTableId()

Returns: String

Unique id used to look this table up via QueryManager.getTable, and to reference it from report and export configuration.

getDescription()

Returns: String

Human readable description of what this table contains, shown to a report author when choosing a table.

getHeaders()

Returns: List<String>

Column header labels for this table, in the same order as the cells produced by getRows.

getRows(int start, Integer maxRows)

Returns: RowsResult

Reads a page of rows starting at the given row, discarding any progress status. Delegates to the three argument overload with a status callback that does nothing.

ParameterDescription
startthe zero based index of the first row to return
maxRowsthe maximum number of rows to return, or null for no limit

getRows(int start, Integer maxRows, Consumer<String> status)

Returns: RowsResult

Reads a page of rows starting at the given row, reporting progress through the supplied callback. This is the core method every table implementation provides; the other getRows overloads delegate to it.

ParameterDescription
startthe zero based index of the first row to return
maxRowsthe maximum number of rows to return, or null for no limit
statuscallback invoked with progress messages while the rows are being read

getRows(int start, Integer maxRows, Consumer<String> status, Map<String,Object> extraParams)

Returns: RowsResult

Reads a page of rows, optionally taking extra parameters that a specific table implementation can use to filter its results. The default implementation ignores extraParams and reads from row zero rather than the given start; implementations that use extraParams override this method directly.

ParameterDescription
startthe zero based index of the first row to return; not used by the default implementation
maxRowsthe maximum number of rows to return, or null for no limit
statuscallback invoked with progress messages while the rows are being read
extraParamsimplementation specific filter parameters; not used by the default implementation

supportsPagination()

Returns: boolean

Whether this table supports paged reads via the start and maxRows parameters of getRows. A table that returns false always returns its full result set regardless of the paging parameters supplied.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.