Table implementation backed by a registered KCriteria builder, rendering the result of running that criteria query as rows with one column per configured property path. Created from XStream persisted configuration (aliased "table") or ad hoc through QueriesFolder.createCriteriaQuery, then saved via QueryManager.saveTable and looked up like any other Table when a report runs.

Implements: Table


Properties

PropertyReturnsDescription
descriptionStringDescription for this table. Always returns null, as criteria tables do not carry a separate description.
headersList<String>Column header labels, one per configured column, taken from each column's text.
tableIdStringThe table id, matching the id of the KCriteria builder this table runs and the key it is looked up under via QueryManager.getTable.

Inherited from Table

Methods

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, 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.


Methods

getTableId()

Returns: String

The table id, matching the id of the KCriteria builder this table runs and the key it is looked up under via QueryManager.getTable.

getDescription()

Returns: String

Description for this table. Always returns null, as criteria tables do not carry a separate description.

getHeaders()

Returns: List<String>

Column header labels, one per configured column, taken from each column's text.

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

Returns: RowsResult

Runs the registered KCriteria builder matching this table's id with the given paging, then evaluates each configured column's property path against every result item, using MvelTemplater, to build the output rows.

ParameterDescription
startthe zero based index of the first row to return
maxRowsthe maximum number of rows to return, or null for no limit
statusprogress callback; not used by this implementation
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.