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
ConstructorDescriptionCreates a newMappingAuditableBeanWrapperFactory
using the givenPersistentEntities
. -
Method Summary
Modifier and TypeMethodDescription<T> Optional<AuditableBeanWrapper<T>>
getBeanWrapperFor
(T source) Returns anAuditableBeanWrapper
if the given object is capable of being equipped with auditing information.
-
Constructor Details
-
MappingAuditableBeanWrapperFactory
Creates a newMappingAuditableBeanWrapperFactory
using the givenPersistentEntities
.- Parameters:
entities
- must not be null.
-
-
Method Details
-
getBeanWrapperFor
Returns anAuditableBeanWrapper
if the given object is capable of being equipped with auditing information.- Specified by:
getBeanWrapperFor
in interfaceAuditableBeanWrapperFactory
- Parameters:
source
- the auditing candidate.- Returns:
- the
AuditableBeanWrapper
for the given source object if it's eligible for auditing.
-