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 -
Constructor Summary
ConstructorsConstructorDescriptionAggregatedAuditExpression
(String alias, PropertyNameGetter propertyNameGetter, AggregatedAuditExpression.AggregatedMode mode) -
Method Summary
Modifier and TypeMethodDescriptionadd
(AuditCriterion criterion) void
addToQuery
(EnversService enversService, AuditReaderImplementor versionsReader, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, String baseAlias, QueryBuilder qb, Parameters parameters) Compute aggregated expression in the context of each entity instance separately.
-
Constructor Details
-
AggregatedAuditExpression
public AggregatedAuditExpression(String alias, PropertyNameGetter propertyNameGetter, AggregatedAuditExpression.AggregatedMode mode)
-
-
Method Details
-
add
- 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
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).
-