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 TypeClassDescriptionclassEach 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 TypeMethodDescriptionvoidaddNestedQueryResults(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 resultsintsize()Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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:
getin interfaceList<QueryResults.Row>- Specified by:
getin classAbstractList<QueryResults.Row>
-
size
public int size()- Specified by:
sizein interfaceCollection<QueryResults.Row>- Specified by:
sizein interfaceList<QueryResults.Row>- Specified by:
sizein classAbstractCollection<QueryResults.Row>
-
lookup
-