public final class Results<M extends java.util.Map<java.lang.String,?>>
extends java.lang.Object
implements java.lang.Iterable<M>
Dbs are not responsible for mapping from column names to json names so a Results rows and terms will use column names until they are potentially transformed by an Action.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
debugQuery |
protected int |
foundRows
The total number of rows (if known) in the Db that match the query, not the number of rows returned in this Results.
|
static java.lang.String |
LAST_QUERY |
protected java.util.List<Term> |
next
The RQL terms that will get the next page of results the DB things there are more results.
|
protected Query |
query
the query that produced these results.
|
protected java.util.List<M> |
rows
The data the query produced.
|
protected java.lang.String |
testQuery |
| Constructor and Description |
|---|
Results(Query query) |
Results(Query query,
int foundRows,
java.util.List<M> rows) |
| Modifier and Type | Method and Description |
|---|---|
int |
getFoundRows() |
java.util.List<Term> |
getNext() |
Query |
getQuery() |
M |
getRow(int index) |
java.util.List<M> |
getRows() |
java.lang.String |
getTestQuery() |
java.util.Iterator<M> |
iterator() |
Results |
setRow(int index,
M row) |
int |
size() |
Results |
withFoundRows(int foundRows) |
Results |
withNext(java.util.List<Term> next) |
Results |
withNext(Term next) |
Results |
withQuery(Query query) |
Results |
withRow(M row) |
Results |
withRows(java.util.List rows) |
Results |
withTestQuery(java.lang.String testQuery) |
public static java.lang.String LAST_QUERY
protected final java.util.List<Term> next
Dbs are not responsible for mapping from column names to json names so these terms will have column names when initially returned from the Db.
Actions should map the keys to the corresponding json name property names before returning to the caller.
protected Query query
protected java.util.List<M extends java.util.Map<java.lang.String,?>> rows
Dbs are not responsible for mapping from column names to json names so these maps will have column names keys when initially returned from the Db.
Actions should map them to the corresponding json property names before returning to the caller.
protected int foundRows
For paginated listings, foundRows generally be greater than rows.size()
protected java.lang.String debugQuery
protected java.lang.String testQuery
public Results(Query query)
public Query getQuery()
public java.util.Iterator<M> iterator()
iterator in interface java.lang.Iterable<M extends java.util.Map<java.lang.String,?>>public int size()
public M getRow(int index)
public java.util.List<M> getRows()
public Results withRows(java.util.List rows)
public java.util.List<Term> getNext()
public int getFoundRows()
public Results withFoundRows(int foundRows)
public java.lang.String getTestQuery()
public Results withTestQuery(java.lang.String testQuery)
Copyright © 2023 Rocket Partners, LLC. All rights reserved.