Top Description Fields Constructors Methods
javax.persistence

public Class PessimisticLockException

extends PersistenceException
Class Inheritance

Thrown by the persistence provider when an pessimistic locking conflict occurs. This exception may be thrown as part of an API call, a flush or at commit time. The current transaction, if one is active, will be marked for rollback.
Since
Java Persistence 2.0

Field Summary

Modifier and TypeField and Description
pack-priv Object
entity

The object that caused the exception

Constructor Summary

AccessConstructor and Description
public
PessimisticLockException()

Constructs a new PessimisticLockException exception with null as its detail message.

public
PessimisticLockException(String
the detail message.
message
)

Constructs a new PessimisticLockException exception with the specified detail message.

public
PessimisticLockException(String
the detail message.
message
,
Throwable
the cause.
cause
)

Constructs a new PessimisticLockException exception with the specified detail message and cause.

public
PessimisticLockException(Throwable
the cause.
cause
)

Constructs a new PessimisticLockException exception with the specified cause.

public
PessimisticLockException(Object
the entity.
entity
)

Constructs a new PessimisticLockException exception with the specified entity.

public
PessimisticLockException(String
the detail message.
message
,
Throwable
the cause.
cause
,
Object
the entity.
entity
)

Constructs a new PessimisticLockException exception with the specified detail message, cause, and entity.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the entity.
getEntity
()

Returns the entity that caused this exception.

Field Detail

entityback to summary
pack-priv Object entity

The object that caused the exception

Constructor Detail

PessimisticLockExceptionback to summary
public PessimisticLockException()

Constructs a new PessimisticLockException exception with null as its detail message.

PessimisticLockExceptionback to summary
public PessimisticLockException(String message)

Constructs a new PessimisticLockException exception with the specified detail message.

Parameters
message:String

the detail message.

PessimisticLockExceptionback to summary
public PessimisticLockException(String message, Throwable cause)

Constructs a new PessimisticLockException exception with the specified detail message and cause.

Parameters
message:String

the detail message.

cause:Throwable

the cause.

PessimisticLockExceptionback to summary
public PessimisticLockException(Throwable cause)

Constructs a new PessimisticLockException exception with the specified cause.

Parameters
cause:Throwable

the cause.

PessimisticLockExceptionback to summary
public PessimisticLockException(Object entity)

Constructs a new PessimisticLockException exception with the specified entity.

Parameters
entity:Object

the entity.

PessimisticLockExceptionback to summary
public PessimisticLockException(String message, Throwable cause, Object entity)

Constructs a new PessimisticLockException exception with the specified detail message, cause, and entity.

Parameters
message:String

the detail message.

cause:Throwable

the cause.

entity:Object

the entity.

Method Detail

getEntityback to summary
public Object getEntity()

Returns the entity that caused this exception.

Returns:Object

the entity.