Update of /cvsroot/hibernate/Hibernate3/src/org/hibernate
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9926/src/org/hibernate
Modified Files:
LockMode.java
Log Message:
HHH-1416 & HHH-1421 : EJB3 LockModeTypes
Index: LockMode.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate3/src/org/hibernate/LockMode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- LockMode.java 1 Feb 2006 19:58:28 -0000 1.2
+++ LockMode.java 14 Feb 2006 03:23:56 -0000 1.3
@@ -75,11 +75,18 @@
public static final LockMode UPGRADE_NOWAIT = new LockMode(10, "UPGRADE_NOWAIT");
/**
* A <tt>WRITE</tt> lock is obtained when an object is updated
- * or inserted. This is not a valid mode for <tt>load()</tt>
- * or <tt>lock()</tt>.
+ * or inserted. This lock mode is for internal use only and is
+ * not a valid mode for <tt>load()</tt> or <tt>lock()</tt> (both
+ * of which throw exceptions if WRITE is specified).
*/
public static final LockMode WRITE = new LockMode(10, "WRITE");
+ /**
+ * Similiar to {@link #UPGRADE} except that, for versioned entities,
+ * it results in a forced version increment.
+ */
+ public static final LockMode FORCE = new LockMode( 15, "FORCE" );
+
static {
INSTANCES.put( NONE.name, NONE );
INSTANCES.put( READ.name, READ );
|