Class EntityReferenceDaoListener<TReferenced extends de.xima.cmn.dao.interfaces.IEntity<Long>,​TReferencing extends de.xima.cmn.dao.interfaces.IEntity<Long>>

  • Type Parameters:
    TReferenced - Type of the entity being referenced by another entity.
    TReferencing - Type of the entity referencing another entity.
    All Implemented Interfaces:
    de.xima.cmn.dao.interfaces.IDaoActionListener<TReferenced,​IEntityContext>

    public abstract class EntityReferenceDaoListener<TReferenced extends de.xima.cmn.dao.interfaces.IEntity<Long>,​TReferencing extends de.xima.cmn.dao.interfaces.IEntity<Long>>
    extends PreCommitDaoListener<TReferenced>
    A IDaoActionListener for checking whether an entity is still referenced by another entity, and preventing the deletion of said entity if it is.

    This class delays the check just before the transaction is committed. This allows several entities to be deleted in one transaction. Otherwise, the check could find referencing entities that are scheduled to be deleted later during the transaction.

    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH