Spring Data MongoDB - Core

org.springframework.data.mongodb.config
Annotation Type EnableMongoAuditing


@Inherited
@Documented
@Target(value=TYPE)
@Retention(value=RUNTIME)
@Import(value=org.springframework.data.mongodb.config.MongoAuditingRegistrar.class)
public @interface EnableMongoAuditing

Annotation to enable auditing in MongoDB via annotation configuration.

Author:
Thomas Darimont, Oliver Gierke

Optional Element Summary
 String auditorAwareRef
          Configures the AuditorAware bean to be used to lookup the current principal.
 String dateTimeProviderRef
          Configures a DateTimeProvider bean name that allows customizing the org.joda.time.DateTime to be used for setting creation and modification dates.
 boolean modifyOnCreate
          Configures whether the entity shall be marked as modified on creation.
 boolean setDates
          Configures whether the creation and modification dates are set.
 

auditorAwareRef

public abstract String auditorAwareRef
Configures the AuditorAware bean to be used to lookup the current principal.

Returns:
Default:
""

setDates

public abstract boolean setDates
Configures whether the creation and modification dates are set. Defaults to true.

Returns:
Default:
true

modifyOnCreate

public abstract boolean modifyOnCreate
Configures whether the entity shall be marked as modified on creation. Defaults to true.

Returns:
Default:
true

dateTimeProviderRef

public abstract String dateTimeProviderRef
Configures a DateTimeProvider bean name that allows customizing the org.joda.time.DateTime to be used for setting creation and modification dates.

Returns:
Default:
""

Spring Data MongoDB - Core

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.