SolarMetric Kodo JDO 3.0.3 generated on February 20 2004

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.


Constructor Summary
SimpleSequenceFactory()
           
 
Method Summary
 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.
 long getNext(ClassMapping mapping, DataSource ds)
          Return a unique primary key value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSequenceFactory

public SimpleSequenceFactory()
Method Detail

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 persisted
ds - the data source from which to obtain database connections, if any are needed
Throws:
javax.jdo.JDOException, - or some subclass

SolarMetric Kodo JDO 3.0.3 generated on February 20 2004

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.