Spring Data JPA

org.springframework.data.jpa.repository.config
Annotation Type EnableJpaAuditing


@Inherited
@Documented
@Target(value=TYPE)
@Retention(value=RUNTIME)
@Import(value=org.springframework.data.jpa.repository.config.JpaAuditingRegistrar.class)
public @interface EnableJpaAuditing

Annotation to enable auditing in JPA 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 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 DateTime to be used for setting creation and modification dates.

Returns:
Default:
""

Spring Data JPA

Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.