| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.util.sequence.AbstractSequenceManager
public abstract class AbstractSequenceManager
A base class for sequence manager implementations.
 
 All sequence manager implementations need a constructor
 with a PersistenceBroker argument used by the
 SequenceManagerFactory.
| Field Summary | |
|---|---|
private  PersistenceBroker | 
brokerForClass
 | 
private  Properties | 
configurationProperties
 | 
protected static String | 
GLOBAL_SEQUENCE_NAME
 | 
private  Platform | 
platform
 | 
static String | 
PROPERTY_AUTO_NAMING
 | 
| Constructor Summary | |
|---|---|
AbstractSequenceManager(PersistenceBroker broker)
Constructor used by SequenceManagerFactory | 
|
| Method Summary | |
|---|---|
 void | 
afterStore(JdbcAccess dbAccess,
                     ClassDescriptor cld,
                     Object obj)
noop  | 
 String | 
calculateSequenceName(FieldDescriptor field)
 | 
 PersistenceBroker | 
getBrokerForClass()
 | 
 Properties | 
getConfigurationProperties()
 | 
 String | 
getConfigurationProperty(String key,
                                                 String defaultValue)
 | 
 Platform | 
getPlatform()
 | 
protected abstract  long | 
getUniqueLong(FieldDescriptor field)
returns a unique long value for field.  | 
 Object | 
getUniqueValue(FieldDescriptor field)
Returns a unique object for the given field attribute.  | 
 void | 
setConfigurationProperties(Properties prop)
 | 
 void | 
setConfigurationProperty(String key,
                                                 String value)
 | 
 void | 
setReferenceFKs(Object obj,
                               ClassDescriptor cld)
noop  | 
 boolean | 
useAutoNaming()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String PROPERTY_AUTO_NAMING
protected static final String GLOBAL_SEQUENCE_NAME
private PersistenceBroker brokerForClass
private Platform platform
private Properties configurationProperties
| Constructor Detail | 
|---|
public AbstractSequenceManager(PersistenceBroker broker)
SequenceManagerFactory
broker - PB instance to perform the
 id generation.| Method Detail | 
|---|
protected abstract long getUniqueLong(FieldDescriptor field)
                               throws SequenceManagerException
SequenceManagerExceptionpublic Platform getPlatform()
public PersistenceBroker getBrokerForClass()
public Properties getConfigurationProperties()
public void setConfigurationProperties(Properties prop)
public String getConfigurationProperty(String key,
                                       String defaultValue)
public void setConfigurationProperty(String key,
                                     String value)
public boolean useAutoNaming()
public String calculateSequenceName(FieldDescriptor field)
                             throws SequenceManagerException
SequenceManagerException
public Object getUniqueValue(FieldDescriptor field)
                      throws SequenceManagerException
field.
 The returned object is unique accross all tables in the extent
 of class the field belongs to.
getUniqueValue in interface SequenceManagerSequenceManagerException
public void afterStore(JdbcAccess dbAccess,
                       ClassDescriptor cld,
                       Object obj)
                throws SequenceManagerException
afterStore in interface SequenceManagerdbAccess - Current used JdbcAccess instancecld - Descriptor for specified objectobj - The object to associate with identity value
SequenceManagerException
public void setReferenceFKs(Object obj,
                            ClassDescriptor cld)
                     throws SequenceManagerException
SequenceManagerException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||