public class AuditableWrapper extends Object implements org.springframework.data.domain.Auditable
auditing.
If the underlying entity does not exhibit auditable behavior (either by implementing Auditable or by having properties that are annotated with one of the audit annotations provided
by Spring Data Commons) this class will simply ignore audit requests. Otherwise, it will convert
the values to their appropriate types and sets and gets the appropriate properties.| Constructor and Description |
|---|
AuditableWrapper(Object entity,
RepositoryMetadata repositoryMetadata) |
| Modifier and Type | Method and Description |
|---|---|
Optional<Object> |
getCreatedBy() |
Optional<Instant> |
getCreatedDate() |
Object |
getId() |
Optional<Object> |
getLastModifiedBy() |
Optional<Instant> |
getLastModifiedDate() |
boolean |
isNew() |
void |
setCreatedBy(Object createdBy) |
void |
setCreatedDate(TemporalAccessor creationDate) |
void |
setLastModifiedBy(Object lastModifiedBy) |
void |
setLastModifiedDate(TemporalAccessor lastModifiedDate) |
public AuditableWrapper(Object entity, RepositoryMetadata repositoryMetadata)
@Nonnull public Optional<Object> getCreatedBy()
getCreatedBy in interface org.springframework.data.domain.Auditablepublic void setCreatedBy(@Nonnull Object createdBy)
setCreatedBy in interface org.springframework.data.domain.Auditable@Nonnull public Optional<Instant> getCreatedDate()
getCreatedDate in interface org.springframework.data.domain.Auditablepublic void setCreatedDate(@Nonnull TemporalAccessor creationDate)
setCreatedDate in interface org.springframework.data.domain.Auditable@Nonnull public Optional<Object> getLastModifiedBy()
getLastModifiedBy in interface org.springframework.data.domain.Auditablepublic void setLastModifiedBy(@Nonnull Object lastModifiedBy)
setLastModifiedBy in interface org.springframework.data.domain.Auditable@Nonnull public Optional<Instant> getLastModifiedDate()
getLastModifiedDate in interface org.springframework.data.domain.Auditablepublic void setLastModifiedDate(@Nonnull TemporalAccessor lastModifiedDate)
setLastModifiedDate in interface org.springframework.data.domain.Auditablepublic Object getId()
getId in interface org.springframework.data.domain.Persistablepublic boolean isNew()
isNew in interface org.springframework.data.domain.PersistableCopyright © 2014–2021. All rights reserved.