com.solarmetric.kodo.impl.jdbc.schema
Class ClassDBSequenceFactory
java.lang.Object
|
+--com.solarmetric.kodo.impl.jdbc.schema.AbstractSequenceFactory
|
+--com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory
|
+--com.solarmetric.kodo.impl.jdbc.schema.ClassDBSequenceFactory
- All Implemented Interfaces:
- SchemaSequenceFactory, SequenceFactory, Serializable
- public class ClassDBSequenceFactory
- extends DBSequenceFactory
- implements SchemaSequenceFactory
DBSequenceFactory subclass that overrides methods to
be class sensitive. Kept as a subclass to maintain DBSequenceFactory
efficiency. The table is automatically created
if not already present.
The table this plugin uses is not compatible with the one from
DBSequenceFactory
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_clsColumn
transient Column _clsColumn
ClassDBSequenceFactory
public ClassDBSequenceFactory()
getNext
public long getNext(Class cls,
Connector connector)
throws SQLException
- Description copied from interface:
SequenceFactory
- Return a unique primary key value for the given class.
- Specified by:
getNext in interface SequenceFactory- Overrides:
getNext in class DBSequenceFactory
getSequenceSelect
Select getSequenceSelect(Class type)
- Overrides:
getSequenceSelect in class DBSequenceFactory
initializeSchema
public void initializeSchema(SchemaTool tool,
Class type)
throws SQLException
- Creates the sequence table in the DB.
- Specified by:
initializeSchema in interface SchemaSequenceFactory- Overrides:
initializeSchema in class DBSequenceFactory
- Following copied from interface:
com.solarmetric.kodo.impl.jdbc.schema.SchemaSequenceFactory
- Parameters:
manager - the SQLExecutionManager to use.type - the class that this sequence factory is being
initialize for.
buildTable
Table buildTable()
- Creates the object-level representation of the sequence table.
- Overrides:
buildTable in class DBSequenceFactory
updateSequence
void updateSequence(Class cls,
SQLExecutionManager manager)
throws SQLException
- Grabs the next handful of sequence numbers.
- Overrides:
updateSequence in class DBSequenceFactory
Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.