public class CellBaseDataResponse<T> extends Object
Constructor and Description |
---|
CellBaseDataResponse() |
CellBaseDataResponse(org.opencb.commons.datastore.core.ObjectMap params,
List<CellBaseDataResult<T>> responses) |
CellBaseDataResponse(String apiVersion,
int time,
List<org.opencb.commons.datastore.core.Event> events,
org.opencb.commons.datastore.core.ObjectMap params,
List<CellBaseDataResult<T>> responses) |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(org.opencb.commons.datastore.core.Event event) |
List<T> |
allResults()
This method flats the two levels (DataResponse and DataResult) into a single list of T.
|
int |
allResultsSize() |
CellBaseDataResult<T> |
first()
This method just returns the first DataResult of response, or null if response is null or empty.
|
T |
firstResult()
This method returns the first result from the first DataResult of response, this is equivalent to response.get(0).getResult.get(0).
|
String |
getApiVersion() |
List<org.opencb.commons.datastore.core.Event> |
getEvents() |
org.opencb.commons.datastore.core.ObjectMap |
getParams() |
List<CellBaseDataResult<T>> |
getResponses() |
int |
getTime() |
CellBaseDataResult<T> |
response(int m)
Fetch the DataResult of the m-response.
|
List<CellBaseDataResult<T>> |
responses()
Fetch the list of responses.
|
T |
result(int m)
Fetch the m-result of the first response.
|
T |
result(int m,
int n)
Fetch the m-result of the n-response.
|
List<T> |
results(int m)
Fetch the list of results of the m-response.
|
CellBaseDataResponse<T> |
setApiVersion(String apiVersion) |
void |
setEvents(List<org.opencb.commons.datastore.core.Event> events) |
CellBaseDataResponse<T> |
setParams(org.opencb.commons.datastore.core.ObjectMap params) |
CellBaseDataResponse<T> |
setResponses(List<CellBaseDataResult<T>> responses) |
CellBaseDataResponse<T> |
setTime(int time) |
String |
toString() |
public CellBaseDataResponse()
public CellBaseDataResponse(org.opencb.commons.datastore.core.ObjectMap params, List<CellBaseDataResult<T>> responses)
public CellBaseDataResponse(String apiVersion, int time, List<org.opencb.commons.datastore.core.Event> events, org.opencb.commons.datastore.core.ObjectMap params, List<CellBaseDataResult<T>> responses)
public T result(int m)
m
- Position of the result from the array of results.public T result(int m, int n)
m
- Position of the result from the array of results.n
- Position of the response from the array of responses.public List<T> results(int m)
m
- Position of the response from the array of responses.public List<CellBaseDataResult<T>> responses()
public CellBaseDataResult<T> response(int m)
m
- Position of the response from the array of responses.public CellBaseDataResult<T> first()
public T firstResult()
public int allResultsSize()
public List<T> allResults()
public String getApiVersion()
public CellBaseDataResponse<T> setApiVersion(String apiVersion)
public int getTime()
public CellBaseDataResponse<T> setTime(int time)
public org.opencb.commons.datastore.core.ObjectMap getParams()
public CellBaseDataResponse<T> setParams(org.opencb.commons.datastore.core.ObjectMap params)
public List<CellBaseDataResult<T>> getResponses()
public CellBaseDataResponse<T> setResponses(List<CellBaseDataResult<T>> responses)
public List<org.opencb.commons.datastore.core.Event> getEvents()
public void setEvents(List<org.opencb.commons.datastore.core.Event> events)
public void addEvent(org.opencb.commons.datastore.core.Event event)
Copyright © 2019. All rights reserved.