|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.kernel.AbstractJDBCSeq
org.apache.openjpa.jdbc.kernel.NativeJDBCSeq
public class NativeJDBCSeq
JDBCSeq implementation that uses a database sequences
to generate numbers.
JDBCSeq,
AbstractJDBCSeq| Field Summary | |
|---|---|
static java.lang.String |
ACTION_ADD
|
static java.lang.String |
ACTION_DROP
|
static java.lang.String |
ACTION_GET
|
| Fields inherited from class org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq |
|---|
current, type |
| Fields inherited from interface org.apache.openjpa.kernel.Seq |
|---|
TYPE_CONTIGUOUS, TYPE_DEFAULT, TYPE_NONTRANSACTIONAL, TYPE_TRANSACTIONAL |
| Constructor Summary | |
|---|---|
NativeJDBCSeq()
|
|
| Method Summary | |
|---|---|
void |
addSchema(ClassMapping mapping,
SchemaGroup group)
No-op. |
void |
dropSequence()
Drops the sequence in the DB. |
void |
endConfiguration()
|
int |
getAllocate()
|
JDBCConfiguration |
getConfiguration()
Return the JDBCConfiguration for this sequence. |
int |
getIncrement()
|
int |
getInitialValue()
|
java.lang.String |
getSequence()
The sequence name. |
static void |
main(java.lang.String[] args)
Usage: java org.apache.openjpa.jdbc.schema.NativeJDBCSequence [option]* -action/-a <add | drop | get> Where the following options are recognized. |
protected java.lang.Object |
nextInternal(JDBCStore store,
ClassMapping mapping)
Return the next sequence object. |
void |
refreshSequence()
Creates the sequence in the DB. |
static boolean |
run(JDBCConfiguration conf,
java.lang.String[] args,
Options opts)
Run the tool. |
static boolean |
run(JDBCConfiguration conf,
java.lang.String[] args,
java.lang.String action)
Run the tool. |
void |
setAllocate(int allocate)
|
void |
setConfiguration(Configuration conf)
|
void |
setFormat(java.lang.String format)
Deprecated. Retained for backwards-compatibility for auto-configuration. |
void |
setIncrement(int increment)
|
void |
setInitialValue(int initial)
|
void |
setSequence(java.lang.String seqName)
The sequence name. |
void |
setSequenceName(java.lang.String seqName)
Deprecated. Use setSequence(java.lang.String). Retained for
backwards-compatibility for auto-configuration. |
void |
setTableName(java.lang.String table)
Deprecated. Retained for backwards-compatibility for auto-configuration. |
void |
startConfiguration()
|
| Methods inherited from class org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq |
|---|
allocate, allocateInternal, close, closeConnection, current, currentInternal, getConnection, next, setType, suspendInJTA |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ACTION_DROP
public static final java.lang.String ACTION_ADD
public static final java.lang.String ACTION_GET
| Constructor Detail |
|---|
public NativeJDBCSeq()
| Method Detail |
|---|
public java.lang.String getSequence()
OPENJPA_SEQUENCE.
public void setSequence(java.lang.String seqName)
OPENJPA_SEQUENCE.
@Deprecated public void setSequenceName(java.lang.String seqName)
setSequence(java.lang.String). Retained for
backwards-compatibility for auto-configuration.
public int getInitialValue()
Sequence.getInitialValue()public void setInitialValue(int initial)
Sequence.setInitialValue(int)public int getAllocate()
Sequence.getAllocate()public void setAllocate(int allocate)
Sequence.setAllocate(int)public int getIncrement()
Sequence.getIncrement()public void setIncrement(int increment)
Sequence.setIncrement(int)@Deprecated public void setTableName(java.lang.String table)
@Deprecated public void setFormat(java.lang.String format)
public void addSchema(ClassMapping mapping,
SchemaGroup group)
AbstractJDBCSeq
addSchema in interface JDBCSeqaddSchema in class AbstractJDBCSeqpublic JDBCConfiguration getConfiguration()
AbstractJDBCSeqJDBCConfiguration for this sequence.
getConfiguration in class AbstractJDBCSeqpublic void setConfiguration(Configuration conf)
setConfiguration in interface Configurablepublic void startConfiguration()
startConfiguration in interface Configurablepublic void endConfiguration()
endConfiguration in interface Configurable
protected java.lang.Object nextInternal(JDBCStore store,
ClassMapping mapping)
throws java.sql.SQLException
AbstractJDBCSeq
nextInternal in class AbstractJDBCSeqjava.sql.SQLException
public void refreshSequence()
throws java.sql.SQLException
java.sql.SQLException
public void dropSequence()
throws java.sql.SQLException
java.sql.SQLException
public static void main(java.lang.String[] args)
throws java.lang.Exception
JDBCConfiguration. Optional.JDBCConfiguration can be set by
using their names and supplying a value. For example:
-licenseKey adslfja83r3lkadf
java.lang.Exception
public static boolean run(JDBCConfiguration conf,
java.lang.String[] args,
Options opts)
throws java.lang.Exception
java.lang.Exception
public static boolean run(JDBCConfiguration conf,
java.lang.String[] args,
java.lang.String action)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||