@NotThreadSafe public class JcrQueryResult extends Object implements QueryResult
XPathQueryResult,
JcrSqlQueryResult| Modifier and Type | Class and Description |
|---|---|
protected static class |
JcrQueryResult.AbstractRow |
protected static class |
JcrQueryResult.MultiSelectorQueryResultRow |
protected static class |
JcrQueryResult.QueryResultIterator
The
NodeIterator implementation returned by the JcrQueryResult. |
protected static class |
JcrQueryResult.QueryResultNodeIterator
The
NodeIterator implementation returned by the JcrQueryResult. |
protected static class |
JcrQueryResult.QueryResultRowIterator
The
RowIterator implementation returned by the JcrQueryResult. |
protected static class |
JcrQueryResult.SingleSelectorQueryResultRow |
protected static class |
JcrQueryResult.SingleSelectorQueryResultRowIterator
The
RowIterator implementation returned by the JcrQueryResult. |
| Modifier and Type | Field and Description |
|---|---|
protected JcrQueryContext |
context |
protected String |
queryStatement |
protected QueryResults |
results |
| Modifier | Constructor and Description |
|---|---|
protected |
JcrQueryResult(JcrQueryContext context,
String query,
QueryResults results,
boolean restartable,
int numRowsInMemory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close and release all resources associated with these results.
|
protected int |
computeDefaultSelectorIndex() |
protected List<String> |
getColumnNameList() |
String[] |
getColumnNames() |
protected List<String> |
getColumnTypeList() |
String[] |
getColumnTypes()
Returns an array of the
PropertyType name for each of the columns in this result. |
NodeIterator |
getNodes() |
String |
getPlan()
Get a description of ModeShape's plan for executing this query.
|
RowIterator |
getRows() |
String[] |
getSelectorNames() |
Collection<String> |
getWarnings()
Get any warnings that might describe potential problems with this query.
|
boolean |
isEmpty()
Return whether the number of rows in the results is 0.
|
protected NodeSequence |
sequence() |
String |
toString() |
protected final JcrQueryContext context
protected final QueryResults results
protected final String queryStatement
protected JcrQueryResult(JcrQueryContext context, String query, QueryResults results, boolean restartable, int numRowsInMemory)
protected final NodeSequence sequence()
public String[] getColumnNames()
getColumnNames in interface QueryResultpublic String[] getColumnTypes()
QueryResultPropertyType name for each of the columns in this result.QueryResult.getColumnNames().public String[] getSelectorNames()
getSelectorNames in interface QueryResultpublic NodeIterator getNodes() throws RepositoryException
getNodes in interface QueryResultRepositoryExceptionprotected int computeDefaultSelectorIndex()
public RowIterator getRows() throws RepositoryException
getRows in interface QueryResultRepositoryExceptionpublic String getPlan()
QueryResultNote that as of ModeShape 3.1, the plan is always captured and available, though this may change in future versions. This means that clients should be written to never expect a non-null String response from this method.
public Collection<String> getWarnings()
QueryResultNote that a query that has warnings is not necessarily incorrect or potentially wrong - because of residual properties, ModeShape may produce warnings for queries that are perfectly valid.
However, if a query does not give the expected results (during development), check the warnings to see if ModeShape can suggest specific things to look at. For example, a warnings might suggest that a column might be resolved on a different selector, or that a column might have been misspelled.
public boolean isEmpty()
QueryResultgetting the size of the rows or nodes.public void close()
QueryResultSession.logout() method is called.close in interface AutoCloseableCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.