Class QueryResults
- All Implemented Interfaces:
Serializable
,Iterable<QueryResults.Row>
,Collection<QueryResults.Row>
,List<QueryResults.Row>
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Each row implements RMKey.Get, which knows how to retrieve a value based on column name -
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorsConstructorDescriptionQueryResults
(Dataset dataset) Create a new QueryResults with the results of a queryQueryResults
(Dataset dataset, QueryResults parent, int parentRow) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNestedQueryResults
(String key, QueryResults[] results) Add results from a nested query.get
(int index) Get the results of the "core" query that created this object.Get the nested query resultsint
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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
QueryResults
-
QueryResults
Create a new QueryResults with the results of a query
-
-
Method Details
-
getCoreResults
Get the results of the "core" query that created this object. Doesn't include nested queries -
getNestedQueryResults
Get the nested query results -
addNestedQueryResults
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
- Specified by:
get
in interfaceList<QueryResults.Row>
- Specified by:
get
in classAbstractList<QueryResults.Row>
-
size
public int size()- Specified by:
size
in interfaceCollection<QueryResults.Row>
- Specified by:
size
in interfaceList<QueryResults.Row>
- Specified by:
size
in classAbstractCollection<QueryResults.Row>
-
lookup
-