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:
Auditable<U, PK, LocalDateTime>, Persistable<PK>
@MappedSuperclass
public abstract class AbstractAuditable<U, PK extends Serializable>
extends AbstractPersistable<PK>
implements 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setCreatedBy
(@Nullable U createdBy) void
setCreatedDate
(LocalDateTime createdDate) void
setLastModifiedBy
(@Nullable U lastModifiedBy) void
setLastModifiedDate
(LocalDateTime lastModifiedDate) Methods inherited from interface Persistable
getId, isNew
-
Constructor Details
-
AbstractAuditable
public AbstractAuditable()
-
-
Method Details
-
getCreatedBy
- Specified by:
getCreatedBy
in interfaceAuditable<U, PK extends Serializable, LocalDateTime>
-
setCreatedBy
- Specified by:
setCreatedBy
in interfaceAuditable<U, PK extends Serializable, LocalDateTime>
-
getCreatedDate
- Specified by:
getCreatedDate
in interfaceAuditable<U, PK extends Serializable, LocalDateTime>
-
setCreatedDate
- Specified by:
setCreatedDate
in interfaceAuditable<U, PK extends Serializable, LocalDateTime>
-
getLastModifiedBy
- Specified by:
getLastModifiedBy
in interfaceAuditable<U, PK extends Serializable, LocalDateTime>
-
setLastModifiedBy
- Specified by:
setLastModifiedBy
in interfaceAuditable<U, PK extends Serializable, LocalDateTime>
-
getLastModifiedDate
- Specified by:
getLastModifiedDate
in interfaceAuditable<U, PK extends Serializable, LocalDateTime>
-
setLastModifiedDate
- Specified by:
setLastModifiedDate
in interfaceAuditable<U, PK extends Serializable, LocalDateTime>
-