@Override
	public <T> Optional<AuditableBeanWrapper<T>> getBeanWrapperFor(T source) {

		return Optional.of(source).flatMap(it -> {

			if (it instanceof Auditable) {
				return super.getBeanWrapperFor(source);
			}

			return entities.mapOnContext(it.getClass(), (context, entity) -> {

				MappingAuditingMetadata metadata = metadataCache.computeIfAbsent(
						it.getClass(),
						key -> new MappingAuditingMetadata(context, it.getClass()));

				return Optional.<AuditableBeanWrapper<T>>ofNullable(metadata.isAuditable() //
						? new MappingMetadataAuditableBeanWrapper<T>(
								entity.getPropertyAccessor(it), metadata)
						: null);

			}).orElseGet(() -> super.getBeanWrapperFor(source));
		});
	}
@ Override public < T > Optional < AuditableBeanWrapper < T > > getBeanWrapperFor ( T source ) { return Optional . of ( source ) . flatMap ( it -> { if ( it instanceof Auditable ) { return super . getBeanWrapperFor ( source ) ; } return entities . mapOnContext ( it . getClass ( ) , ( context , entity ) -> { MappingAuditingMetadata metadata = metadataCache . computeIfAbsent ( it . getClass ( ) , key -> new MappingAuditingMetadata ( context , it . getClass ( ) ) ) ; return Optional . < AuditableBeanWrapper < T > > ofNullable ( metadata . isAuditable ( ) ? new MappingMetadataAuditableBeanWrapper < T > ( entity . getPropertyAccessor ( it ) , metadata ) : null ) ; } ) . orElseGet ( ( ) -> super . getBeanWrapperFor ( source ) ) ; } ) ; }
/*
(non-Javadoc)

@see
org.springframework.data.auditing.AuditableBeanWrapperFactory#getBeanWrapperFor(
java.lang.Object)