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>
bucketMap
protected List<B>
buckets
protected AggregateDefinition
definition
protected List<Bucket>
extendedBuckets
protected DocumentModel
searchDocument
protected 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 Bucket
getBucket(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.String
getField()
Nuxeo field to aggregate.String
getId()
The aggregate identifier.Map<String,String>
getProperties()
Properties of the aggregate.List<AggregateRangeDefinition>
getRanges()
Range definition for aggregate of type range.DocumentModel
getSearchDocument()
List<String>
getSelection()
The selection filter that is going to be applied to the main query as a post filter.String
getType()
Type of aggregation.String
getXPathField()
Gets the field name as defined in Nuxeo.boolean
hasBucket(String key)
void
resetSelection()
void
setBuckets(List<B> buckets)
void
setSelection(List<String> selection)
String
toString()
-
-
-
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:Aggregate
Nuxeo field to aggregate.
-
getProperties
public Map<String,String> getProperties()
Description copied from interface:Aggregate
Properties of the aggregate.- Specified by:
getProperties
in interfaceAggregate<B extends Bucket>
-
getRanges
public List<AggregateRangeDefinition> getRanges()
Description copied from interface:Aggregate
Range definition for aggregate of type range.
-
getDateRanges
public List<AggregateRangeDateDefinition> getDateRanges()
Description copied from interface:Aggregate
Date Range definition for aggregate of type date range.- Specified by:
getDateRanges
in interfaceAggregate<B extends Bucket>
-
getSelection
public List<String> getSelection()
Description copied from interface:Aggregate
The selection filter that is going to be applied to the main query as a post filter.- Specified by:
getSelection
in interfaceAggregate<B extends Bucket>
-
setSelection
public void setSelection(List<String> selection)
- Specified by:
setSelection
in interfaceAggregate<B extends Bucket>
-
getBuckets
public List<B> getBuckets()
Description copied from interface:Aggregate
The aggregate results.- Specified by:
getBuckets
in interfaceAggregate<B extends Bucket>
-
getExtendedBuckets
public List<Bucket> getExtendedBuckets()
Description copied from interface:Aggregate
The regular list of buckets plus buckets with doc count at 0 for selected buckets which are not returned from es post filtering.- Specified by:
getExtendedBuckets
in interfaceAggregate<B extends Bucket>
-
setBuckets
public void setBuckets(List<B> buckets)
- Specified by:
setBuckets
in interfaceAggregate<B extends Bucket>
-
getSearchDocument
public DocumentModel getSearchDocument()
-
hasBucket
public boolean hasBucket(String key)
-
resetSelection
public void resetSelection()
- Specified by:
resetSelection
in interfaceAggregate<B extends Bucket>
-
getXPathField
public String getXPathField()
Description copied from interface:Aggregate
Gets the field name as defined in Nuxeo.In Nuxeo the separator for a complex type is the `/` character, in a case where our
Aggregate
implementation defines a field as `file:content.mime-type`, this method should return `file:content/mime-type`.- Specified by:
getXPathField
in interfaceAggregate<B extends Bucket>
-
-