|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.table.AbstractTable
org.datanucleus.store.rdbms.table.TableImpl
org.datanucleus.store.rdbms.valuegenerator.SequenceTable
public class SequenceTable
Class defining a table for storing generated values for use with TableGenerator. The table has 2 columns : a primary key String, and a value Long.
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.store.rdbms.table.AbstractTable |
|---|
columns, columnsByName, dba, existsInDatastore, identifier, LOCALISER, state, storeMgr, TABLE_STATE_INITIALIZED, TABLE_STATE_INITIALIZED_MODIFIED, TABLE_STATE_NEW, TABLE_STATE_PK_INITIALIZED, TABLE_STATE_VALIDATED |
| Constructor Summary | |
|---|---|
SequenceTable(org.datanucleus.store.mapped.DatastoreIdentifier identifier,
RDBMSStoreManager storeMgr,
String seqNameColName,
String nextValColName)
Constructor |
|
| Method Summary | |
|---|---|
void |
deleteAllSequences(org.datanucleus.store.connection.ManagedConnection conn)
Method to delete all sequences |
void |
deleteSequence(String sequenceName,
org.datanucleus.store.connection.ManagedConnection conn)
Method to delete a sequence |
HashSet |
getFetchAllSequences(org.datanucleus.store.connection.ManagedConnection conn)
Accessor for the sequences |
org.datanucleus.store.mapped.mapping.JavaTypeMapping |
getIdMapping()
Accessor for a mapping for the ID (PersistenceCapable) for this table. |
org.datanucleus.store.mapped.mapping.JavaTypeMapping |
getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Accessor the for the mapping for a field store in this table |
Long |
getNextVal(String sequenceName,
org.datanucleus.store.connection.ManagedConnection conn,
int incrementBy,
org.datanucleus.store.mapped.DatastoreIdentifier tableIdentifier,
String columnName,
int initialValue)
Accessor for the nextval of a sequence |
void |
initialize(org.datanucleus.ClassLoaderResolver clr)
Method to initialise the table. |
| Methods inherited from class org.datanucleus.store.rdbms.table.TableImpl |
|---|
createConstraints, dropConstraints, getExpectedCandidateKeys, getExpectedForeignKeys, getExpectedIndices, getPrimaryKey, getSQLAddCandidateKeyStatements, getSQLAddFKStatements, getSQLCreateIndexStatements, getSQLCreateStatements, getSQLDropStatements, initializeColumnInfoForPrimaryKeyColumns, initializeColumnInfoFromDatastore, postInitialize, preInitialize, validate, validateColumns, validateConstraints, validatePrimaryKey |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SequenceTable(org.datanucleus.store.mapped.DatastoreIdentifier identifier,
RDBMSStoreManager storeMgr,
String seqNameColName,
String nextValColName)
identifier - Datastore identifier for this tablestoreMgr - The RDBMSManager for this datastoreseqNameColName - Name for the "sequence name" columnnextValColName - Name for the "next value" column| Method Detail |
|---|
public void initialize(org.datanucleus.ClassLoaderResolver clr)
clr - The ClassLoaderResolverpublic org.datanucleus.store.mapped.mapping.JavaTypeMapping getIdMapping()
public HashSet getFetchAllSequences(org.datanucleus.store.connection.ManagedConnection conn)
throws SQLException
conn - Connection for this datastore.
SQLException - Thrown when an error occurs in the process.
public Long getNextVal(String sequenceName,
org.datanucleus.store.connection.ManagedConnection conn,
int incrementBy,
org.datanucleus.store.mapped.DatastoreIdentifier tableIdentifier,
String columnName,
int initialValue)
throws SQLException
conn - Connection for this datastore.sequenceName - The sequence name (the key)incrementBy - The amount to increment (from the current value)tableIdentifier - Identifier for the table being incremented (used when there is no current value)columnName - Name of the column being incremented (used when there is no current value)initialValue - Initial value (if not using tableIdentifier/columnName to find the initial value)
SQLException - Thrown when an error occurs in the process.
public void deleteSequence(String sequenceName,
org.datanucleus.store.connection.ManagedConnection conn)
throws SQLException
sequenceName - conn - Connection to the datastore
SQLException - Thrown when an error occurs deleting the schema.
public void deleteAllSequences(org.datanucleus.store.connection.ManagedConnection conn)
throws SQLException
conn - Connection to the datastore
SQLException - Thrown when an error occurs deleting.public org.datanucleus.store.mapped.mapping.JavaTypeMapping getMemberMapping(org.datanucleus.metadata.AbstractMemberMetaData mmd)
mmd - MetaData for the field whose mapping we want
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||