Class MappingAuditableBeanWrapperFactory
java.lang.Object
org.springframework.data.auditing.MappingAuditableBeanWrapperFactory
- All Implemented Interfaces:
AuditableBeanWrapperFactory
AuditableBeanWrapperFactory that will create am AuditableBeanWrapper using mapping information
obtained from a MappingContext to detect auditing configuration and eventually invoking setting the auditing
values.- Since:
- 1.8
- Author:
- Oliver Gierke, Christoph Strobl, Pavel Horal
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newMappingAuditableBeanWrapperFactoryusing the givenPersistentEntities. -
Method Summary
Modifier and TypeMethodDescription<T> Optional<AuditableBeanWrapper<T>>getBeanWrapperFor(T source) Returns anAuditableBeanWrapperif the given object is capable of being equipped with auditing information.
-
Constructor Details
-
MappingAuditableBeanWrapperFactory
Creates a newMappingAuditableBeanWrapperFactoryusing the givenPersistentEntities.- Parameters:
entities- must not be null.
-
-
Method Details
-
getBeanWrapperFor
Returns anAuditableBeanWrapperif the given object is capable of being equipped with auditing information.- Specified by:
getBeanWrapperForin interfaceAuditableBeanWrapperFactory- Parameters:
source- the auditing candidate.- Returns:
- the
AuditableBeanWrapperfor the given source object if it's eligible for auditing.
-