Class TimestampedEntity

java.lang.Object
com.serinity.accesscontrol.model.base.IdentifiableEntity
com.serinity.accesscontrol.model.base.TimestampedEntity
Direct Known Subclasses:
Profile, User, UserFace

public abstract class TimestampedEntity extends IdentifiableEntity
TimestampedEntity.java Base class for entities that need automatic tracking of creation and update timestamps. Extends IdentifiableEntity to inherit a UUID primary key.

This class is annotated with @MappedSuperclass, so it does not correspond to a database table itself. Child entities will inherit the createdAt and updatedAt fields, which are automatically managed by Hibernate.

Fields:

  • createdAt – the timestamp when the entity was first persisted; immutable.
  • updatedAt – the timestamp of the last update to the entity; automatically updated on modification.

NOTE: skinnedRatORM annotations CreationTimestamp and UpdateTimestamp are used to manage timestamps automatically.

Since:
2026-02-03 TimestampedEntity.java
Version:
1.0
Author:
@ZouariOmar (zouariomar20@gmail.com)
  • Field Details

    • createdAt

      protected Instant createdAt
    • updatedAt

      protected Instant updatedAt
  • Constructor Details

    • TimestampedEntity

      protected TimestampedEntity()
      Creates a new timestamped entity.