getLockMode(entity) - JPA EntityManager's method

Method
javax.persistence.EntityManager
LockModeType getLockMode(
  Object entity
)

Get the current lock mode for the entity instance.
Parameters:
entity - entity instance
Returns:
lock mode
Throws:
TransactionRequiredException - if there is no transaction
IllegalArgumentException - if the instance is not a managed entity and a transaction is active
Since:
JPA 2.0