public class ValuesHandle extends BaseHandle<InputStream,OperationNotSupported> implements ValuesReadHandle, ValuesResults
A ValuesHandle represents a list of values or of tuples (combination of values for the same document) retrieved from the indexes.
UNKNOWN_LENGTH| Constructor and Description |
|---|
ValuesHandle()
Zero-argument constructor.
|
| 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 values.
|
ValuesDefinition |
getQueryCriteria()
Return the query definition for this set of results.
|
String |
getType()
Returns the type of the values.
|
CountedDistinctValue[] |
getValues()
Returns an array of the values.
|
void |
setFormat(Format format)
Sets the format associated with this handle.
|
void |
setQueryCriteria(ValuesDefinition vdef)
Sets the query definition used when retrieving values.
|
ValuesHandle |
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 ValuesHandle 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 void setQueryCriteria(ValuesDefinition vdef)
Sets the query definition used when retrieving values.
Calling this method always deletes any cached values.
vdef - The new ValuesDefinitionpublic ValuesDefinition getQueryCriteria()
ValuesResultsReturn the query definition for this set of results.
getQueryCriteria in interface ValuesResultspublic String getName()
ValuesResultsReturns the name of the values.
getName in interface ValuesResultspublic String getType()
ValuesResultsReturns the type of the values.
The type is an XSD type, for example "xs:boolean" or "xs:integer".
getType in interface ValuesResultspublic CountedDistinctValue[] getValues()
ValuesResultsReturns an array of the values.
getValues in interface ValuesResultspublic AggregateResult[] getAggregates()
ValuesResultsReturns an array of the aggregates.
getAggregates in interface ValuesResultspublic AggregateResult getAggregate(String name)
ValuesResultsReturns the aggregate result for the named aggregate function.
getAggregate in interface ValuesResultsname - The name of the aggregate function.public ValuesMetrics getMetrics()
ValuesResultsReturns performance metrics about the query.
getMetrics in interface ValuesResultsCopyright © 2013-2017 MarkLogic Corporation.