public final class RefinedResultBuilder extends Object
| Constructor and Description |
|---|
RefinedResultBuilder(IQueryContext context,
IStructuredResult subject)
Build a suitable refined result given an input of IResultTable or IResultTree.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContextDerivedColumn(ContextProvider provider,
ContextDerivedData.DerivedOperation operation) |
void |
addDefaultContextDerivedColumn(ContextDerivedData.DerivedOperation operation)
Add a derived column such as for retained size.
|
RefinedStructuredResult |
build()
Build the refined result (one time operation).
|
int |
getColumnIndexByName(String columnName)
Retrieve a column by name.
|
List<Column> |
getColumns()
Get all the columns
|
void |
setFilter(int columnIndex,
String criteria)
Filter a particular column to only have partial data.
|
void |
setInlineRetainedSizeCalculation(boolean inline) |
void |
setSortOrder(int[] indices,
Column.SortDirection[] directions)
Arrange to sort the table by multiple columns.
|
void |
setSortOrder(int columnIndex,
Column.SortDirection direction)
Arrange to sort the table by a particular column.
|
public RefinedResultBuilder(IQueryContext context, IStructuredResult subject)
context - the context holding details about what was selected etc.subject - the structured resultpublic int getColumnIndexByName(String columnName)
columnName - the name of the columnpublic void setSortOrder(int columnIndex,
Column.SortDirection direction)
columnIndex - the index of the column to sort bydirection - the direction to sortpublic void setSortOrder(int[] indices,
Column.SortDirection[] directions)
indices - the indices to sort bydirections - the direction to sort each index bypublic void addDefaultContextDerivedColumn(ContextDerivedData.DerivedOperation operation)
operation - the extra operation for the new columnpublic void addContextDerivedColumn(ContextProvider provider, ContextDerivedData.DerivedOperation operation)
public void setFilter(int columnIndex,
String criteria)
throws IllegalArgumentException
columnIndex - the column of interestcriteria - how to filter that columnIllegalArgumentException - for a bad criterionpublic List<Column> getColumns()
public void setInlineRetainedSizeCalculation(boolean inline)
public RefinedStructuredResult build()