Class AbstractAuditable<U,PK extends Serializable>
java.lang.Object
org.springframework.data.jpa.domain.AbstractPersistable<PK>
org.springframework.data.jpa.domain.AbstractAuditable<U,PK>
- Type Parameters:
U
- the auditing type. Typically some kind of user.PK
- the type of the auditing type's identifier.
- All Implemented Interfaces:
org.springframework.data.domain.Auditable<U,
,PK, LocalDateTime> org.springframework.data.domain.Persistable<PK>
@MappedSuperclass
public abstract class AbstractAuditable<U,PK extends Serializable>
extends AbstractPersistable<PK>
implements org.springframework.data.domain.Auditable<U,PK,LocalDateTime>
Abstract base class for auditable entities. Stores the audition values in persistent fields.
- Author:
- Oliver Gierke, Christoph Strobl, Mark Paluch
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setCreatedBy
(U createdBy) void
setCreatedDate
(LocalDateTime createdDate) void
setLastModifiedBy
(U lastModifiedBy) void
setLastModifiedDate
(LocalDateTime lastModifiedDate) Methods inherited from class org.springframework.data.jpa.domain.AbstractPersistable
equals, getId, hashCode, isNew, setId, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.data.domain.Persistable
getId, isNew
-
Constructor Details
-
AbstractAuditable
public AbstractAuditable()
-
-
Method Details
-
getCreatedBy
- Specified by:
getCreatedBy
in interfaceorg.springframework.data.domain.Auditable<U,
PK extends Serializable, LocalDateTime>
-
setCreatedBy
- Specified by:
setCreatedBy
in interfaceorg.springframework.data.domain.Auditable<U,
PK extends Serializable, LocalDateTime>
-
getCreatedDate
- Specified by:
getCreatedDate
in interfaceorg.springframework.data.domain.Auditable<U,
PK extends Serializable, LocalDateTime>
-
setCreatedDate
- Specified by:
setCreatedDate
in interfaceorg.springframework.data.domain.Auditable<U,
PK extends Serializable, LocalDateTime>
-
getLastModifiedBy
- Specified by:
getLastModifiedBy
in interfaceorg.springframework.data.domain.Auditable<U,
PK extends Serializable, LocalDateTime>
-
setLastModifiedBy
- Specified by:
setLastModifiedBy
in interfaceorg.springframework.data.domain.Auditable<U,
PK extends Serializable, LocalDateTime>
-
getLastModifiedDate
- Specified by:
getLastModifiedDate
in interfaceorg.springframework.data.domain.Auditable<U,
PK extends Serializable, LocalDateTime>
-
setLastModifiedDate
- Specified by:
setLastModifiedDate
in interfaceorg.springframework.data.domain.Auditable<U,
PK extends Serializable, LocalDateTime>
-