|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.util.GenericResponse
public class GenericResponse
A simple serializable implementation of QueryResponse.
Field Summary | |
---|---|
protected int |
currentIndex
|
protected List |
results
|
Constructor Summary | |
---|---|
GenericResponse()
Creates an empty BaseResponse. |
|
GenericResponse(List list)
Creates a BaseResponse with a single result list. |
|
GenericResponse(QueryResponse response)
Creates a response that it a shallow copy of another response. |
Method Summary | |
---|---|
void |
addBatchUpdateCount(int[] resultCount)
|
void |
addResultList(List list)
|
void |
addUpdateCount(int resultCount)
|
void |
clear()
Clears any previously collected information. |
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 |
replaceResult(Object oldResult,
Object newResult)
Replaces previously stored result with a new result. |
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 List results
protected transient int currentIndex
Constructor Detail |
---|
public GenericResponse()
public GenericResponse(List list)
public GenericResponse(QueryResponse response)
Method Detail |
---|
public List firstList()
QueryResponse
firstList
in interface QueryResponse
public int[] firstUpdateCount()
QueryResponse
firstUpdateCount
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 isList()
QueryResponse
isList
in interface QueryResponse
public boolean next()
QueryResponse
next
in interface QueryResponse
public void reset()
QueryResponse
reset
in interface QueryResponse
public int size()
QueryResponse
size
in interface QueryResponse
public void clear()
public void addBatchUpdateCount(int[] resultCount)
public void addUpdateCount(int resultCount)
public void addResultList(List list)
public void replaceResult(Object oldResult, Object newResult)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |