| org.apache.ojb.broker.util.sequence.SequenceManager
All known Subclasses: org.apache.ojb.broker.util.sequence.AbstractSequenceManager,
SequenceManager | public interface SequenceManager (Code) | | SequenceManagers are responsible for creating new unique
ID's - unique accross all "extent" object declarations in OJB metadata.
There are some standard sequence manager implementations in
this package.
SequenceManager objects are obtained from a factory class called
SequenceManagerFactory .
This Factory can be configured to provide instances of user defined
implementors of this interface.
NOTE: SequenceManagers should be aware of "extents" ("extent" is an OJB inheritance feature),
that is: if you ask for an uid for an Interface (more exact for one implementor class)
with several implementor classes, or a baseclass with several subclasses the returned uid
should be unique accross all tables representing objects of the extent in question.
version: $Id: SequenceManager.java,v 1.10.2.6 2005/12/21 22:28:41 tomdz Exp $ |
afterStore | public void afterStore(JdbcAccess dbAccess, ClassDescriptor cld, Object obj) throws SequenceManagerException(Code) | | This method is called after the object was written to the persistent storage.
This is to support native Identity columns (auto_increment columns) on the db side.
Other implementations may ignore this method.
Parameters: dbAccess - Current used org.apache.ojb.broker.accesslayer.JdbcAccess instance Parameters: cld - Descriptor for specified object Parameters: obj - The object to associate with identity value |
getUniqueValue | public Object getUniqueValue(FieldDescriptor field) throws SequenceManagerException(Code) | | This method is called to get an unique value before the object
is written to persistent storage.
Returns a unique object for the given field attribute.
The returned value takes in account the jdbc-type
and the FieldConversion.sql2java() conversion defined for field .
The returned object is unique accross all tables of "extent" classes the
field belongs to.
Implementations using native identity columns should return a unique
incremented counter object for temporary use by OJB.
|
|
|