org.apache.openjpa.jdbc.kernel
Class TableJDBCSeq.AllocateSequenceRunnable

java.lang.Object
  extended by org.apache.openjpa.jdbc.kernel.TableJDBCSeq.AllocateSequenceRunnable
All Implemented Interfaces:
Runnable
Enclosing class:
TableJDBCSeq

protected class TableJDBCSeq.AllocateSequenceRunnable
extends Object
implements Runnable

AllocateSequenceRunnable is a runnable wrapper that will inserts the initial sequence value into the database.


Field Summary
(package private)  int alloc
           
(package private)  ClassMapping mapping
           
(package private)  TableJDBCSeq.Status stat
           
(package private)  JDBCStore store
           
(package private)  boolean updateStatSeq
           
 
Constructor Summary
TableJDBCSeq.AllocateSequenceRunnable(JDBCStore store, ClassMapping mapping, TableJDBCSeq.Status stat, int alloc, boolean updateStatSeq)
           
 
Method Summary
 void run()
          This method actually obtains the current sequence value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

store

JDBCStore store

mapping

ClassMapping mapping

stat

TableJDBCSeq.Status stat

alloc

int alloc

updateStatSeq

boolean updateStatSeq
Constructor Detail

TableJDBCSeq.AllocateSequenceRunnable

TableJDBCSeq.AllocateSequenceRunnable(JDBCStore store,
                                      ClassMapping mapping,
                                      TableJDBCSeq.Status stat,
                                      int alloc,
                                      boolean updateStatSeq)
Method Detail

run

public void run()
         throws RuntimeException
This method actually obtains the current sequence value.

Specified by:
run in interface Runnable
Throws:
RuntimeException - any SQLExceptions that occur when obtaining the sequence value are wrapped in a runtime exception to avoid breaking the Runnable method signature. The caller can obtain the "real" exception by calling getCause().


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