LockModeType getLockMode(
Object entity
)
Get the current lock mode for the entity instance.
- Parameters:
entity
- entity instance
- Return:
- lock mode
- Throws:
- TransactionRequiredException - if there is no transaction or if the entity manager has not been joined to the current transaction
- IllegalArgumentException - if the instance is not a managed entity and a transaction is active
- Since:
- JPA 2.0