|
ModeShape Distribution 3.5.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.query.JcrQueryResult
@NotThreadSafe public class JcrQueryResult
The results of a query. This is not thread-safe because it relies upon JcrSession, which is not thread-safe. Also, although the results of a query never change, the objects returned by the iterators may vary if the session information changes.
XPathQueryResult
,
JcrSqlQueryResult
Nested Class Summary | |
---|---|
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 . |
Field Summary | |
---|---|
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
|
Constructor Summary | |
---|---|
protected |
JcrQueryResult(JcrQueryContext context,
String query,
QueryResults graphResults,
Schemata schemata)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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 static final Set<String> PSEUDO_COLUMNS
protected final JcrQueryContext context
protected final QueryResults results
protected final Schemata schemata
protected final String queryStatement
Constructor Detail |
---|
protected JcrQueryResult(JcrQueryContext context, String query, QueryResults graphResults, Schemata schemata)
Method Detail |
---|
protected QueryResults results()
public List<String> getColumnNameList()
public List<String> getColumnTypeList()
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.
public String toString()
toString
in class Object
|
ModeShape Distribution 3.5.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |