public final class QueryResult extends Object implements Iterable<QueryResult.Row>
JSONObject representation of a query response coming
from a ModeShape REST Service.| Modifier and Type | Class and Description |
|---|---|
class |
QueryResult.Row
A simple representation of a result row.
|
| Modifier | Constructor and Description |
|---|---|
protected |
QueryResult(org.codehaus.jettison.json.JSONObject object)
Creates a new query result which wraps the JSON response.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getColumns()
Returns the query result columns, in the [columnName, columnType] format.
|
List<QueryResult.Row> |
getRows()
Returns the result rows.
|
boolean |
isEmpty()
Checks if this query result has any rows.
|
Iterator<QueryResult.Row> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected QueryResult(org.codehaus.jettison.json.JSONObject object)
object - a JSONObject, never nullpublic Iterator<QueryResult.Row> iterator()
iterator in interface Iterable<QueryResult.Row>public Map<String,String> getColumns()
Map, never nullpublic List<QueryResult.Row> getRows()
List of QueryResult.Row, never nullpublic boolean isEmpty()
true if there are any rows, false otherwise.Copyright © 2008–2021 JBoss, a division of Red Hat. All rights reserved.