public class GenericQueryResult<T> extends Object implements QueryResult<T>
Modifier and Type | Field and Description |
---|---|
protected Class<T> |
resultClass |
protected List<QueryResultItem> |
resultItems |
Constructor and Description |
---|
GenericQueryResult(List<QueryResultItem> resultItems) |
GenericQueryResult(List<QueryResultItem> resultItems,
Class<T> resultClass) |
Modifier and Type | Method and Description |
---|---|
int[] |
firstBatchUpdateCount()
A utility method for quickly retrieving the first batch update count array from the response.
|
List<T> |
firstList()
A utility method for quickly retrieving the first list in the response.
|
int |
firstUpdateCount()
A utility method for quick retrieval of the first update count from the response.
|
boolean |
isList()
Returns whether current iteration result is a list or an update count.
|
Iterator<QueryResultItem> |
iterator() |
int |
size()
Returns a number of results in the response.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected List<QueryResultItem> resultItems
public GenericQueryResult(List<QueryResultItem> resultItems)
public GenericQueryResult(List<QueryResultItem> resultItems, Class<T> resultClass)
public int size()
QueryResult
size
in interface QueryResult<T>
public boolean isList()
QueryResult
isList
in interface QueryResult<T>
public List<T> firstList()
QueryResult
firstList
in interface QueryResult<T>
public int[] firstBatchUpdateCount()
QueryResult
firstBatchUpdateCount
in interface QueryResult<T>
public int firstUpdateCount()
QueryResult
firstUpdateCount
in interface QueryResult<T>
public Iterator<QueryResultItem> iterator()
iterator
in interface Iterable<QueryResultItem>
Copyright © 2001–2018 Apache Cayenne. All rights reserved.