Module is.codion.framework.db.core
Package is.codion.framework.db.exception
Class EntityModifiedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
is.codion.common.db.exception.DatabaseException
is.codion.framework.db.exception.UpdateEntityException
is.codion.framework.db.exception.EntityModifiedException
- All Implemented Interfaces:
Serializable
An exception indicating that an entity, being updated, has been modified or deleted since it was loaded.
- See Also:
-
Field Summary
Fields inherited from class is.codion.common.db.exception.DatabaseException
SQL_STATE_NO_DATA -
Constructor Summary
ConstructorsConstructorDescriptionEntityModifiedException(Entity entity, @Nullable Entity modified, Collection<Column<?>> columns, @Nullable String message) Instantiates a new ModifiedException -
Method Summary
Methods inherited from class is.codion.common.db.exception.DatabaseException
errorCode, setStackTrace, sqlState, statementMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, toString
-
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 updatedmodified- the current (modified) version of the entity, null if it has been deletedcolumns- the modified columns, an empty collection in case the entity has been deletedmessage- a message describing the modification
-
-
Method Details
-
entity
- Returns:
- the entity being updated
-
modified
- Returns:
- the current (modified) version of the entity, an empty Optional if it has been deleted
-
columns
- Returns:
- the modified columns, or an empty collection in case the entity has been deleted
-