Class QueryResults
- java.lang.Object
- 
- java.util.AbstractCollection<E>
- 
- java.util.AbstractList<QueryResults.Row>
- 
- com.inductiveautomation.reporting.common.api.QueryResults
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Iterable<QueryResults.Row>,- java.util.Collection<QueryResults.Row>,- java.util.List<QueryResults.Row>
 
 public class QueryResults extends java.util.AbstractList<QueryResults.Row> implements java.io.Serializable This object represents the results of a query / nested query structure generated by a report's query datasource. The query results are stored in the "coreResults" dataset field, and any nested queries are stored in a map of dataKey -> QueryResults 
 It is constructed to be java.io.serializable and reportmill-friendly (meaning, it is a java.util.List<RMKey.Get>) Created by carl.gould on 2/3/2015.- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classQueryResults.RowEach row implements RMKey.Get, which knows how to retrieve a value based on column name
 - 
Constructor SummaryConstructors Constructor Description QueryResults(Dataset dataset)Create a new QueryResults with the results of a queryQueryResults(Dataset dataset, QueryResults parent, int parentRow)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNestedQueryResults(java.lang.String key, QueryResults[] results)Add results from a nested query.QueryResults.Rowget(int index)DatasetgetCoreResults()Get the results of the "core" query that created this object.java.util.TreeMap<java.lang.String,QueryResults[]>getNestedQueryResults()Get the nested query resultsjava.lang.Objectlookup(int rowIndex, java.lang.String keyName)intsize()- 
Methods inherited from class java.util.AbstractListadd, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 - 
Methods inherited from class java.util.AbstractCollectionaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
QueryResultspublic QueryResults(Dataset dataset, QueryResults parent, int parentRow) 
 - 
QueryResultspublic QueryResults(Dataset dataset) Create a new QueryResults with the results of a query
 
- 
 - 
Method Detail- 
getCoreResultspublic Dataset getCoreResults() Get the results of the "core" query that created this object. Doesn't include nested queries
 - 
getNestedQueryResultspublic java.util.TreeMap<java.lang.String,QueryResults[]> getNestedQueryResults() Get the nested query results
 - 
addNestedQueryResultspublic void addNestedQueryResults(java.lang.String key, QueryResults[] results)Add results from a nested query. The length of the results array should match the size() of this list, which is the row length of the core results dataset
 - 
getpublic QueryResults.Row get(int index) - Specified by:
- getin interface- java.util.List<QueryResults.Row>
- Specified by:
- getin class- java.util.AbstractList<QueryResults.Row>
 
 - 
sizepublic int size() - Specified by:
- sizein interface- java.util.Collection<QueryResults.Row>
- Specified by:
- sizein interface- java.util.List<QueryResults.Row>
- Specified by:
- sizein class- java.util.AbstractCollection<QueryResults.Row>
 
 - 
lookuppublic java.lang.Object lookup(int rowIndex, java.lang.String keyName)
 
- 
 
-