Class EntityAlreadyManagedEvent

All Implemented Interfaces:
Event, Serializable

public class EntityAlreadyManagedEvent extends ManagedEntityEvent
The EntityAlreadyManagedEvent indicates that merge, save, saveOrUpdate, or update were called on an entity that's already managed by the current Persistence Context. Managed entities are automatically checked by Hibernate when the Persistence Context is flushed, so the merge operation is redundant for managed entities.
Since:
2.1.0
Author:
Vlad Mihalcea
See Also:
  • Constructor Details

    • EntityAlreadyManagedEvent

      public EntityAlreadyManagedEvent(Class entityClass, Object entityIdentifier, String entityStateTransitionMethodName)
      Instantiate the event using the provided parameters.
      Parameters:
      entityClass - entity class
      entityIdentifier - entity identifier
      entityStateTransitionMethodName - the entity state transition method name
  • Method Details

    • getEntityStateTransitionMethodName

      public String getEntityStateTransitionMethodName()
      The entity state transition method name that was called when the entity was found to be already managed.
      Returns:
      entity state transition method name that was called
    • getPriority

      public Event.Priority getPriority()
      Get the Event.Priority of this Event
      Returns:
      the Event.Priority of this Event
    • getDescription

      public String getDescription()
      Get the String description of this Event
      Returns:
      the String description of this Event