Class InsertAllEntityAction<T>

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

public class InsertAllEntityAction<T> extends Object implements EntityAction
Represents an entity action for inserting a collection of entities in the Bibernate framework. This action is associated with a specific entity class and a collection of entities to be inserted.

Upon execution, the action inserts all entities in the collection into the data store using a batch insert operation.

Since:
1.0
Author:
Blyzhnytsia Team
  • Field Details Link icon

    • bibernateSession Link icon

      private final BibernateSession bibernateSession
      The Bibernate session associated with the InsertAllEntityAction, providing access to the underlying data access operations and the execution context for the batch insert action.
    • entityClass Link icon

      private final Class<T> entityClass
      The Class object representing the type of entities to be inserted.
    • entities Link icon

      private final Collection<T> entities
      A collection of entities to be inserted.
  • Constructor Details Link icon

    • InsertAllEntityAction Link icon

      public InsertAllEntityAction()
  • Method Details Link icon

    • execute Link icon

      public void execute()
      Executes the entity action by inserting all entities in the collection into the data store using a batch insert operation. If the collection is empty, no operation is performed.
      Specified by:
      execute in interface EntityAction
    • getEntities Link icon

      public Collection<T> getEntities()
      Gets the collection of entities to be inserted.
      Specified by:
      getEntities in interface EntityAction
      Returns:
      A collection of entities associated with the insert action.
    • getActionType Link icon

      public ActionType getActionType()
      Gets the type of action, which is INSERT.
      Specified by:
      getActionType in interface EntityAction
      Returns:
      The ActionType representing the type of entity action.