kodo.jdbc.schema
Interface SequenceFactory
- All Known Implementing Classes:
- ClassSequenceFactory, DBSequenceFactory, SimpleSequenceFactory
- public interface SequenceFactory
An implementation of the SequenceFactory interface is used to generate
unique primary key values for newly persisted JDO instances.
Multiple sequence factories may be used during the lifetime of a JDO
application. Most sequence factories will probably implement
Configurable to receive the system
configuration on construction.
addSchema
public void addSchema(ClassMapping mapping,
SchemaGroup group)
- Add any tables, etc needed by this factory for the given mapping
to the given schema group, if they do not exist already.
getNext
public long getNext(ClassMapping mapping,
DataSource ds)
throws Exception
- Return a unique primary key value.
- 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.