-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
bean/src/main/java/io/github/mmm/entity/bean/SoftDeletableEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 | ||
* http://www.apache.org/licenses/LICENSE-2.0 */ | ||
package io.github.mmm.entity.bean; | ||
|
||
import java.time.Instant; | ||
|
||
import io.github.mmm.bean.AbstractInterface; | ||
import io.github.mmm.property.booleans.BooleanProperty; | ||
import io.github.mmm.property.temporal.instant.InstantProperty; | ||
|
||
/** | ||
* {@link EntityBean} that shall not be deleted physically from the underlying store (database). Instead on deletion, it | ||
* will be updated | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
@AbstractInterface | ||
public interface SoftDeletableEntity extends EntityBean { | ||
|
||
/** | ||
* @return {@code true} if logically deleted, {@code false} otherwise. | ||
*/ | ||
BooleanProperty Deleted(); | ||
|
||
/** | ||
* @return {@link Instant} when this entity has been logically {@link #Deleted() deleted} or {@code null} if not | ||
* deleted. | ||
*/ | ||
InstantProperty DeletedAt(); | ||
|
||
} |