Class RefinedResultBuilder


  • public final class RefinedResultBuilder
    extends java.lang.Object
    This class allows the wrapping of a result to give another result which can be controlled more.
    • Constructor Detail

      • RefinedResultBuilder

        public RefinedResultBuilder​(IQueryContext context,
                                    IStructuredResult subject)
        Build a suitable refined result given an input of IResultTable or IResultTree.
        Parameters:
        context - the context holding details about what was selected etc.
        subject - the structured result
    • Method Detail

      • getColumnIndexByName

        public int getColumnIndexByName​(java.lang.String columnName)
        Retrieve a column by name.
        Parameters:
        columnName - the name of the column
        Returns:
        the column of data
      • setSortOrder

        public void setSortOrder​(int columnIndex,
                                 Column.SortDirection direction)
        Arrange to sort the table by a particular column.
        Parameters:
        columnIndex - the index of the column to sort by
        direction - the direction to sort
      • setSortOrder

        public void setSortOrder​(int[] indices,
                                 Column.SortDirection[] directions)
        Arrange to sort the table by multiple columns.
        Parameters:
        indices - the indices to sort by
        directions - the direction to sort each index by
      • addDefaultContextDerivedColumn

        public void addDefaultContextDerivedColumn​(ContextDerivedData.DerivedOperation operation)
        Add a derived column such as for retained size.
        Parameters:
        operation - the extra operation for the new column
      • setFilter

        public void setFilter​(int columnIndex,
                              java.lang.String criteria)
                       throws java.lang.IllegalArgumentException
        Filter a particular column to only have partial data.
        Parameters:
        columnIndex - the column of interest
        criteria - how to filter that column
        Throws:
        java.lang.IllegalArgumentException - for a bad criterion
      • getColumns

        public java.util.List<Column> getColumns()
        Get all the columns
        Returns:
        An unmodifiable list of all the columns.
      • setInlineRetainedSizeCalculation

        public void setInlineRetainedSizeCalculation​(boolean inline)
      • build

        public RefinedStructuredResult build()
        Build the refined result (one time operation). The builder is not reusable.
        Returns:
        the refined result table or tree.