org.apache.ojb.broker.util.sequence
Class SequenceManagerInMemoryImpl

java.lang.Object
  extended byorg.apache.ojb.broker.util.sequence.AbstractSequenceManager
      extended byorg.apache.ojb.broker.util.sequence.SequenceManagerInMemoryImpl
All Implemented Interfaces:
SequenceManager

public class SequenceManagerInMemoryImpl
extends AbstractSequenceManager

Very fast in memory sequence manager implementation, only the first time an id was requested for a class, the manager query the database for the max id in requested column - all following request were performed in memory.

Limitations:

Implementation configuration properties:

Property Key Property Values
autoNaming Default was 'true'. If set 'true' OJB try to build a sequence name automatic if none found in field-descriptor and set this generated name as sequence-name in field-descriptor. If set 'false' OJB throws an exception if none sequence name was found in field-descriptor.



Version:
$Id: SequenceManagerInMemoryImpl.java,v 1.12 2003/08/13 18:16:10 arminw Exp $
Author:
Armin Waibel
See Also:
SequenceManager, SequenceManagerFactory, SequenceManagerHelper

Field Summary
 
Fields inherited from class org.apache.ojb.broker.util.sequence.AbstractSequenceManager
PROPERTY_AUTO_NAMING
 
Constructor Summary
SequenceManagerInMemoryImpl(PersistenceBroker broker)
           
 
Method Summary
protected  long getUniqueLong(FieldDescriptor field)
          returns a unique long value for field.
 
Methods inherited from class org.apache.ojb.broker.util.sequence.AbstractSequenceManager
afterStore, calculateSequenceName, getBrokerForClass, getConfigurationProperties, getConfigurationProperty, getPlatform, getUniqueValue, setConfigurationProperties, setConfigurationProperty, setReferenceFKs, useAutoNaming
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceManagerInMemoryImpl

public SequenceManagerInMemoryImpl(PersistenceBroker broker)
Method Detail

getUniqueLong

protected long getUniqueLong(FieldDescriptor field)
                      throws SequenceManagerException
Description copied from class: AbstractSequenceManager
returns a unique long value for field. the returned number is unique accross all tables in the extent of clazz.

Specified by:
getUniqueLong in class AbstractSequenceManager
Throws:
SequenceManagerException


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14