@NotThreadSafe public class JcrQueryResult extends Object implements QueryResult
XPathQueryResult
,
JcrSqlQueryResult
Modifier and Type | Class and Description |
---|---|
protected static class |
JcrQueryResult.MultiSelectorQueryResultRow |
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 |
static String |
JCR_NAME_COLUMN_NAME |
static String |
JCR_PATH_COLUMN_NAME |
static String |
JCR_SCORE_COLUMN_NAME |
static String |
MODE_DEPTH_COLUMN_NAME |
static String |
MODE_LOCALNAME_COLUMN_NAME |
protected static Set<String> |
PSEUDO_COLUMNS |
protected String |
queryStatement |
protected QueryResults |
results |
protected Schemata |
schemata |
Modifier | Constructor and Description |
---|---|
protected |
JcrQueryResult(JcrQueryContext context,
String query,
QueryResults graphResults,
Schemata schemata) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getColumnNameList() |
String[] |
getColumnNames() |
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.
|
protected QueryResults |
results() |
String |
toString() |
public static final String JCR_SCORE_COLUMN_NAME
public static final String JCR_PATH_COLUMN_NAME
public static final String JCR_NAME_COLUMN_NAME
public static final String MODE_LOCALNAME_COLUMN_NAME
public static final String MODE_DEPTH_COLUMN_NAME
protected final JcrQueryContext context
protected final QueryResults results
protected final Schemata schemata
protected final String queryStatement
protected JcrQueryResult(JcrQueryContext context, String query, QueryResults graphResults, Schemata schemata)
protected QueryResults results()
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
public RowIterator getRows()
getRows
in interface QueryResult
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.
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.