|
|||||||||
| Home >> All >> org >> apache >> ojb >> broker >> util >> [ sequence overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.ojb.broker.util.sequence
Interface SequenceManager

- All Known Implementing Classes:
- AbstractSequenceManager, SequenceManagerMySQLImpl
- public interface SequenceManager
SequenceManagers are responsible for creating new unique ID's - unique accross all extent objects. There are some standard sequence manager implementations in this package. SequenceManager objects are obtained from a Factory called SequenceManagerFactory. This Factory can be configured to provide instances of user defined implementors of this interface. SequenceManagers should be aware of extents, 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.6 2002/11/22 00:13:59 arminw Exp $
| Method Summary | |
void |
afterStore(org.apache.ojb.broker.accesslayer.JdbcAccess dbAccess,
org.apache.ojb.broker.metadata.ClassDescriptor cld,
java.lang.Object obj)
This is to support auto_increment columns on the db side * |
int |
getUniqueId(org.apache.ojb.broker.metadata.FieldDescriptor field)
Returns a unique integer value for the given field attribute. |
long |
getUniqueLong(org.apache.ojb.broker.metadata.FieldDescriptor field)
Returns a unique long value for the given field attribute. |
java.lang.Object |
getUniqueObject(org.apache.ojb.broker.metadata.FieldDescriptor field)
Returns a unique object for the given field attribute. |
java.lang.String |
getUniqueString(org.apache.ojb.broker.metadata.FieldDescriptor field)
Returns a unique String for the given field attribute. |
void |
setReferenceFKs(java.lang.Object obj,
org.apache.ojb.broker.metadata.ClassDescriptor cld)
This is used for database auto_increment/identity columns to set the reference foreign keys after they've been assigned by the db. |
| Method Detail |
getUniqueId
public int getUniqueId(org.apache.ojb.broker.metadata.FieldDescriptor field) throws SequenceManagerException
- Returns a unique integer value for the given field attribute.
The returned integer value is unique accross all tables in the extent
of class the field belongs to.
getUniqueLong
public long getUniqueLong(org.apache.ojb.broker.metadata.FieldDescriptor field) throws SequenceManagerException
- Returns a unique long value for the given field attribute.
The returned long value is unique accross all tables in the extent
of class the field belongs to.
getUniqueString
public java.lang.String getUniqueString(org.apache.ojb.broker.metadata.FieldDescriptor field) throws SequenceManagerException
- Returns a unique String for the given field attribute.
The returned String is unique accross all tables in the extent
of class the field belongs to.
getUniqueObject
public java.lang.Object getUniqueObject(org.apache.ojb.broker.metadata.FieldDescriptor field) throws SequenceManagerException
- Returns a unique object for the given field attribute.
The returned object is unique accross all tables in the extent
of class the field belongs to.
afterStore
public void afterStore(org.apache.ojb.broker.accesslayer.JdbcAccess dbAccess, org.apache.ojb.broker.metadata.ClassDescriptor cld, java.lang.Object obj) throws SequenceManagerException
- This is to support auto_increment columns on the db side
*
* high/low and other implementations may ignore this method. *
* Travis Reeder * * @param cld * @param obj
setReferenceFKs
public void setReferenceFKs(java.lang.Object obj, org.apache.ojb.broker.metadata.ClassDescriptor cld) throws SequenceManagerException
- This is used for database auto_increment/identity columns to set the reference
foreign keys after they've
been assigned by the db.
This can be ignored by high/low implementations
Travis Reeder
|
|||||||||
| Home >> All >> org >> apache >> ojb >> broker >> util >> [ sequence overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC