|
Spring Data Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.auditing.AuditingHandler<T>
public class AuditingHandler<T>
Auditing handler to mark entity objects created and modified.
| Constructor Summary | |
|---|---|
AuditingHandler()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
markCreated(Object source)
Marks the given object as created. |
void |
markModified(Object source)
Marks the given object as modified. |
void |
setAuditorAware(AuditorAware<T> auditorAware)
Setter to inject a AuditorAware component to retrieve the current auditor. |
void |
setDateTimeForNow(boolean dateTimeForNow)
Setter do determine if Auditable.setCreatedDate(DateTime) and
Auditable.setLastModifiedDate(DateTime) shall be filled with the current Java time. |
void |
setDateTimeProvider(DateTimeProvider dateTimeProvider)
Sets the DateTimeProvider to be used to determine the dates to be set. |
void |
setModifyOnCreation(boolean modifyOnCreation)
Set this to false if you want to treat entity creation as modification and thus set the current date as modification date, too. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuditingHandler()
| Method Detail |
|---|
public void setAuditorAware(AuditorAware<T> auditorAware)
AuditorAware component to retrieve the current auditor.
auditorAware - the auditorAware to setpublic void setDateTimeForNow(boolean dateTimeForNow)
Auditable.setCreatedDate(DateTime) and
Auditable.setLastModifiedDate(DateTime) shall be filled with the current Java time. Defaults to
true. One might set this to false to use database features to set entity time.
dateTimeForNow - the dateTimeForNow to setpublic void setModifyOnCreation(boolean modifyOnCreation)
true.
modifyOnCreation - if modification information shall be set on creation, toopublic void setDateTimeProvider(DateTimeProvider dateTimeProvider)
DateTimeProvider to be used to determine the dates to be set.
dateTimeProvider - public void markCreated(Object source)
source - public void markModified(Object source)
source - public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBean
|
Spring Data Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||