Class DeleteAllByIdEntityAction<T>

java.lang.Object
io.github.blyznytsiaorg.bibernate.actionqueue.impl.DeleteAllByIdEntityAction<T>
Type Parameters:
T - The generic type representing the entity class.
All Implemented Interfaces:
EntityAction

public class DeleteAllByIdEntityAction<T> extends Object implements EntityAction
Represents an entity action for bulk deletion of entities by their primary keys. This action is associated with a Bibernate session and executes the deletion operation for the provided collection of primary keys within the specified entity class.
Since:
1.0
Author:
Blyzhnytsia Team
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final BibernateSession
    The Bibernate session associated with the DeleteAllByIdEntityAction, providing access to the underlying data access operations and serving as the execution context for the bulk entity deletion by primary keys.
    private final Collection<T>
    The collection of entities targeted for deletion by this action.
    private final Class<T>
    The class of entities targeted for deletion by primary keys within this action.
    private final Collection<Object>
    The collection of primary keys used to identify entities for deletion by this action.
    private final Runnable
    Runnable to remove cache and snapshot.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes the bulk entity deletion by primary keys action by invoking the corresponding method in the associated Bibernate session.
    Retrieves the ActionType associated with this entity action, indicating the type of operation (DELETE).
    Retrieves the collection of entities targeted for deletion by this action.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.github.blyznytsiaorg.bibernate.actionqueue.EntityAction

    getEntityClass
  • Field Details

    • bibernateSession

      private final BibernateSession bibernateSession
      The Bibernate session associated with the DeleteAllByIdEntityAction, providing access to the underlying data access operations and serving as the execution context for the bulk entity deletion by primary keys.
    • entityClass

      private final Class<T> entityClass
      The class of entities targeted for deletion by primary keys within this action.
    • primaryKeys

      private final Collection<Object> primaryKeys
      The collection of primary keys used to identify entities for deletion by this action.
    • entities

      private final Collection<T> entities
      The collection of entities targeted for deletion by this action.
    • removeCacheAndSnapshot

      private final Runnable removeCacheAndSnapshot
      Runnable to remove cache and snapshot.
  • Constructor Details

    • DeleteAllByIdEntityAction

      public DeleteAllByIdEntityAction()
  • Method Details

    • execute

      public void execute()
      Executes the bulk entity deletion by primary keys action by invoking the corresponding method in the associated Bibernate session. This method checks for a non-empty collection of entities before performing the deletion operation.
      Specified by:
      execute in interface EntityAction
    • getEntities

      public Collection<T> getEntities()
      Retrieves the collection of entities targeted for deletion by this action.
      Specified by:
      getEntities in interface EntityAction
      Returns:
      The collection of entities.
    • getActionType

      public ActionType getActionType()
      Retrieves the ActionType associated with this entity action, indicating the type of operation (DELETE).
      Specified by:
      getActionType in interface EntityAction
      Returns:
      The ActionType associated with this entity action.