public interface QueryResultsProcessor
Modifier and Type | Interface and Description |
---|---|
static class |
QueryResultsProcessor.Categorized |
static class |
QueryResultsProcessor.Hidden |
static class |
QueryResultsProcessor.QRPOptions
Results processing options
|
static class |
QueryResultsProcessor.SortOrder |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(String name)
Convenience method to add an unsorted column to the processor
|
void |
addFormula(String formula,
String columnname,
String resultsname)
Provides Domino formula language to override the data used to generate values for a
particular sort column and an input collection or set of collections.
|
void |
addNoteIds(Database parentDb,
Collection<Integer> noteIds,
String resultsname)
Adds note ids from a database to the query results processor
|
void |
addSortColumn(String name,
String title,
QueryResultsProcessor.SortOrder sortorder,
QueryResultsProcessor.Hidden ishidden,
QueryResultsProcessor.Categorized iscategorized)
Creates a single column of values to be returned when
QueryResultsProcessor execute
is performed. |
void |
executeToJSON(Appendable appendable,
Set<QueryResultsProcessor.QRPOptions> options)
Processes the input collections in the manner specified by the Sort Columns, overriding
field values with formulas specified via addFormula calls, and returns JSON output.
The JSON syntax produced by execution conforms to JSON RFC 8259. All results are output under the “StreamedResults” top element key. |
Reader |
executeToJSON(Set<QueryResultsProcessor.QRPOptions> options)
Processes the input collections in the manner specified by the Sort Columns, overriding
field values with formulas specified via addFormula calls, and returns JSON output.
The JSON syntax produced by execution conforms to JSON RFC 8259. All results are output under the “StreamedResults” top element key. |
void addColumn(String name)
name
- programmatic column namevoid addSortColumn(String name, String title, QueryResultsProcessor.SortOrder sortorder, QueryResultsProcessor.Hidden ishidden, QueryResultsProcessor.Categorized iscategorized)
QueryResultsProcessor
execute
is performed. Values for the column can be generated from a field, or a formula. Sorting order,
categorization and hidden attributes determine the returned stream of results entries.QueryResultsProcessor
.name
- The unique (within a QueryResultsProcessor instance) programmatic name of the column. If there is no override using the addFormula method call, the name provided will be treated as a field name in each database involved in the QueryResultsProcessor object. In JSON output, the name value is used the element name for each returned entry.title
- The display title of the column. Used only in generated views, the title is the UI column header.sortorder
- A constant to indicate how the column should be sorted. Values are sorted case and accent insensitively by default. Multiple sort columns can have sort orders, and each order specified is sequentially applied in the order of addSortColumn calls. Field lists (multiply-occurring field values) are compared processed using field occurrences from first to last sequentially.ishidden
- Sorts by a column value without returning the value. If true, the column cannot have a sort order of QueryResultsProcessor.SortOrder.UNORDERED
and cannot have an iscategorized value of true.iscategorized
- Categorized columns have a single entry returned for each unique value with entries containing that value nested under it. In JSON results, these nested entries are represented in arrays under each categorized unique value.void addFormula(String formula, String columnname, String resultsname)
formula
- Formula language string to be evaluated in order to supply the values for a sort columncolumnname
- String value responding the programmatic name of the sort column whose values are to be generated using the formula language suppliedresultsname
- Used to specify the input collection names to which will use the formula language to generate sort column values. Wildcards may be specified to map to multiple input collection names.void executeToJSON(Appendable appendable, Set<QueryResultsProcessor.QRPOptions> options)
appendable
- the execution result is written in JSON format into this Appendable
in small chunksoptions
- options to tweak the JSON output or null/empty for default formatReader executeToJSON(Set<QueryResultsProcessor.QRPOptions> options)
options
- options to tweak the JSON output or null/empty for default formatvoid addNoteIds(Database parentDb, Collection<Integer> noteIds, String resultsname)
parentDb
- database that contains the documentsnoteIds
- note ids, e.g. an IDTable
resultsname
- A unique name (to the QueryResultsProcessor instance) of the input. This name is used in returned entries when the origin of results is desired and in addFormula method calls to override the data used to create sorted column values.Copyright © 2019–2021 HCL. All rights reserved.