Class EntityAuditProjection
- java.lang.Object
-
- org.hibernate.envers.query.projection.internal.EntityAuditProjection
-
- All Implemented Interfaces:
AuditProjection
public class EntityAuditProjection extends Object implements AuditProjection
-
-
Constructor Summary
Constructors Constructor Description EntityAuditProjection(String alias, boolean distinct)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProjectionToQuery(EnversService enversService, AuditReaderImplementor auditReader, Map<String,String> aliasToEntityNameMap, Map<String,String> aliasToComponentPropertyNameMap, String baseAlias, QueryBuilder queryBuilder)Adds an audit projection to the specified query.ObjectconvertQueryResult(EnversService enversService, EntityInstantiator entityInstantiator, String entityName, Number revision, Object value)StringgetAlias(String baseAlias)Get the alias associated with the audit projection.
-
-
-
Constructor Detail
-
EntityAuditProjection
public EntityAuditProjection(String alias, boolean distinct)
-
-
Method Detail
-
getAlias
public String getAlias(String baseAlias)
Description copied from interface:AuditProjectionGet the alias associated with the audit projection.- Specified by:
getAliasin 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:AuditProjectionAdds an audit projection to the specified query.- Specified by:
addProjectionToQueryin 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:
convertQueryResultin 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
-
-