Class AggregateBase<B extends Bucket>
- java.lang.Object
-
- org.nuxeo.ecm.platform.query.core.AggregateBase<B>
-
- All Implemented Interfaces:
Aggregate<B>
- Direct Known Subclasses:
AggregateEsBase
public class AggregateBase<B extends Bucket> extends Object implements Aggregate<B>
- Since:
- 6.0
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Bucket>bucketMapprotected List<B>bucketsprotected AggregateDefinitiondefinitionprotected List<Bucket>extendedBucketsprotected DocumentModelsearchDocumentprotected List<String>selection
-
Constructor Summary
Constructors Constructor Description AggregateBase(AggregateDefinition definition, DocumentModel searchDocument)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BucketgetBucket(String key)Map<String,Bucket>getBucketMap()List<B>getBuckets()The aggregate results.List<AggregateRangeDateDefinition>getDateRanges()Date Range definition for aggregate of type date range.List<Bucket>getExtendedBuckets()The regular list of buckets plus buckets with doc count at 0 for selected buckets which are not returned from es post filtering.StringgetField()Nuxeo field to aggregate.StringgetId()The aggregate identifier.Map<String,String>getProperties()Properties of the aggregate.List<AggregateRangeDefinition>getRanges()Range definition for aggregate of type range.DocumentModelgetSearchDocument()List<String>getSelection()The selection filter that is going to be applied to the main query as a post filter.StringgetType()Type of aggregation.StringgetXPathField()Gets the field name as defined in Nuxeo.booleanhasBucket(String key)voidresetSelection()voidsetBuckets(List<B> buckets)voidsetSelection(List<String> selection)StringtoString()
-
-
-
Field Detail
-
definition
protected final AggregateDefinition definition
-
searchDocument
protected final DocumentModel searchDocument
-
-
Constructor Detail
-
AggregateBase
public AggregateBase(AggregateDefinition definition, DocumentModel searchDocument)
-
-
Method Detail
-
getField
public String getField()
Description copied from interface:AggregateNuxeo field to aggregate.
-
getProperties
public Map<String,String> getProperties()
Description copied from interface:AggregateProperties of the aggregate.- Specified by:
getPropertiesin interfaceAggregate<B extends Bucket>
-
getRanges
public List<AggregateRangeDefinition> getRanges()
Description copied from interface:AggregateRange definition for aggregate of type range.
-
getDateRanges
public List<AggregateRangeDateDefinition> getDateRanges()
Description copied from interface:AggregateDate Range definition for aggregate of type date range.- Specified by:
getDateRangesin interfaceAggregate<B extends Bucket>
-
getSelection
public List<String> getSelection()
Description copied from interface:AggregateThe selection filter that is going to be applied to the main query as a post filter.- Specified by:
getSelectionin interfaceAggregate<B extends Bucket>
-
setSelection
public void setSelection(List<String> selection)
- Specified by:
setSelectionin interfaceAggregate<B extends Bucket>
-
getBuckets
public List<B> getBuckets()
Description copied from interface:AggregateThe aggregate results.- Specified by:
getBucketsin interfaceAggregate<B extends Bucket>
-
getExtendedBuckets
public List<Bucket> getExtendedBuckets()
Description copied from interface:AggregateThe regular list of buckets plus buckets with doc count at 0 for selected buckets which are not returned from es post filtering.- Specified by:
getExtendedBucketsin interfaceAggregate<B extends Bucket>
-
setBuckets
public void setBuckets(List<B> buckets)
- Specified by:
setBucketsin interfaceAggregate<B extends Bucket>
-
getSearchDocument
public DocumentModel getSearchDocument()
-
hasBucket
public boolean hasBucket(String key)
-
resetSelection
public void resetSelection()
- Specified by:
resetSelectionin interfaceAggregate<B extends Bucket>
-
getXPathField
public String getXPathField()
Description copied from interface:AggregateGets the field name as defined in Nuxeo.In Nuxeo the separator for a complex type is the `/` character, in a case where our
Aggregateimplementation defines a field as `file:content.mime-type`, this method should return `file:content/mime-type`.- Specified by:
getXPathFieldin interfaceAggregate<B extends Bucket>
-
-