org.springframework.data.auditing
Class IsNewAwareAuditingHandler<T>
java.lang.Object
org.springframework.data.auditing.AuditingHandler<T>
org.springframework.data.auditing.IsNewAwareAuditingHandler<T>
- All Implemented Interfaces:
- InitializingBean
public class IsNewAwareAuditingHandler<T>
- extends AuditingHandler<T>
AuditingHandler extension that uses an IsNewStrategyFactory 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.
- Since:
- 1.5
- Author:
- Oliver Gierke
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IsNewAwareAuditingHandler
public IsNewAwareAuditingHandler(IsNewStrategyFactory isNewStrategyFactory)
- Creates a new
IsNewAwareAuditingHandler using the given IsNewStrategyFactory.
- Parameters:
isNewStrategyFactory - must not be null.
markAudited
public void markAudited(Object object)
- Marks the given object created or modified based on the
IsNewStrategy returned by the
IsNewStrategyFactory configured. Will rout the calls to AuditingHandler.markCreated(Object) and
AuditingHandler.markModified(Object) accordingly.
- Parameters:
object -
Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.