|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.solarmetric.kodo.impl.jdbc.schema.AbstractSequenceFactory
|
+--com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory
SequenceFactory implementation that uses a database table
for sequence number generation. The table is created by the
SchemaTool.
| Field Summary | |
(package private) Column |
_pkColumn
|
(package private) ClassResolver |
_resolver
|
(package private) Column |
_seqColumn
|
| Constructor Summary | |
DBSequenceFactory()
|
|
| Method Summary | |
(package private) Table |
buildTable()
Creates the object-level representation of the sequence table. |
(package private) void |
dropTable(SQLExecutionManager manager)
Deprecated. Schema refreshing is not longer done at runtime via the initializeSchema(com.solarmetric.kodo.impl.jdbc.schema.SchemaTool, java.lang.Class) method. |
static Long |
getCurrentSequence(SQLExecutionManager manager,
boolean failOnMissing,
Select select)
Uses the given Select to obtain the current value of the
sequence, or null if there were no results. |
int |
getIncrement()
Return the increment to us when updating the sequence table. |
long |
getNext(Class cls,
Connector connector)
Return a unique primary key value for the given class. |
(package private) SQLBuffer |
getSequenceSeed(Class type)
|
(package private) Select |
getSequenceSelect(Class type)
|
String |
getTableName()
Return the table name to use to store sequence ids. |
void |
initializeSchema(SchemaTool tool,
Class type)
Initialize the schema. |
(package private) void |
refreshTable(SQLExecutionManager manager)
Deprecated. Schema refreshing is not longer done at runtime via the initializeSchema(com.solarmetric.kodo.impl.jdbc.schema.SchemaTool, java.lang.Class) method. |
void |
setConfiguration(JDBCConfiguration config,
DBDictionary dict)
Set the configuration for this factory; allows access to database connection information, etc. |
void |
setIncrement(int inc)
Set the increment to use when updating the sequence table. |
void |
setTableName(String name)
Set the table name for storing sequence ids. |
(package private) void |
updateSequence(Class cls,
SQLExecutionManager manager)
Grabs the next handful of sequence numbers. |
| Methods inherited from class com.solarmetric.kodo.impl.jdbc.schema.AbstractSequenceFactory |
getConfiguration, getDictionary, setConfiguration, setDictionary |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
transient Column _pkColumn
transient Column _seqColumn
final ClassResolver _resolver
| Constructor Detail |
public DBSequenceFactory()
| Method Detail |
public String getTableName()
public void setTableName(String name)
DBDictionarypublic int getIncrement()
public void setIncrement(int inc)
public long getNext(Class cls,
Connector connector)
throws SQLException
SequenceFactorygetNext in interface SequenceFactory
public void initializeSchema(SchemaTool tool,
Class type)
throws SQLException
initializeSchema in interface SchemaSequenceFactorycom.solarmetric.kodo.impl.jdbc.schema.SchemaSequenceFactorymanager - the SQLExecutionManager to use.type - the class that this sequence factory is being
initialize for.
final void refreshTable(SQLExecutionManager manager)
throws SQLException
initializeSchema(com.solarmetric.kodo.impl.jdbc.schema.SchemaTool, java.lang.Class) method.
SQLBuffer getSequenceSeed(Class type)
final void dropTable(SQLExecutionManager manager)
throws SQLException
initializeSchema(com.solarmetric.kodo.impl.jdbc.schema.SchemaTool, java.lang.Class) method.
public void setConfiguration(JDBCConfiguration config,
DBDictionary dict)
SequenceFactorysetConfiguration in interface SequenceFactorysetConfiguration in class AbstractSequenceFactoryTable buildTable()
void updateSequence(Class cls,
SQLExecutionManager manager)
throws SQLException
Select getSequenceSelect(Class type)
public static Long getCurrentSequence(SQLExecutionManager manager,
boolean failOnMissing,
Select select)
throws SQLException
Select to obtain the current value of the
sequence, or null if there were no results.
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||