Class AuditProperty<T>
- java.lang.Object
-
- org.hibernate.envers.query.criteria.AuditProperty<T>
-
- All Implemented Interfaces:
AuditProjection
- Direct Known Subclasses:
AuditId
public class AuditProperty<T> extends java.lang.Object implements AuditProjection
Create restrictions, projections and specify order for a property of an audited entity.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.envers.query.projection.AuditProjection
AuditProjection.ProjectionData
-
-
Constructor Summary
Constructors Constructor Description AuditProperty(java.lang.String alias, org.hibernate.envers.query.internal.property.PropertyNameGetter propertyNameGetter)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AuditOrderasc()Sort the results by the property in ascending orderAuditCriterionbetween(T lo, T hi)Apply a "between" constraintjava.lang.ObjectconvertQueryResult(org.hibernate.envers.boot.internal.EnversService enversService, org.hibernate.envers.internal.entities.EntityInstantiator entityInstantiator, java.lang.String entityName, java.lang.Number revision, java.lang.Object value)AuditProjectioncount()Projection counting the valuesAuditProjectioncountDistinct()Projection counting distinct valuesAuditOrderdesc()Sort the results by the property in descending orderAuditProjectiondistinct()Projection on distinct valuesAuditCriterioneq(T value)Apply an "equal" constraintAuditCriterioneqProperty(java.lang.String otherPropertyName)Apply an "equal" constraint to another propertyAuditCriterioneqProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)Apply an "equal" constraint to another propertyAuditProjectionfunction(java.lang.String functionName)Projection using a custom functionAuditCriterionge(T value)Apply a "greater than or equal" constraintAuditCriteriongeProperty(java.lang.String otherPropertyName)Apply a "greater than or equal" constraint to another propertyAuditCriteriongeProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)Apply a "greater than or equal" constraint to another propertyAuditProjection.ProjectionDatagetData(org.hibernate.envers.boot.internal.EnversService enversService)AuditCriteriongt(T value)Apply a "greater than" constraintAuditCriteriongtProperty(java.lang.String otherPropertyName)Apply a "greater than" constraint to another propertyAuditCriteriongtProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)Apply a "greater than" constraint to another propertyAuditCriterionhasChanged()AuditCriterionhasNotChanged()AuditCriterionilike(java.lang.String value, MatchMode matchMode)Deprecated.since 5.2, useilike(String, MatchMode).AuditCriterionilike(java.lang.String value, MatchMode matchMode)Apply on "ilike" constraintAuditCriterionilike(T value)Apply an "ilike" constraintAuditCriterionin(java.util.Collection values)Apply an "in" constraintAuditCriterionin(T[] values)Apply an "in" constraintAuditCriterionisNotNull()Apply an "is not null" constraint to the another propertyAuditCriterionisNull()Apply an "is null" constraintAuditCriterionle(T value)Apply a "less than or equal" constraintAuditCriterionleProperty(java.lang.String otherPropertyName)Apply a "less than or equal" constraint to another propertyAuditCriterionleProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)Apply a "less than or equal" constraint to another propertyAuditCriterionlike(java.lang.String value, MatchMode matchMode)Deprecated.since 5.2, uselike(String, MatchMode).AuditCriterionlike(java.lang.String value, MatchMode matchMode)Apply a "like" constraintAuditCriterionlike(T value)Apply a "like" constraintAuditCriterionlt(T value)Apply a "less than" constraintAuditCriterionltProperty(java.lang.String otherPropertyName)Apply a "less than" constraint to another propertyAuditCriterionltProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)Apply a "less than" constraint to another propertyAuditProjectionmax()Projection on the maximum valueAggregatedAuditExpressionmaximize()Apply a "maximalize" constraint, with the ability to specify further constraints on the maximized propertyAuditProjectionmin()Projection on the minimum valueAggregatedAuditExpressionminimize()Apply a "minimize" constraint, with the ability to specify further constraints on the minimized propertyAuditCriterionne(T value)Apply a "not equal" constraintAuditCriterionneProperty(java.lang.String otherPropertyName)Apply a "not equal" constraint to another propertyAuditCriterionneProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)Apply a "not equal" constraint to another property
-
-
-
Method Detail
-
hasChanged
public AuditCriterion hasChanged()
-
hasNotChanged
public AuditCriterion hasNotChanged()
-
eq
public AuditCriterion eq(T value)
Apply an "equal" constraint
-
ne
public AuditCriterion ne(T value)
Apply a "not equal" constraint
-
like
public AuditCriterion like(T value)
Apply a "like" constraint
-
like
@Deprecated public AuditCriterion like(java.lang.String value, MatchMode matchMode)
Deprecated.since 5.2, uselike(String, MatchMode).Apply a "like" constraint
-
like
public AuditCriterion like(java.lang.String value, MatchMode matchMode)
Apply a "like" constraint
-
ilike
public AuditCriterion ilike(T value)
Apply an "ilike" constraint
-
ilike
@Deprecated public AuditCriterion ilike(java.lang.String value, MatchMode matchMode)
Deprecated.since 5.2, useilike(String, MatchMode).Apply an "ilike" constraint
-
ilike
public AuditCriterion ilike(java.lang.String value, MatchMode matchMode)
Apply on "ilike" constraint
-
gt
public AuditCriterion gt(T value)
Apply a "greater than" constraint
-
lt
public AuditCriterion lt(T value)
Apply a "less than" constraint
-
le
public AuditCriterion le(T value)
Apply a "less than or equal" constraint
-
ge
public AuditCriterion ge(T value)
Apply a "greater than or equal" constraint
-
between
public AuditCriterion between(T lo, T hi)
Apply a "between" constraint
-
in
public AuditCriterion in(T[] values)
Apply an "in" constraint
-
in
public AuditCriterion in(java.util.Collection values)
Apply an "in" constraint
-
isNull
public AuditCriterion isNull()
Apply an "is null" constraint
-
eqProperty
public AuditCriterion eqProperty(java.lang.String otherPropertyName)
Apply an "equal" constraint to another property
-
eqProperty
public AuditCriterion eqProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)
Apply an "equal" constraint to another property- Parameters:
otherAlias- the alias of the entity which owns the other property.
-
neProperty
public AuditCriterion neProperty(java.lang.String otherPropertyName)
Apply a "not equal" constraint to another property
-
neProperty
public AuditCriterion neProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)
Apply a "not equal" constraint to another property- Parameters:
otherAlias- the alias of the entity which owns the other property.
-
ltProperty
public AuditCriterion ltProperty(java.lang.String otherPropertyName)
Apply a "less than" constraint to another property
-
ltProperty
public AuditCriterion ltProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)
Apply a "less than" constraint to another property- Parameters:
otherAlias- the alias of the entity which owns the other property.
-
leProperty
public AuditCriterion leProperty(java.lang.String otherPropertyName)
Apply a "less than or equal" constraint to another property
-
leProperty
public AuditCriterion leProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)
Apply a "less than or equal" constraint to another property- Parameters:
otherAlias- the alias of the entity which owns the other property.
-
gtProperty
public AuditCriterion gtProperty(java.lang.String otherPropertyName)
Apply a "greater than" constraint to another property
-
gtProperty
public AuditCriterion gtProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)
Apply a "greater than" constraint to another property- Parameters:
otherAlias- the alias of the entity which owns the other property.
-
geProperty
public AuditCriterion geProperty(java.lang.String otherPropertyName)
Apply a "greater than or equal" constraint to another property
-
geProperty
public AuditCriterion geProperty(java.lang.String otherAlias, java.lang.String otherPropertyName)
Apply a "greater than or equal" constraint to another property- Parameters:
otherAlias- the alias of the entity which owns the other property.
-
isNotNull
public AuditCriterion isNotNull()
Apply an "is not null" constraint to the another property
-
maximize
public AggregatedAuditExpression maximize()
Apply a "maximalize" constraint, with the ability to specify further constraints on the maximized property
-
minimize
public AggregatedAuditExpression minimize()
Apply a "minimize" constraint, with the ability to specify further constraints on the minimized property
-
max
public AuditProjection max()
Projection on the maximum value
-
min
public AuditProjection min()
Projection on the minimum value
-
count
public AuditProjection count()
Projection counting the values
-
countDistinct
public AuditProjection countDistinct()
Projection counting distinct values
-
distinct
public AuditProjection distinct()
Projection on distinct values
-
function
public AuditProjection function(java.lang.String functionName)
Projection using a custom function
-
getData
public AuditProjection.ProjectionData getData(org.hibernate.envers.boot.internal.EnversService enversService)
- Specified by:
getDatain interfaceAuditProjection- Parameters:
enversService- The EnversService- Returns:
- the projection data
-
asc
public AuditOrder asc()
Sort the results by the property in ascending order
-
desc
public AuditOrder desc()
Sort the results by the property in descending order
-
convertQueryResult
public java.lang.Object convertQueryResult(org.hibernate.envers.boot.internal.EnversService enversService, org.hibernate.envers.internal.entities.EntityInstantiator entityInstantiator, java.lang.String entityName, java.lang.Number revision, java.lang.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
-
-