|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.cayenne.util.ListResponse
public class ListResponse
A QueryResponse optimized to hold a single object or data row list.
| Field Summary | |
|---|---|
protected int |
currentIndex
|
protected java.util.List |
objectList
|
| Constructor Summary | |
|---|---|
ListResponse()
Creates an empty response. |
|
ListResponse(java.util.List objectList)
|
|
ListResponse(java.lang.Object object)
|
|
| Method Summary | |
|---|---|
java.util.List |
currentList()
Returns a List under the current iterator position. |
int[] |
currentUpdateCount()
Returns an update count under the current iterator position. |
java.util.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List objectList
protected transient int currentIndex
| Constructor Detail |
|---|
public ListResponse()
public ListResponse(java.lang.Object object)
public ListResponse(java.util.List objectList)
| Method Detail |
|---|
public int size()
QueryResponse
size in interface QueryResponsepublic boolean isList()
QueryResponse
isList in interface QueryResponsepublic java.util.List currentList()
QueryResponseQueryResponse.isList() to check
the result type before calling this method.
currentList in interface QueryResponsepublic int[] currentUpdateCount()
QueryResponseQueryResponse.isList() to check the result type before calling this
method.
currentUpdateCount in interface QueryResponsepublic boolean next()
QueryResponse
next in interface QueryResponsepublic void reset()
QueryResponse
reset in interface QueryResponsepublic java.util.List firstList()
QueryResponse
firstList in interface QueryResponsepublic int[] firstUpdateCount()
QueryResponse
firstUpdateCount in interface QueryResponse
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||