|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 String |
ACTION_ADD
|
static String |
ACTION_DROP
|
static 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()
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 |
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 |
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. |
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 String ACTION_DROP
public static final String ACTION_ADD
public static final String ACTION_GET
Constructor Detail |
---|
public NativeJDBCSeq()
Method Detail |
---|
public String getSequence()
OPENJPA_SEQUENCE
.
public void setSequence(String seqName)
OPENJPA_SEQUENCE
.
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)
public void setTableName(String table)
public void setFormat(String format)
public void addSchema(ClassMapping mapping, SchemaGroup group)
AbstractJDBCSeq
addSchema
in interface JDBCSeq
addSchema
in class AbstractJDBCSeq
public JDBCConfiguration getConfiguration()
AbstractJDBCSeq
JDBCConfiguration
for this sequence.
getConfiguration
in class AbstractJDBCSeq
public void setConfiguration(Configuration conf)
Configurable
setConfiguration
in interface Configurable
public void startConfiguration()
Configurable
startConfiguration
in interface Configurable
public void endConfiguration()
Configurable
endConfiguration
in interface Configurable
protected Object nextInternal(JDBCStore store, ClassMapping mapping) throws SQLException
AbstractJDBCSeq
nextInternal
in class AbstractJDBCSeq
SQLException
public void refreshSequence() throws SQLException
SQLException
public void dropSequence() throws SQLException
SQLException
public static void main(String[] args) throws Exception
JDBCConfiguration
. Optional.JDBCConfiguration
can be set by
using their names and supplying a value. For example:
-licenseKey adslfja83r3lkadf
Exception
public static boolean run(JDBCConfiguration conf, String[] args, Options opts) throws Exception
Exception
public static boolean run(JDBCConfiguration conf, String[] args, String action) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |