@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 QueryResult
public String[] getColumnTypes()
QueryResult
PropertyType
name for each of the columns in this result.QueryResult.getColumnNames()
.public String[] getSelectorNames()
getSelectorNames
in interface QueryResult
public NodeIterator getNodes() throws RepositoryException
getNodes
in interface QueryResult
RepositoryException
protected int computeDefaultSelectorIndex()
public RowIterator getRows() throws RepositoryException
getRows
in interface QueryResult
RepositoryException
public String getPlan()
QueryResult
Note 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()
QueryResult
Note 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()
QueryResult
getting the size
of the rows
or nodes
.public void close()
QueryResult
Session.logout()
method is called.close
in interface AutoCloseable
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.