Class AbstractAuditableEntity
- java.lang.Object
-
- de.xima.fc.certificate.ms.impl.dao.entities.AbstractAuditableEntity
-
- All Implemented Interfaces:
IAuditableEntity
- Direct Known Subclasses:
CertificateEntity,KeyPairEntity,KeyStoreEntity
@MappedSuperclass public abstract class AbstractAuditableEntity extends Object implements IAuditableEntity
Abstract base class for auditable entities.
-
-
Constructor Summary
Constructors Constructor Description AbstractAuditableEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstantgetCreatedAt()Gets the creation date of the entity.InstantgetUpdatedAt()Gets the last modification date of the entity.protected voidonCreate()Pre persist hook to set the creation date.protected voidonUpdate()Pre update hook to set the last modification date.voidsetCreatedAt(Instant createdAt)voidsetUpdatedAt(Instant updatedAt)
-
-
-
Method Detail
-
onCreate
protected void onCreate()
Pre persist hook to set the creation date.
-
onUpdate
protected void onUpdate()
Pre update hook to set the last modification date.
-
getCreatedAt
public Instant getCreatedAt()
Description copied from interface:IAuditableEntityGets the creation date of the entity.- Specified by:
getCreatedAtin interfaceIAuditableEntity- Returns:
- the creation date
-
getUpdatedAt
public Instant getUpdatedAt()
Description copied from interface:IAuditableEntityGets the last modification date of the entity.- Specified by:
getUpdatedAtin interfaceIAuditableEntity- Returns:
- the last modification date
-
setCreatedAt
public void setCreatedAt(Instant createdAt)
-
setUpdatedAt
public void setUpdatedAt(Instant updatedAt)
-
-