public class AggregationUtility<T extends org.gcube.documentstore.records.AggregatedRecord<T,?>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
aggregationFields |
protected Set<String> |
neededFields |
protected T |
t |
| Constructor and Description |
|---|
AggregationUtility(T t) |
| Modifier and Type | Method and Description |
|---|---|
T |
aggregate(T record) |
protected void |
cleanExtraFields()
Remove all fields which are not in AggregationFields nor in
AggregatedFields Sets
|
boolean |
isAggregable(T record)
Check if the record provided as argument is aggregable with the one
provided to the Constructor.
|
void |
setAggregationFields(Set<String> aggregationFields)
This function is used to set the Set of Aggregation Fields.
|
protected void |
setDefaultAggregationFields() |
protected void |
setDefaultNeededFields() |
void |
setNeededFields(Set<String> neededFields)
This function is used to set the Set of Needed Fields to keep after
aggregation.
|
public AggregationUtility(T t)
protected void setDefaultAggregationFields()
protected void setDefaultNeededFields()
public void setAggregationFields(Set<String> aggregationFields)
setNeededFields(java.util.Set<java.lang.String>)aggregationFields - public void setNeededFields(Set<String> neededFields)
setAggregationFields(java.util.Set<java.lang.String>)neededFields - public boolean isAggregable(T record)
record - to checkprotected void cleanExtraFields()
Copyright © 2017. All Rights Reserved.