org.apache.openjpa.jdbc.kernel
public class NativeJDBCSeq extends AbstractJDBCSeq implements Configurable
JDBCSeq implementation that uses a database sequences
to generate numbers.JDBCSeq,
AbstractJDBCSeq| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION_ADD |
static String |
ACTION_DROP |
static String |
ACTION_GET |
current, typeTYPE_CONTIGUOUS, TYPE_DEFAULT, TYPE_NONTRANSACTIONAL, TYPE_TRANSACTIONAL| Constructor and Description |
|---|
NativeJDBCSeq() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSchema(ClassMapping mapping,
SchemaGroup group)
No-op.
|
void |
dropSequence()
Drops the sequence in the DB.
|
void |
endConfiguration()
Invoked upon completion of bean property configuration for this object.
|
int |
getAllocate() |
JDBCConfiguration |
getConfiguration()
Return the
JDBCConfiguration for this sequence. |
int |
getIncrement() |
int |
getInitialValue() |
String |
getSchema()
Deprecated.
|
DBIdentifier |
getSchemaIdentifier() |
String |
getSequence()
The sequence name.
|
static void |
main(String[] args)
Usage: java org.apache.openjpa.jdbc.schema.NativeJDBCSequence [option]*
-action/-a <add | drop | get>
Where the following options are recognized.
|
protected Object |
nextInternal(JDBCStore store,
ClassMapping mapping)
Return the next sequence object.
|
void |
refreshSequence()
Creates the sequence in the DB.
|
static boolean |
run(JDBCConfiguration conf,
String[] args,
Options opts)
Run the tool.
|
static boolean |
run(JDBCConfiguration conf,
String[] args,
String action)
Run the tool.
|
void |
setAllocate(int allocate) |
void |
setConfiguration(Configuration conf)
Invoked prior to setting bean properties.
|
void |
setFormat(String format)
Deprecated.
Retained for backwards-compatibility for auto-configuration.
|
void |
setIncrement(int increment) |
void |
setInitialValue(int initial) |
void |
setSchema(String schema)
Deprecated.
|
void |
setSequence(String seqName)
The sequence name.
|
void |
setSequenceName(String seqName)
Deprecated.
Use
setSequence(java.lang.String). Retained for
backwards-compatibility for auto-configuration. |
void |
setTableName(String table)
Deprecated.
Retained for backwards-compatibility for auto-configuration.
|
void |
startConfiguration()
Invoked before bean property configuration is begun on this object.
|
allocate, allocateInternal, close, closeConnection, current, currentInternal, getConnection, next, setType, suspendInJTApublic static final String ACTION_DROP
public static final String ACTION_ADD
public static final String ACTION_GET
public String getSequence()
OPENJPA_SEQUENCE.public void setSequence(String seqName)
OPENJPA_SEQUENCE.@Deprecated public void setSequenceName(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(String table)
@Deprecated public void setFormat(String format)
public void addSchema(ClassMapping mapping, SchemaGroup group)
AbstractJDBCSeqaddSchema in interface JDBCSeqaddSchema in class AbstractJDBCSeqpublic JDBCConfiguration getConfiguration()
AbstractJDBCSeqJDBCConfiguration for this sequence.getConfiguration in class AbstractJDBCSeqpublic void setConfiguration(Configuration conf)
ConfigurablesetConfiguration in interface Configurablepublic void startConfiguration()
ConfigurablestartConfiguration in interface Configurablepublic void endConfiguration()
ConfigurableendConfiguration in interface Configurableprotected Object nextInternal(JDBCStore store, ClassMapping mapping) throws SQLException
AbstractJDBCSeqnextInternal in class AbstractJDBCSeqSQLExceptionpublic void refreshSequence()
throws SQLException
SQLExceptionpublic void dropSequence()
throws SQLException
SQLExceptionpublic static void main(String[] args) throws Exception
JDBCConfiguration. Optional.JDBCConfiguration can be set by
using their names and supplying a value. For example:
-licenseKey adslfja83r3lkadfExceptionpublic static boolean run(JDBCConfiguration conf, String[] args, Options opts) throws Exception
Exceptionpublic static boolean run(JDBCConfiguration conf, String[] args, String action) throws Exception
Exceptionpublic void setSchema(String schema)
public String getSchema()
public DBIdentifier getSchemaIdentifier()
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.