Class AuditFunction
java.lang.Object
org.hibernate.envers.query.criteria.AuditFunction
- All Implemented Interfaces:
AuditProjection
Create restrictions or projections using a function.
-
Constructor Summary
Constructors -
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) Apply an "equal" constrainteqFunction
(AuditFunction otherFunction) Apply an "equal" constraint to another functioneqProperty
(String propertyName) Apply an "equal" constraint to a propertyeqProperty
(String alias, String propertyName) Apply an "equal" constraint to a propertyApply a "greater than or equal" constraintgeFunction
(AuditFunction otherFunction) Apply a "greater than or equal" constraint to another functiongeProperty
(String propertyName) Apply a "greater than or equal" constraint to a propertygeProperty
(String alias, String propertyName) Apply a "greater than or equal" constraint to a propertyGet the alias associated with the audit projection.Apply a "greater than" constraintgtFunction
(AuditFunction otherFunction) Apply a "greater than" constraint to another functiongtProperty
(String propertyName) Apply a "greater than" constraint to a propertygtProperty
(String alias, String propertyName) Apply a "greater than" constraint to a propertyApply a "less than or equal" constraintleFunction
(AuditFunction otherFunction) Apply a "less than or equal" constraint to another functionleProperty
(String propertyName) Apply a "less than or equal" constraint to a propertyleProperty
(String alias, String propertyName) Apply a "less than or equal" constraint to a propertyApply a "like" constraintApply a "like" constraintApply a "less than" constraintltFunction
(AuditFunction otherFunction) Apply a "less than" constraint to another functionltProperty
(String propertyName) Apply a "less than" constraint to a propertyltProperty
(String alias, String propertyName) Apply a "less than" constraint to a propertyApply a "not equal" constraintneFunction
(AuditFunction otherFunction) Apply a "not equal" constraint to another functionneProperty
(String propertyName) Apply a "not equal" constraint to a propertyneProperty
(String alias, String propertyName) Apply a "not equal" constraint to a property
-
Constructor Details
-
AuditFunction
-
-
Method Details
-
getFunction
-
getArguments
-
eq
Apply an "equal" constraint -
ne
Apply a "not equal" constraint -
like
Apply a "like" constraint -
like
Apply a "like" constraint -
gt
Apply a "greater than" constraint -
lt
Apply a "less than" constraint -
le
Apply a "less than or equal" constraint -
ge
Apply a "greater than or equal" constraint -
eqProperty
Apply an "equal" constraint to a property -
eqProperty
Apply an "equal" constraint to a property- Parameters:
alias
- the alias of the entity which owns the property.
-
neProperty
Apply a "not equal" constraint to a property -
neProperty
Apply a "not equal" constraint to a property- Parameters:
alias
- the alias of the entity which owns the property.
-
ltProperty
Apply a "less than" constraint to a property -
ltProperty
Apply a "less than" constraint to a property- Parameters:
alias
- the alias of the entity which owns the property.
-
leProperty
Apply a "less than or equal" constraint to a property -
leProperty
Apply a "less than or equal" constraint to a property- Parameters:
alias
- the alias of the entity which owns the property.
-
gtProperty
Apply a "greater than" constraint to a property -
gtProperty
Apply a "greater than" constraint to a property- Parameters:
alias
- the alias of the entity which owns the property.
-
geProperty
Apply a "greater than or equal" constraint to a property -
geProperty
Apply a "greater than or equal" constraint to a property- Parameters:
alias
- the alias of the entity which owns the property.
-
eqFunction
Apply an "equal" constraint to another function -
neFunction
Apply a "not equal" constraint to another function -
ltFunction
Apply a "less than" constraint to another function -
leFunction
Apply a "less than or equal" constraint to another function -
gtFunction
Apply a "greater than" constraint to another function -
geFunction
Apply a "greater than or equal" constraint to another function -
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
-
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
-