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

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

public class SequenceManagerSeqHiLoImpl
extends SequenceManagerNextValImpl

A High/Low database sequence based implementation. See SequenceManagerNextValImpl for more information.

Implementation configuration properties:

Property Key Property Values
grabSize Integer entry determines the number of IDs allocated within the H/L sequence manager implementation. Default was '20'.
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.

Limitations:



Version:
$Id: SequenceManagerSeqHiLoImpl.java,v 1.7 2003/12/16 21:34:48 brj Exp $
Author:
Armin Waibel

Nested Class Summary
(package private)  class SequenceManagerSeqHiLoImpl.HiLoEntry
           
 
Field Summary
protected  int grabSize
           
static java.lang.String PROPERTY_GRAB_SIZE
           
 
Fields inherited from class org.apache.ojb.broker.util.sequence.AbstractSequenceManager
PROPERTY_AUTO_NAMING
 
Constructor Summary
SequenceManagerSeqHiLoImpl(PersistenceBroker broker)
           
 
Method Summary
protected  long getUniqueLong(FieldDescriptor field)
          returns a unique long value for class clazz and field fieldName.
 
Methods inherited from class org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl
buildNextSequence, createSequence, getUniqueId
 
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
 

Field Detail

PROPERTY_GRAB_SIZE

public static final java.lang.String PROPERTY_GRAB_SIZE
See Also:
Constant Field Values

grabSize

protected int grabSize
Constructor Detail

SequenceManagerSeqHiLoImpl

public SequenceManagerSeqHiLoImpl(PersistenceBroker broker)
Method Detail

getUniqueLong

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

Overrides:
getUniqueLong in class SequenceManagerNextValImpl
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