org.apache.openjpa.persistence
Class LockScopesHelper

java.lang.Object
  extended by org.apache.openjpa.persistence.LockScopesHelper

public class LockScopesHelper
extends Object

Helper methods translate between JPA-defined pessimistic lock scope and OpenJPA internal lock scope levels.

Since:
2.0.0

Constructor Summary
LockScopesHelper()
           
 
Method Summary
static PessimisticLockScope fromLockScope(int level)
          Translates internal lock level to javax.persistence LockModeType.
static int toLockScope(PessimisticLockScope scope)
          Translates javax.persistence LockModeType to internal lock level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockScopesHelper

public LockScopesHelper()
Method Detail

toLockScope

public static int toLockScope(PessimisticLockScope scope)
Translates javax.persistence LockModeType to internal lock level.


fromLockScope

public static PessimisticLockScope fromLockScope(int level)
Translates internal lock level to javax.persistence LockModeType.



Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.