Class SoftDeleteExtension
java.lang.Object
nl.datasteel.crudcraft.runtime.extensions.SoftDeleteExtension
SoftDeleteExtension is an embeddable class that provides soft delete functionality
for entities, allowing them to be marked as deleted without being physically removed
from the database.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanSets the deleted status and the timestamp when the entity is marked as deleted.voidsetDeleted(boolean deleted) Sets the deleted status of the entity.
-
Constructor Details
-
SoftDeleteExtension
public SoftDeleteExtension()
-
-
Method Details
-
isDeleted
public boolean isDeleted()Sets the deleted status and the timestamp when the entity is marked as deleted. -
setDeleted
public void setDeleted(boolean deleted) Sets the deleted status of the entity. If set to true, it also sets the deletedAt timestamp to the current time.- Parameters:
deleted- true if the entity is marked as deleted, false otherwise
-