|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.rdbms.table.AbstractTable
org.jpox.store.rdbms.table.TableImpl
org.jpox.store.rdbms.table.SequenceTable
public class SequenceTable
Class defining a table for storing generated values. The table has 2 columns : a primary key String, and a value Long.
| Field Summary |
|---|
| Fields inherited from class org.jpox.store.rdbms.table.AbstractTable |
|---|
columns, columnsByName, completeDdl, dba, ddlWriter, existsInDatastore, identifier, LOCALISER, state, storeMgr |
| Fields inherited from interface org.jpox.store.rdbms.table.Table |
|---|
TABLE_STATE_INITIALIZED, TABLE_STATE_INITIALIZED_MODIFIED, TABLE_STATE_NEW, TABLE_STATE_PK_INITIALIZED, TABLE_STATE_VALIDATED, TABLE_TYPE_MISSING, TABLE_TYPE_TABLE, TABLE_TYPE_UNKNOWN, TABLE_TYPE_VIEW |
| Constructor Summary | |
|---|---|
SequenceTable(org.jpox.store.mapped.DatastoreIdentifier identifier,
RDBMSManager storeMgr,
java.lang.String seqNameColName,
java.lang.String nextValColName)
Constructor |
|
| Method Summary | |
|---|---|
void |
deleteAllSequences(org.jpox.ManagedConnection conn)
Method to delete all sequences |
void |
deleteSequence(java.lang.String sequenceName,
org.jpox.ManagedConnection conn)
Method to delete a sequence |
java.util.HashSet |
getFetchAllSequences(org.jpox.ManagedConnection conn)
Accessor for the sequences |
org.jpox.store.mapped.mapping.JavaTypeMapping |
getFieldMapping(org.jpox.metadata.AbstractMemberMetaData fmd)
Accessor the for the mapping for a field store in this table |
org.jpox.store.mapped.mapping.JavaTypeMapping |
getIDMapping()
Accessor for a mapping for the ID (PersistenceCapable) for this table. |
java.lang.Long |
getNextVal(java.lang.String sequenceName,
org.jpox.ManagedConnection conn,
int incrementBy,
org.jpox.store.mapped.DatastoreIdentifier tableIdentifier,
java.lang.String columnName,
int initialValue)
Accessor for the nextval of a sequence |
void |
initialize(org.jpox.ClassLoaderResolver clr)
Method to initialise the table. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SequenceTable(org.jpox.store.mapped.DatastoreIdentifier identifier,
RDBMSManager storeMgr,
java.lang.String seqNameColName,
java.lang.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.jpox.ClassLoaderResolver clr)
clr - The ClassLoaderResolverpublic org.jpox.store.mapped.mapping.JavaTypeMapping getIDMapping()
public java.util.HashSet getFetchAllSequences(org.jpox.ManagedConnection conn)
throws java.sql.SQLException
conn - Connection for this datastore.
java.sql.SQLException - Thrown when an error occurs in the process.
public java.lang.Long getNextVal(java.lang.String sequenceName,
org.jpox.ManagedConnection conn,
int incrementBy,
org.jpox.store.mapped.DatastoreIdentifier tableIdentifier,
java.lang.String columnName,
int initialValue)
throws java.sql.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)
java.sql.SQLException - Thrown when an error occurs in the process.
public void deleteSequence(java.lang.String sequenceName,
org.jpox.ManagedConnection conn)
throws java.sql.SQLException
sequenceName - conn - Connection to the datastore
java.sql.SQLException - Thrown when an error occurs deleting the schema.
public void deleteAllSequences(org.jpox.ManagedConnection conn)
throws java.sql.SQLException
conn - Connection to the datastore
java.sql.SQLException - Thrown when an error occurs deleting.public org.jpox.store.mapped.mapping.JavaTypeMapping getFieldMapping(org.jpox.metadata.AbstractMemberMetaData fmd)
fmd - MetaData for the field whose mapping we want
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||