Class AggregatedAuditExpression
- java.lang.Object
-
- org.hibernate.envers.query.criteria.AggregatedAuditExpression
-
- All Implemented Interfaces:
AuditCriterion
,ExtendableCriterion
public class AggregatedAuditExpression extends Object implements AuditCriterion, ExtendableCriterion
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AggregatedAuditExpression.AggregatedMode
-
Constructor Summary
Constructors Constructor Description AggregatedAuditExpression(String alias, PropertyNameGetter propertyNameGetter, AggregatedAuditExpression.AggregatedMode mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AggregatedAuditExpression
add(AuditCriterion criterion)
void
addToQuery(EnversService enversService, AuditReaderImplementor versionsReader, Map<String,String> aliasToEntityNameMap, Map<String,String> aliasToComponentPropertyNameMap, String baseAlias, QueryBuilder qb, Parameters parameters)
AggregatedAuditExpression
computeAggregationInInstanceContext()
Compute aggregated expression in the context of each entity instance separately.
-
-
-
Constructor Detail
-
AggregatedAuditExpression
public AggregatedAuditExpression(String alias, PropertyNameGetter propertyNameGetter, AggregatedAuditExpression.AggregatedMode mode)
-
-
Method Detail
-
add
public AggregatedAuditExpression add(AuditCriterion criterion)
- Specified by:
add
in interfaceExtendableCriterion
-
addToQuery
public void addToQuery(EnversService enversService, AuditReaderImplementor versionsReader, Map<String,String> aliasToEntityNameMap, Map<String,String> aliasToComponentPropertyNameMap, String baseAlias, QueryBuilder qb, Parameters parameters)
- Specified by:
addToQuery
in interfaceAuditCriterion
-
computeAggregationInInstanceContext
public AggregatedAuditExpression computeAggregationInInstanceContext()
Compute aggregated expression in the context of each entity instance separately. Useful for retrieving latest revisions of all entities of a particular type.
Implementation note: Correlates subquery with the outer query by entity id.- Returns:
- this (for method chaining).
-
-