Class UpdateEntityAction
java.lang.Object
io.github.blyznytsiaorg.bibernate.actionqueue.impl.UpdateEntityAction
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final BibernateSessionThe Bibernate session associated with the UpdateEntityAction, providing access to the underlying data access operations and the execution context for the update action.private final List<ColumnSnapshot> A list of column snapshots representing the changes to be applied during the update.private final Collection<Object> A collection of entities to be updated.private final Class<?> The Class object representing the type of entities to be updated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the entity action by updating each entity in the collection using the provided column snapshots.Gets the type of action, which isUPDATE.Collection<?> Gets the collection of entities to be updated.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 UpdateEntityAction, providing access to the underlying data access operations and the execution context for the update action. -
entityClass
The Class object representing the type of entities to be updated. -
entities
A collection of entities to be updated. -
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:
executein interfaceEntityAction
-
getEntities
Gets the collection of entities to be updated.- Specified by:
getEntitiesin interfaceEntityAction- Returns:
- A collection of entities associated with the update action.
-
getActionType
Gets the type of action, which isUPDATE.- Specified by:
getActionTypein interfaceEntityAction- Returns:
- The ActionType representing the type of entity action.
-