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.
| Modifier and Type | Class and Description |
|---|---|
class |
QueryResults.Row
Each row implements RMKey.Get, which knows how to retrieve a value based on column name
|
| Constructor and Description |
|---|
QueryResults(Dataset dataset)
Create a new QueryResults with the results of a query
|
QueryResults(Dataset dataset,
QueryResults parent,
int parentRow) |
| Modifier and Type | Method and 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 results
|
java.lang.Object |
lookup(int rowIndex,
java.lang.String keyName) |
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic QueryResults(Dataset dataset, QueryResults parent, int parentRow)
public QueryResults(Dataset dataset)
public Dataset getCoreResults()
public java.util.TreeMap<java.lang.String,QueryResults[]> getNestedQueryResults()
public void addNestedQueryResults(java.lang.String key,
QueryResults[] results)
public QueryResults.Row get(int index)
get in interface java.util.List<QueryResults.Row>get in class java.util.AbstractList<QueryResults.Row>public int size()
size in interface java.util.Collection<QueryResults.Row>size in interface java.util.List<QueryResults.Row>size in class java.util.AbstractCollection<QueryResults.Row>public java.lang.Object lookup(int rowIndex,
java.lang.String keyName)