Class DeleteAllEntityAction<T>
java.lang.Object
io.github.blyznytsiaorg.bibernate.actionqueue.impl.DeleteAllEntityAction<T>
- Type Parameters:
T
- The generic type representing the entity class.
- All Implemented Interfaces:
EntityAction
Represents an entity action for bulk deletion of entities of a specific class.
This action is associated with a Bibernate session and executes the deletion operation
for the provided collection of entities within the specified entity class.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BibernateSession
The Bibernate session associated with the DeleteAllEntityAction, providing access to the underlying data access operations and serving as the execution context for the bulk entity deletion action.private final Collection
<T> The collection of entities to be deleted by this action.The class of entities targeted for deletion by this action.private final Runnable
Runnable to remove cache and snapshot. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes the bulk entity deletion 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
The Bibernate session associated with the DeleteAllEntityAction, providing access to the underlying data access operations and serving as the execution context for the bulk entity deletion action. -
entityClass
The class of entities targeted for deletion by this action. -
entities
The collection of entities to be deleted by this action. -
removeCacheAndSnapshot
Runnable to remove cache and snapshot.
-
-
Constructor Details
-
DeleteAllEntityAction
public DeleteAllEntityAction()
-
-
Method Details
-
execute
public void execute()Executes the bulk entity deletion 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 interfaceEntityAction
-
getEntities
Retrieves the collection of entities targeted for deletion by this action.- Specified by:
getEntities
in interfaceEntityAction
- Returns:
- The collection of entities.
-
getActionType
Retrieves the ActionType associated with this entity action, indicating the type of operation (DELETE).- Specified by:
getActionType
in interfaceEntityAction
- Returns:
- The ActionType associated with this entity action.
-