kodo.jdbc.schema
Class SimpleSequenceFactory
java.lang.Object
|
+--kodo.jdbc.schema.SimpleSequenceFactory
- All Implemented Interfaces:
- SequenceFactory
- public class SimpleSequenceFactory
- extends Object
- implements SequenceFactory
Very simple sequence factory that uses a static counter initialized
to the current time to create unique id values.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSequenceFactory
public SimpleSequenceFactory()
addSchema
public void addSchema(ClassMapping mapping,
SchemaGroup group)
- Description copied from interface:
SequenceFactory
- Add any tables, etc needed by this factory for the given mapping
to the given schema group, if they do not exist already.
- Specified by:
addSchema in interface SequenceFactory
getNext
public long getNext(ClassMapping mapping,
DataSource ds)
throws Exception
- Description copied from interface:
SequenceFactory
- Return a unique primary key value.
- Specified by:
getNext in interface SequenceFactory
- Following copied from interface:
kodo.jdbc.schema.SequenceFactory
- Parameters:
mapping - metadata on the class of the object being persistedds - the data source from which to obtain database
connections, if any are needed- Throws:
javax.jdo.JDOException, - or some subclass
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.