public class TuplesHandle extends BaseHandle<InputStream,OperationNotSupported> implements TuplesReadHandle, TuplesResults
A TuplesHandle represents a set of tuples returned by a query on the server.
UNKNOWN_LENGTH| Constructor and Description |
|---|
TuplesHandle() |
| Modifier and Type | Method and Description |
|---|---|
AggregateResult |
getAggregate(String name)
Returns the aggregate result for the named aggregate function.
|
AggregateResult[] |
getAggregates()
Returns an array of the aggregates.
|
ValuesMetrics |
getMetrics()
Returns performance metrics about the query.
|
String |
getName()
Returns the name of the tuples.
|
ValuesDefinition |
getQueryCriteria()
Returns the tuples query definition used to identify this set of tuples.
|
Tuple[] |
getTuples()
Returns an array of the Tuples returned by this query.
|
void |
setFormat(Format format)
Sets the format associated with this handle.
|
void |
setQueryCriteria(ValuesDefinition vdef)
Specifies the tuples query definition used to identify this set of tuples.
|
TuplesHandle |
withFormat(Format format)
Fluent setter for the format associated with this handle.
|
getByteLength, getFormat, getMimetype, getServerTimestamp, setByteLength, setMimetype, setServerTimestamppublic void setFormat(Format format)
Sets the format associated with this handle.
This handle only supports XML.
setFormat in interface ContentDescriptorsetFormat in class BaseHandle<InputStream,OperationNotSupported>format - The format, which must be Format.XML or an exception will be raised.public TuplesHandle withFormat(Format format)
Fluent setter for the format associated with this handle.
This handle only supports XML.
format - The format, which must be Format.XML or an exception will be raised.public ValuesDefinition getQueryCriteria()
Returns the tuples query definition used to identify this set of tuples.
getQueryCriteria in interface TuplesResultspublic void setQueryCriteria(ValuesDefinition vdef)
Specifies the tuples query definition used to identify this set of tuples.
vdef - The query criteria.public String getName()
TuplesResultsReturns the name of the tuples.
getName in interface TuplesResultspublic Tuple[] getTuples()
Returns an array of the Tuples returned by this query.
getTuples in interface TuplesResultspublic AggregateResult[] getAggregates()
TuplesResultsReturns an array of the aggregates.
getAggregates in interface TuplesResultspublic AggregateResult getAggregate(String name)
TuplesResultsReturns the aggregate result for the named aggregate function.
getAggregate in interface TuplesResultsname - The name of the aggregate function.public ValuesMetrics getMetrics()
TuplesResultsReturns performance metrics about the query.
getMetrics in interface TuplesResultsCopyright © 2013-2017 MarkLogic Corporation.