public interface RemovableData extends IdentifiableData
For example, all methods generating lists of items, will by default not include items that are flagged as removed.
A cleaning application is usually run at regular intervals to remove items that have been flagged as removed.
This interface defines Hibernate database mapping for the
removedBy
property to the database column removed_by
.
The column is an integer column holding the ID of the user that
flagged the item or null if the item has not been flagged.
If a subclass wants to map these properties to other columns,
it should override the getRemovedBy()
method and add a
Hibernate tag in the comment.
Reference implementation
private Integer removedBy; public Integer getRemovedBy() { return removedBy; } public void setRemovedBy(Integer userId) { this.removedBy = userId; }
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getRemovedBy()
Get the ID of the user that removed this item.
|
void |
setRemovedBy(java.lang.Integer userId)
Set the ID of the user that removed this item or null
to restore the item.
|
getId, getVersion
java.lang.Integer getRemovedBy()
void setRemovedBy(java.lang.Integer userId)