org.springframework.data.auditing

## Class MappingAuditableBeanWrapperFactory

- java.lang.Object
- - org.springframework.data.auditing.MappingAuditableBeanWrapperFactory

All Implemented Interfaces:
  AuditableBeanWrapperFactory

    public class MappingAuditableBeanWrapperFactory
    extends Object

`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

Constructors
Constructor and Description
`MappingAuditableBeanWrapperFactory(PersistentEntities entities)` Creates a new `MappingAuditableBeanWrapperFactory` using the given `PersistentEntities`.

### Method Summary

All Methods Instance Methods Concrete Methods
`<T> Optional<AuditableBeanWrapper<T>>` `getBeanWrapperFor(T source)` Returns an `AuditableBeanWrapper` if the given object is capable of being equipped with auditing information.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MappingAuditableBeanWrapperFactory

    public MappingAuditableBeanWrapperFactory(PersistentEntities entities)

Creates a new `MappingAuditableBeanWrapperFactory` using the given `PersistentEntities`.

Parameters:
  `entities` - must not be null.

### Method Detail

#### getBeanWrapperFor

    public <T> Optional<AuditableBeanWrapper<T>> getBeanWrapperFor(T source)

Returns an `AuditableBeanWrapper` if the given object is capable of being equipped with auditing information.

Specified by:
  `getBeanWrapperFor` in interface `AuditableBeanWrapperFactory`
Parameters:
  `source` - the auditing candidate.
Returns:
  the `AuditableBeanWrapper` for the given source object if it's eligible for auditing.