Class EntityModifiedException

All Implemented Interfaces:
Serializable

public final class EntityModifiedException extends UpdateEntityException
An exception indicating that an entity, being updated, has been modified or deleted since it was loaded.
See Also:
  • Constructor Details

    • EntityModifiedException

      public EntityModifiedException(Entity entity, @Nullable Entity modified, Collection<Column<?>> columns, @Nullable String message)
      Instantiates a new ModifiedException
      Parameters:
      entity - the entity being updated
      modified - the current (modified) version of the entity, null if it has been deleted
      columns - the modified columns, an empty collection in case the entity has been deleted
      message - a message describing the modification
  • Method Details

    • entity

      public Entity entity()
      Returns:
      the entity being updated
    • modified

      public Optional<Entity> modified()
      Returns:
      the current (modified) version of the entity, an empty Optional if it has been deleted
    • columns

      public Collection<Column<?>> columns()
      Returns:
      the modified columns, or an empty collection in case the entity has been deleted