public class IsNewAwareAuditingHandler extends AuditingHandler
AuditingHandler
extension that uses PersistentEntity.isNew(Object)
to expose a generic
markAudited(Object)
method that will route calls to AuditingHandler.markCreated(Object)
or
AuditingHandler.markModified(Object)
based on the IsNewStrategy
determined from the factory.Constructor and Description |
---|
IsNewAwareAuditingHandler(MappingContext<? extends PersistentEntity<?,?>,? extends PersistentProperty<?>> mappingContext)
Deprecated.
use
IsNewAwareAuditingHandler(PersistentEntities) instead. |
IsNewAwareAuditingHandler(PersistentEntities entities)
Creates a new
IsNewAwareAuditingHandler for the given MappingContext . |
Modifier and Type | Method and Description |
---|---|
Object |
markAudited(Object object)
Marks the given object created or modified based on
PersistentEntity.isNew(Object) . |
afterPropertiesSet, markCreated, markModified, setAuditorAware
isAuditable, setDateTimeForNow, setDateTimeProvider, setModifyOnCreation
@Deprecated public IsNewAwareAuditingHandler(MappingContext<? extends PersistentEntity<?,?>,? extends PersistentProperty<?>> mappingContext)
IsNewAwareAuditingHandler(PersistentEntities)
instead.IsNewAwareAuditingHandler
for the given MappingContext
.mappingContext
- must not be null.public IsNewAwareAuditingHandler(PersistentEntities entities)
IsNewAwareAuditingHandler
for the given MappingContext
.entities
- must not be null.public Object markAudited(Object object)
PersistentEntity.isNew(Object)
. Will route the calls to
AuditingHandler.markCreated(Object)
and AuditingHandler.markModified(Object)
accordingly.object
- must not be null.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.