|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.jdbc.kernel.AbstractJDBCSeq
public abstract class AbstractJDBCSeq
Abstract sequence implementation. Handles obtaining the proper connection to used based on whether the sequence is transactional and whether a second datasource is configured.
Field Summary | |
---|---|
protected java.lang.Object |
current
|
protected int |
type
|
Fields inherited from interface org.apache.openjpa.kernel.Seq |
---|
TYPE_CONTIGUOUS, TYPE_DEFAULT, TYPE_NONTRANSACTIONAL, TYPE_TRANSACTIONAL |
Constructor Summary | |
---|---|
AbstractJDBCSeq()
|
Method Summary | |
---|---|
void |
addSchema(ClassMapping mapping,
SchemaGroup group)
No-op. |
void |
allocate(int additional,
org.apache.openjpa.kernel.StoreContext ctx,
org.apache.openjpa.meta.ClassMetaData meta)
|
protected void |
allocateInternal(int additional,
JDBCStore store,
ClassMapping mapping)
Allocate additional sequence values. |
void |
close()
No-op. |
protected void |
closeConnection(java.sql.Connection conn)
Close the current connection. |
java.lang.Object |
current(org.apache.openjpa.kernel.StoreContext ctx,
org.apache.openjpa.meta.ClassMetaData meta)
|
protected java.lang.Object |
currentInternal(JDBCStore store,
ClassMapping mapping)
Return the current sequence object. |
abstract JDBCConfiguration |
getConfiguration()
Return the JDBCConfiguration for this sequence. |
protected java.sql.Connection |
getConnection(JDBCStore store)
Return the connection to use based on the type of sequence. |
java.lang.Object |
next(org.apache.openjpa.kernel.StoreContext ctx,
org.apache.openjpa.meta.ClassMetaData meta)
|
protected abstract java.lang.Object |
nextInternal(JDBCStore store,
ClassMapping mapping)
Return the next sequence object. |
void |
setType(int type)
Records the sequence type. |
protected boolean |
suspendInJTA()
Detect whether or not OpenJPA should suspend the transaction in a managed environment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int type
protected java.lang.Object current
Constructor Detail |
---|
public AbstractJDBCSeq()
Method Detail |
---|
public void setType(int type)
setType
in interface org.apache.openjpa.kernel.Seq
public java.lang.Object next(org.apache.openjpa.kernel.StoreContext ctx, org.apache.openjpa.meta.ClassMetaData meta)
next
in interface org.apache.openjpa.kernel.Seq
public java.lang.Object current(org.apache.openjpa.kernel.StoreContext ctx, org.apache.openjpa.meta.ClassMetaData meta)
current
in interface org.apache.openjpa.kernel.Seq
public void allocate(int additional, org.apache.openjpa.kernel.StoreContext ctx, org.apache.openjpa.meta.ClassMetaData meta)
allocate
in interface org.apache.openjpa.kernel.Seq
public void addSchema(ClassMapping mapping, SchemaGroup group)
addSchema
in interface JDBCSeq
public void close()
close
in interface org.apache.openjpa.kernel.Seq
close
in interface org.apache.openjpa.lib.util.Closeable
protected abstract java.lang.Object nextInternal(JDBCStore store, ClassMapping mapping) throws java.lang.Exception
java.lang.Exception
public abstract JDBCConfiguration getConfiguration()
JDBCConfiguration
for this sequence.
protected java.lang.Object currentInternal(JDBCStore store, ClassMapping mapping) throws java.lang.Exception
java.lang.Exception
protected void allocateInternal(int additional, JDBCStore store, ClassMapping mapping) throws java.lang.Exception
java.lang.Exception
protected java.sql.Connection getConnection(JDBCStore store) throws java.sql.SQLException
java.sql.SQLException
protected void closeConnection(java.sql.Connection conn)
protected boolean suspendInJTA()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |