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
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
QueryResults.Row
Each row implements RMKey.Get, which knows how to retrieve a value based on column name
-
Constructor Summary
Constructors Constructor Description QueryResults(Dataset dataset)
Create a new QueryResults with the results of a queryQueryResults(Dataset dataset, QueryResults parent, int parentRow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNestedQueryResults(java.lang.String key, QueryResults[] results)
Add results from a nested query.QueryResults.Row
get(int index)
Dataset
getCoreResults()
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.Object
lookup(int rowIndex, java.lang.String keyName)
int
size()
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
QueryResults
public QueryResults(Dataset dataset, QueryResults parent, int parentRow)
-
QueryResults
public QueryResults(Dataset dataset)
Create a new QueryResults with the results of a query
-
-
Method Detail
-
getCoreResults
public Dataset getCoreResults()
Get the results of the "core" query that created this object. Doesn't include nested queries
-
getNestedQueryResults
public java.util.TreeMap<java.lang.String,QueryResults[]> getNestedQueryResults()
Get the nested query results
-
addNestedQueryResults
public 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
-
get
public QueryResults.Row get(int index)
- Specified by:
get
in interfacejava.util.List<QueryResults.Row>
- Specified by:
get
in classjava.util.AbstractList<QueryResults.Row>
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<QueryResults.Row>
- Specified by:
size
in interfacejava.util.List<QueryResults.Row>
- Specified by:
size
in classjava.util.AbstractCollection<QueryResults.Row>
-
lookup
public java.lang.Object lookup(int rowIndex, java.lang.String keyName)
-
-