public interface AuditStrategy
| Modifier and Type | Method and Description |
|---|---|
default void |
addAdditionalColumns(MappingContext mappingContext)
Add additional columns to the audit mappings.
|
void |
addAssociationAtRevisionRestriction(org.hibernate.envers.internal.tools.query.QueryBuilder rootQueryBuilder,
org.hibernate.envers.internal.tools.query.Parameters parameters,
String revisionProperty,
String revisionEndProperty,
boolean addAlias,
org.hibernate.envers.internal.entities.mapper.relation.MiddleIdData referencingIdData,
String versionsMiddleEntityName,
String eeOriginalIdPropertyPath,
String revisionPropertyPath,
String originalIdPropertyName,
String alias1,
boolean inclusive,
org.hibernate.envers.internal.entities.mapper.relation.MiddleComponentData... componentDatas)
Update the rootQueryBuilder with an extra WHERE clause to restrict the revision for a middle-entity
association.
|
void |
addEntityAtRevisionRestriction(org.hibernate.envers.configuration.internal.GlobalConfiguration globalCfg,
org.hibernate.envers.internal.tools.query.QueryBuilder rootQueryBuilder,
org.hibernate.envers.internal.tools.query.Parameters parameters,
String revisionProperty,
String revisionEndProperty,
boolean addAlias,
org.hibernate.envers.internal.entities.mapper.relation.MiddleIdData idData,
String revisionPropertyPath,
String originalIdPropertyName,
String alias1,
String alias2,
boolean inclusive)
Update the rootQueryBuilder with an extra WHERE clause to restrict the revision for a two-entity relation.
|
void |
perform(Session session,
String entityName,
org.hibernate.envers.configuration.internal.AuditEntitiesConfiguration auditEntitiesConfiguration,
Serializable id,
Object data,
Object revision)
Perform the persistence of audited data for regular entities.
|
void |
performCollectionChange(Session session,
String entityName,
String propertyName,
org.hibernate.envers.configuration.internal.AuditEntitiesConfiguration auditEntitiesConfiguration,
org.hibernate.envers.internal.entities.mapper.PersistentCollectionChangeData persistentCollectionChangeData,
Object revision)
Perform the persistence of audited data for collection ("middle") entities.
|
default void |
postInitialize(Class<?> revisionInfoClass,
org.hibernate.envers.internal.entities.PropertyData timestampData,
ServiceRegistry serviceRegistry)
Performs post initialization of the audit strategy implementation.
|
default void addAdditionalColumns(MappingContext mappingContext)
mappingContext - The mapping context.default void postInitialize(Class<?> revisionInfoClass, org.hibernate.envers.internal.entities.PropertyData timestampData, ServiceRegistry serviceRegistry)
revisionInfoClass - The revision entity class.timestampData - The timestamp property data on the revision entity class.serviceRegistry - The service registry.void perform(Session session, String entityName, org.hibernate.envers.configuration.internal.AuditEntitiesConfiguration auditEntitiesConfiguration, Serializable id, Object data, Object revision)
session - Session, which can be used to persist the data.entityName - Name of the entity, in which the audited change happensauditEntitiesConfiguration - The audit entity configuration.id - Id of the entity.data - Audit data to persist.revision - Current revision data.void performCollectionChange(Session session, String entityName, String propertyName, org.hibernate.envers.configuration.internal.AuditEntitiesConfiguration auditEntitiesConfiguration, org.hibernate.envers.internal.entities.mapper.PersistentCollectionChangeData persistentCollectionChangeData, Object revision)
session - Session, which can be used to persist the data.entityName - Name of the entity, in which the audited change happens.propertyName - The name of the property holding the persistent collectionauditEntitiesConfiguration - audit entity configurationpersistentCollectionChangeData - Collection change data to be persisted.revision - Current revision datavoid addEntityAtRevisionRestriction(org.hibernate.envers.configuration.internal.GlobalConfiguration globalCfg,
org.hibernate.envers.internal.tools.query.QueryBuilder rootQueryBuilder,
org.hibernate.envers.internal.tools.query.Parameters parameters,
String revisionProperty,
String revisionEndProperty,
boolean addAlias,
org.hibernate.envers.internal.entities.mapper.relation.MiddleIdData idData,
String revisionPropertyPath,
String originalIdPropertyName,
String alias1,
String alias2,
boolean inclusive)
globalCfg - the GlobalConfigurationrootQueryBuilder - the QueryBuilder that will be updatedparameters - root parameters to which restrictions shall be addedrevisionProperty - property of the revision columnrevisionEndProperty - property of the revisionEnd column (only used for ValidityAuditStrategy)addAlias - boolean indicator if a left alias is neededidData - id-information for the two-entity relation (only used for DefaultAuditStrategy)revisionPropertyPath - path of the revision property (only used for ValidityAuditStrategy)originalIdPropertyName - name of the id property (only used for ValidityAuditStrategy)alias1 - an alias used for subquery (only used for ValidityAuditStrategy)alias2 - an alias used for subquery (only used for ValidityAuditStrategy)inclusive - indicates whether revision number shall be treated as inclusive or exclusivevoid addAssociationAtRevisionRestriction(org.hibernate.envers.internal.tools.query.QueryBuilder rootQueryBuilder,
org.hibernate.envers.internal.tools.query.Parameters parameters,
String revisionProperty,
String revisionEndProperty,
boolean addAlias,
org.hibernate.envers.internal.entities.mapper.relation.MiddleIdData referencingIdData,
String versionsMiddleEntityName,
String eeOriginalIdPropertyPath,
String revisionPropertyPath,
String originalIdPropertyName,
String alias1,
boolean inclusive,
org.hibernate.envers.internal.entities.mapper.relation.MiddleComponentData... componentDatas)
rootQueryBuilder - the QueryBuilder that will be updatedparameters - root parameters to which restrictions shall be addedrevisionProperty - property of the revision columnrevisionEndProperty - property of the revisionEnd column (only used for ValidityAuditStrategy)addAlias - boolean indicator if a left alias is neededreferencingIdData - id-information for the middle-entity association (only used for DefaultAuditStrategy)versionsMiddleEntityName - name of the middle-entityeeOriginalIdPropertyPath - name of the id property (only used for ValidityAuditStrategy)revisionPropertyPath - path of the revision property (only used for ValidityAuditStrategy)originalIdPropertyName - name of the id property (only used for ValidityAuditStrategy)alias1 - an alias used for subqueries (only used for DefaultAuditStrategy)inclusive - indicates whether revision number shall be treated as inclusive or exclusivecomponentDatas - information about the middle-entity relationCopyright © 2001-2022 Red Hat, Inc. All Rights Reserved.