Class UpdateEntityAction

java.lang.Object
io.github.blyznytsiaorg.bibernate.actionqueue.impl.UpdateEntityAction
All Implemented Interfaces:
EntityAction

public class UpdateEntityAction extends Object implements EntityAction
Represents an entity action for updating entities in the Bibernate framework. This action is associated with a specific entity class, a collection of entities to be updated, and a list of column snapshots representing the changes to be applied during the update.

Upon execution, the action updates each entity in the collection using the provided column snapshots.

Since:
1.0
Author:
Blyzhnytsia Team
  • Field Details

    • bibernateSession

      private final BibernateSession bibernateSession
      The Bibernate session associated with the UpdateEntityAction, providing access to the underlying data access operations and the execution context for the update action.
    • entityClass

      private final Class<?> entityClass
      The Class object representing the type of entities to be updated.
    • entities

      private final Collection<Object> entities
      A collection of entities to be updated.
    • diff

      private final List<ColumnSnapshot> diff
      A list of column snapshots representing the changes to be applied during the update.
  • Constructor Details

    • UpdateEntityAction

      public UpdateEntityAction()
  • Method Details

    • execute

      public void execute()
      Executes the entity action by updating each entity in the collection using the provided column snapshots.
      Specified by:
      execute in interface EntityAction
    • getEntities

      public Collection<?> getEntities()
      Gets the collection of entities to be updated.
      Specified by:
      getEntities in interface EntityAction
      Returns:
      A collection of entities associated with the update action.
    • getActionType

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