Class ByDeletion<PK extends java.io.Serializable,T,U>
- java.lang.Object
-
- de.alpharogroup.db.entity.base.SequenceBaseEntity<PK>
-
- de.alpharogroup.db.entity.deletable.ByDeletion<PK,T,U>
-
- Type Parameters:
PK- the generic type of the idT- the generic type of time measurementU- the generic type of the user or account
- All Implemented Interfaces:
de.alpharogroup.db.entity.accomplishable.Accomplishable<U>,de.alpharogroup.db.entity.deletable.ByDeletable<T,U>,de.alpharogroup.db.entity.deletable.Deletable<T>,de.alpharogroup.db.entity.deletable.IdentifiableByDeletable<PK,T,U>,de.alpharogroup.db.entity.Identifiable<PK>,java.io.Serializable
@Entity public class ByDeletion<PK extends java.io.Serializable,T,U> extends SequenceBaseEntity<PK> implements de.alpharogroup.db.entity.deletable.IdentifiableByDeletable<PK,T,U>
The entity classByDeletionacts like an deletion flag that keeps the information for the deletion of another entity that have this entity as an instance variable. This information are the date when it was deleted and from whom it was deleted. So this entity can be attached to another entity for keeping information if it is deleted and when it was deleted.
In specific situation entities have to be kept for instance of historical purposes. So the intent of this entity is that a parent entity will not really be deleted. The initial value of the parent entity that keeps this entity as an instance variable as a null object that signals that it is not deleted, and when it get a value with the deletion data it signals that it is now deleted and is not visible to selections.
Note: So this entity will only be created if the parent entity references to this entity and is intended to be deleted. This can be done for instance in a deletion strategy. Note: There is no need of a delete flag in this entity because this entity is the flag. So if the parent entity is not any more 'deleted' the reference of this entity will be set to null back.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.alpharogroup.db.entity.base.SequenceBaseEntity
SEQUENCE_GENERIC_GENERATOR_NAME
-
-
Constructor Summary
Constructors Constructor Description ByDeletion()
-
Method Summary
-
Methods inherited from class de.alpharogroup.db.entity.base.SequenceBaseEntity
toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.alpharogroup.db.entity.deletable.ByDeletable
getDeletedBy, setDeletedBy
-
-