Class PropertyAuditProjection
java.lang.Object
org.hibernate.envers.query.projection.internal.PropertyAuditProjection
- All Implemented Interfaces:
AuditProjection
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyAuditProjection
(String alias, PropertyNameGetter propertyNameGetter, String function, boolean distinct) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProjectionToQuery
(EnversService enversService, AuditReaderImplementor auditReader, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, String baseAlias, QueryBuilder queryBuilder) Adds an audit projection to the specified query.convertQueryResult
(EnversService enversService, EntityInstantiator entityInstantiator, String entityName, Number revision, Object value) Get the alias associated with the audit projection.
-
Constructor Details
-
PropertyAuditProjection
public PropertyAuditProjection(String alias, PropertyNameGetter propertyNameGetter, String function, boolean distinct)
-
-
Method Details
-
getAlias
Description copied from interface:AuditProjection
Get the alias associated with the audit projection.- Specified by:
getAlias
in interfaceAuditProjection
- Parameters:
baseAlias
- the base alias if one exists; may be null- Returns:
- the alias
-
addProjectionToQuery
public void addProjectionToQuery(EnversService enversService, AuditReaderImplementor auditReader, Map<String, String> aliasToEntityNameMap, Map<String, String> aliasToComponentPropertyNameMap, String baseAlias, QueryBuilder queryBuilder) Description copied from interface:AuditProjection
Adds an audit projection to the specified query.- Specified by:
addProjectionToQuery
in interfaceAuditProjection
- Parameters:
enversService
- the Envers serviceauditReader
- the audit reader implementoraliasToEntityNameMap
- the entity name alias mapbaseAlias
- the base alias, if one is specified; may be nullqueryBuilder
- the query builder
-
convertQueryResult
public Object convertQueryResult(EnversService enversService, EntityInstantiator entityInstantiator, String entityName, Number revision, Object value) - Specified by:
convertQueryResult
in interfaceAuditProjection
- Parameters:
enversService
- the Envers serviceentityInstantiator
- the entity instantiatorentityName
- the name of the entity for which the projection has been addedrevision
- the revisionvalue
- the value to convert- Returns:
- the converted value
-