public class ListResponse extends Object implements QueryResponse, Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
currentIndex |
protected List |
objectList |
Constructor and Description |
---|
ListResponse()
Creates an empty response.
|
ListResponse(List objectList) |
ListResponse(Object object) |
Modifier and Type | Method and Description |
---|---|
List |
currentList()
Returns a List under the current iterator position.
|
int[] |
currentUpdateCount()
Returns an update count under the current iterator position.
|
List |
firstList()
A utility method for quickly retrieving the first list in the response.
|
int[] |
firstUpdateCount()
A utility method for quickly retrieving the first update count from the response.
|
boolean |
isList()
Returns whether current iteration result is a list or an update count.
|
boolean |
next()
Rewinds response iterator to the next result, returning true if it is available.
|
void |
reset()
Restarts response iterator.
|
int |
size()
Returns a number of results in the response.
|
protected List objectList
protected transient int currentIndex
public ListResponse()
public ListResponse(Object object)
public ListResponse(List objectList)
public int size()
QueryResponse
size
in interface QueryResponse
public boolean isList()
QueryResponse
isList
in interface QueryResponse
public List currentList()
QueryResponse
QueryResponse.isList()
to check
the result type before calling this method.currentList
in interface QueryResponse
public int[] currentUpdateCount()
QueryResponse
QueryResponse.isList()
to check the result type before calling this
method.currentUpdateCount
in interface QueryResponse
public boolean next()
QueryResponse
next
in interface QueryResponse
public void reset()
QueryResponse
reset
in interface QueryResponse
public List firstList()
QueryResponse
firstList
in interface QueryResponse
public int[] firstUpdateCount()
QueryResponse
firstUpdateCount
in interface QueryResponse
Copyright © 2001–2019 Apache Cayenne. All rights reserved.