org.apache.ojb.broker.util.sequence
Class SequenceManagerNextValImpl
java.lang.Object
org.apache.ojb.broker.util.sequence.AbstractSequenceManager
org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl
- All Implemented Interfaces:
- SequenceManager
- Direct Known Subclasses:
- SequenceManagerSeqHiLoImpl
- public class SequenceManagerNextValImpl
- extends AbstractSequenceManager
This SequenceManager implementation uses database
sequence key generation (e.g supported by
Oracle, SAP DB, PostgreSQL, ...).
This class is responsible for creating new unique ID's.
It is possible to define a sequence-name
field-descriptor attribute in the repository file. If
such an attribute was not found, the implementation build
an extent aware sequence name by its own.
Keep in mind when define a sequence name, that you are responsible
to be aware of extents, that is: if you ask for an uid for an
interface with several
implementor classes, or a baseclass with several subclasses the returned
uid have to be unique accross all tables representing objects of the
extent in question. Thus you have to use the same sequence-name
for all extents.
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, ditto
OJB does NOT try to create a database sequence entry when
for given sequence name no database sequence could be found.
|
Limitations:
- Version:
- $Id: SequenceManagerNextValImpl.java,v 1.13 2003/12/19 17:30:22 arminw Exp $
- Author:
- Edson Carlos Ericksson Richter, Rajeev Kaul, Thomas Mahler, Armin Waibel
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 |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequenceManagerNextValImpl
public SequenceManagerNextValImpl(PersistenceBroker broker)
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