public class Results extends Object implements QueryResults
QueryResults.Columns, QueryResults.Statistics
Modifier and Type | Field and Description |
---|---|
static Results |
EMPTY |
FORMATTER
Constructor and Description |
---|
Results(QueryResults.Columns columns,
QueryResults.Statistics statistics,
NodeSequence rows,
CachedNodeSupplier cachedNodes,
Problems problems,
String plan)
Create a results object for the supplied context, command, and result columns and with the supplied tuples.
|
Modifier and Type | Method and Description |
---|---|
CachedNodeSupplier |
getCachedNodes()
Get the supplier with which a node can be found by key.
|
QueryResults.Columns |
getColumns()
Get the description of the columns contained in these results.
|
String |
getPlan()
Get a description of the query plan, if requested.
|
Problems |
getProblems()
Get the problems encountered during execution.
|
long |
getRowCount()
Get the number of rows in the results, if that information is available.
|
NodeSequence |
getRows()
Get the rows that make up these query results.
|
QueryResults.Statistics |
getStatistics()
Get the statistics that describe the time metrics for this query.
|
boolean |
hasErrors()
Return true if there is at least one error recorded in the
problems . |
boolean |
hasWarnings()
Return true if there is at least one warning recorded in the
problems . |
boolean |
isEmpty()
Determine whether this results is known to be empty.
|
String |
toString() |
String |
toString(TypeSystem typeSystem,
int maxTuples)
Get a string representation of this result object, with a maximum number of tuples to include.
|
void |
toString(TypeSystem typeSystem,
StringBuilder sb)
Get a string representation of this result object.
|
void |
toString(TypeSystem typeSystem,
StringBuilder sb,
int maxTuples)
Get a string representation of this result object, with a maximum number of tuples to include.
|
public static final Results EMPTY
public Results(QueryResults.Columns columns, QueryResults.Statistics statistics, NodeSequence rows, CachedNodeSupplier cachedNodes, Problems problems, String plan)
columns
- the definition of the query result columnsstatistics
- the statistics for this query; may not be nullrows
- the sequence of rows; may not be nullcachedNodes
- the supplier for obtaining cached nodes; may not be nullproblems
- the problems; may be null if there are no problemsplan
- the text representation of the query plan, if the hints asked for itpublic CachedNodeSupplier getCachedNodes()
QueryResults
getCachedNodes
in interface QueryResults
CachedNode
instances; never nullpublic QueryResults.Columns getColumns()
QueryResults
getColumns
in interface QueryResults
public NodeSequence getRows()
QueryResults
getRows
in interface QueryResults
public long getRowCount()
QueryResults
getRowCount
in interface QueryResults
public boolean isEmpty()
QueryResults
isEmpty
in interface QueryResults
public String getPlan()
QueryResults
getPlan
in interface QueryResults
public Problems getProblems()
QueryResults
getProblems
in interface QueryResults
public boolean hasErrors()
QueryResults
problems
.hasErrors
in interface QueryResults
public boolean hasWarnings()
QueryResults
problems
.hasWarnings
in interface QueryResults
public QueryResults.Statistics getStatistics()
QueryResults
getStatistics
in interface QueryResults
public String toString(TypeSystem typeSystem, int maxTuples)
typeSystem
- the type system that can be used to convert the values to a string; may be null if
Object.toString()
should be usedmaxTuples
- the maximum number of tuples to print, or Integer.MAX_VALUE
if all the tuples are to be printedpublic void toString(TypeSystem typeSystem, StringBuilder sb)
typeSystem
- the type system that can be used to convert the values to a string; may be null if
Object.toString()
should be usedsb
- the string builder to which the results should be written; may not be nullpublic void toString(TypeSystem typeSystem, StringBuilder sb, int maxTuples)
typeSystem
- the type system that can be used to convert the values to a string; may be null if
Object.toString()
should be usedsb
- the string builder to which the results should be written; may not be nullmaxTuples
- the maximum number of tuples to print, or Integer.MAX_VALUE
if all the tuples are to be printedCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.