|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.labkey.remoteapi.CommandResponse
org.labkey.remoteapi.query.RowsResponse
public abstract class RowsResponse
Base class for command responses that contain an array of rows and meta-data about those rows. Primarily, this class converts date values in the rows array to real Java Date objects.
| Constructor Summary | |
|---|---|
protected |
RowsResponse(java.lang.String text,
int statusCode,
java.lang.String contentType,
org.json.simple.JSONObject json,
Command sourceCommand)
Constructs a new RowsResponse given the specified text and status code. |
| Method Summary | |
|---|---|
protected void |
caseInsensitizeRowMaps()
|
protected void |
fixupParsedData()
Fixes up the parsed data. |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getRows()
Returns the list of rows from the parsed response data. |
| Methods inherited from class org.labkey.remoteapi.CommandResponse |
|---|
findObject, getContentType, getParsedData, getProperty, getProperty, getRequiredVersion, getSourceCommand, getStatusCode, getText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected RowsResponse(java.lang.String text,
int statusCode,
java.lang.String contentType,
org.json.simple.JSONObject json,
Command sourceCommand)
text - The response text.statusCode - The HTTP status code.contentType - the Content-Type header value.json - The parsed JSONObject (or null if JSON was not returned.sourceCommand - The source command object| Method Detail |
|---|
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getRows()
for (Map<String,Object> row : response.getRows())
{
Number key = (Number)row.get("Key");
// use Number.intValue(), doubleValue(), longValue(), etc to get various primitive types
}
protected void fixupParsedData()
protected void caseInsensitizeRowMaps()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||