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 TypeMethodDescriptionvoidsetCreatedBy(U createdBy) voidsetCreatedDate(LocalDateTime createdDate) voidsetLastModifiedBy(U lastModifiedBy) voidsetLastModifiedDate(LocalDateTime lastModifiedDate) Methods inherited from class org.springframework.data.jpa.domain.AbstractPersistable
equals, getId, hashCode, isNew, setId, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.data.domain.Persistable
getId, isNew
-
Constructor Details
-
AbstractAuditable
public AbstractAuditable()
-
-
Method Details
-
getCreatedBy
- Specified by:
getCreatedByin interfaceAuditable<U,PK extends Serializable, LocalDateTime>
-
setCreatedBy
- Specified by:
setCreatedByin interfaceAuditable<U,PK extends Serializable, LocalDateTime>
-
getCreatedDate
- Specified by:
getCreatedDatein interfaceAuditable<U,PK extends Serializable, LocalDateTime>
-
setCreatedDate
- Specified by:
setCreatedDatein interfaceAuditable<U,PK extends Serializable, LocalDateTime>
-
getLastModifiedBy
- Specified by:
getLastModifiedByin interfaceAuditable<U,PK extends Serializable, LocalDateTime>
-
setLastModifiedBy
- Specified by:
setLastModifiedByin interfaceAuditable<U,PK extends Serializable, LocalDateTime>
-
getLastModifiedDate
- Specified by:
getLastModifiedDatein interfaceAuditable<U,PK extends Serializable, LocalDateTime>
-
setLastModifiedDate
- Specified by:
setLastModifiedDatein interfaceAuditable<U,PK extends Serializable, LocalDateTime>
-