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
FieldsModifier and TypeFieldDescriptionprivate final BibernateSessionThe 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 RunnableRunnable to remove cache and snapshot. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()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, waitMethods 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:
executein interfaceEntityAction
-
getEntities
Retrieves the collection of entities targeted for deletion by this action.- Specified by:
getEntitiesin interfaceEntityAction- Returns:
- The collection of entities.
-
getActionType
Retrieves the ActionType associated with this entity action, indicating the type of operation (DELETE).- Specified by:
getActionTypein interfaceEntityAction- Returns:
- The ActionType associated with this entity action.
-