Top Description Fields Constructors
jakarta.data.exceptions

public Class OptimisticLockingFailureException

extends DataException
Class Inheritance
Imports
jakarta.data.repository.BasicRepository

Indicates a failure that is due to inconsistent state between the entity and the database. For example, delete(entity) or deleteAll(entities) where the entity Id no longer exists in the database or the entity is versioned and the version no longer matches the version in the database.

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
OptimisticLockingFailureException(String
the detail message.
message
)

Constructs a new OptimisticLockingFailureException exception with the specified detail message.

public
OptimisticLockingFailureException(String
the detail message.
message
,
Throwable
another exception or error that caused this exception. Null indicates that no other cause is specified.
cause
)

Constructs a new OptimisticLockingFailureException exception with the specified detail message.

public
OptimisticLockingFailureException(Throwable
the cause.
cause
)

Constructs a new OptimisticLockingFailureException exception with the specified cause.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.data.exceptions.DataException.serialVersionUID.

Constructor Detail

OptimisticLockingFailureExceptionback to summary
public OptimisticLockingFailureException(String message)

Constructs a new OptimisticLockingFailureException exception with the specified detail message.

Parameters
message:String

the detail message.

OptimisticLockingFailureExceptionback to summary
public OptimisticLockingFailureException(String message, Throwable cause)

Constructs a new OptimisticLockingFailureException exception with the specified detail message.

Parameters
message:String

the detail message.

cause:Throwable

another exception or error that caused this exception. Null indicates that no other cause is specified.

OptimisticLockingFailureExceptionback to summary
public OptimisticLockingFailureException(Throwable cause)

Constructs a new OptimisticLockingFailureException exception with the specified cause.

Parameters
cause:Throwable

the cause.