public class ClassTableJDBCSeq extends TableJDBCSeq
TableJDBCSeq that maintains a
separate sequence count per-class. Table name defaults to
OPENJPA_SEQUENCES_TABLE.TableJDBCSeq.AllocateSequenceRunnable, TableJDBCSeq.CurrentSequenceRunnable, TableJDBCSeq.StatusACTION_ADD, ACTION_DROP, ACTION_GET, ACTION_SET, DEFAULT_TABLEcurrent, typeTYPE_CONTIGUOUS, TYPE_DEFAULT, TYPE_NONTRANSACTIONAL, TYPE_TRANSACTIONAL| Constructor and Description |
|---|
ClassTableJDBCSeq() |
| Modifier and Type | Method and Description |
|---|---|
protected Column |
addPrimaryKeyColumn(Table table)
Add the primary key column to the given table and return it.
|
boolean |
getIgnoreUnmapped()
Whether unmapped classes should be ignored as possible primary
key values in the table.
|
protected Object |
getPrimaryKey(ClassMapping mapping)
Return the primary key value for the sequence table for the given class.
|
protected TableJDBCSeq.Status |
getStatus(ClassMapping mapping)
Return the appropriate status object for the given class, or null
if cannot handle the given class.
|
boolean |
getUseAliases()
Whether to use type alises for primary key values in place of class
names.
|
static void |
main(String[] args)
Usage: java org.apache.openjpa.jdbc.kernel.ClassTableJDBCSeq [option]*
-action/-a <add | drop | get | set>
[class name | .java file | .class file | .jdo file] [value]
Where the following options are recognized.
|
static boolean |
run(JDBCConfiguration conf,
String[] args,
Options opts)
Run the tool.
|
static boolean |
run(JDBCConfiguration conf,
String[] args,
String action,
MappingRepository repos,
ClassLoader loader)
Run the tool.
|
void |
setIgnoreUnmapped(boolean ignore)
Whether unmapped classes should be ignored as possible primary
key values in the table.
|
void |
setIgnoreVirtual(boolean ignore)
Deprecated.
Use
setIgnoreUnmapped(boolean). Retained for
backwards-compatibility for auto-configuration. |
void |
setUseAliases(boolean aliases)
Whether to use type alises for primary key values in place of class
names.
|
addSchema, allocateInternal, currentInternal, dropTable, endConfiguration, executeQuery, executeUpdate, getAllocate, getConfiguration, getInitialValue, getPrimaryKeyColumn, getPrimaryKeyColumnIdentifier, getSequence, getSequence, getSequenceColumn, getTable, getUniqueColumns, getUniqueConstraintIdentifier, getUniqueConstraintName, nextInternal, prepareStatement, refreshTable, resolveTableIdentifier, resolveTableName, run, setAllocate, setConfiguration, setIncrement, setInitialValue, setPrimaryKeyColumn, setSequence, setSequenceColumn, setTable, setTableName, setUniqueColumns, setUniqueConstraintName, setUniqueConstraintName, startConfigurationallocate, close, closeConnection, current, getConnection, next, setType, suspendInJTApublic boolean getIgnoreUnmapped()
public void setIgnoreUnmapped(boolean ignore)
@Deprecated public void setIgnoreVirtual(boolean ignore)
setIgnoreUnmapped(boolean). Retained for
backwards-compatibility for auto-configuration.public boolean getUseAliases()
public void setUseAliases(boolean aliases)
protected TableJDBCSeq.Status getStatus(ClassMapping mapping)
TableJDBCSeqgetStatus in class TableJDBCSeqprotected Column addPrimaryKeyColumn(Table table)
TableJDBCSeqaddPrimaryKeyColumn in class TableJDBCSeqprotected Object getPrimaryKey(ClassMapping mapping)
TableJDBCSeqgetPrimaryKey in class TableJDBCSeqpublic static void main(String[] args) throws Exception
JDBCConfiguration. Optional.JDBCConfiguration can be set by
using their names and supplying a value.Exceptionpublic static boolean run(JDBCConfiguration conf, String[] args, Options opts) throws Exception
Exceptionpublic static boolean run(JDBCConfiguration conf, String[] args, String action, MappingRepository repos, ClassLoader loader) throws Exception
ExceptionCopyright © 2006–2022 Apache Software Foundation. All rights reserved.