| .. | .. |
|---|
| 1 | +/* |
|---|
| 2 | +* Copyright @ 2013 CurisTEC, S.A.S. All Rights Reserved. |
|---|
| 3 | +*/ |
|---|
| 1 | 4 | package net.curisit.securis.db.common; |
|---|
| 2 | 5 | |
|---|
| 3 | 6 | import java.util.Date; |
|---|
| 4 | 7 | |
|---|
| 8 | +/** |
|---|
| 9 | +* ModificationTimestampEntity |
|---|
| 10 | +* <p> |
|---|
| 11 | +* Contract for entities that track a <b>modification timestamp</b>. |
|---|
| 12 | +* Typical usage: attach {@code @EntityListeners(ModificationTimestampListener.class)} |
|---|
| 13 | +* so the value is updated automatically on persist/update. |
|---|
| 14 | +* |
|---|
| 15 | +* Methods: |
|---|
| 16 | +* - {@link #getModificationTimestamp()} exposes the timestamp. |
|---|
| 17 | +* - {@link #setModificationTimestamp(Date)} sets the timestamp. |
|---|
| 18 | +* |
|---|
| 19 | +* @author JRA |
|---|
| 20 | +* Last reviewed by JRA on Oct 7, 2025. |
|---|
| 21 | +*/ |
|---|
| 5 | 22 | public interface ModificationTimestampEntity { |
|---|
| 6 | 23 | |
|---|
| 7 | | - public Date getModificationTimestamp(); |
|---|
| 24 | + /** |
|---|
| 25 | + * getModificationTimestamp<p> |
|---|
| 26 | + * Return the last modification timestamp. |
|---|
| 27 | + * |
|---|
| 28 | + * @return modificationTimestamp |
|---|
| 29 | + */ |
|---|
| 30 | + Date getModificationTimestamp(); |
|---|
| 8 | 31 | |
|---|
| 9 | | - public void setModificationTimestamp(Date modificationTimestamp); |
|---|
| 32 | + /** |
|---|
| 33 | + * setModificationTimestamp<p> |
|---|
| 34 | + * Set/update the last modification timestamp. |
|---|
| 35 | + * |
|---|
| 36 | + * @param modificationTimestamp |
|---|
| 37 | + */ |
|---|
| 38 | + void setModificationTimestamp(Date modificationTimestamp); |
|---|
| 10 | 39 | } |
|---|