| java.lang.Object org.apache.ojb.broker.util.sequence.AbstractSequenceManager org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl
All known Subclasses: org.apache.ojb.broker.util.sequence.SequenceManagerSeqHiLoImpl,
SequenceManagerNextValImpl | public class SequenceManagerNextValImpl extends AbstractSequenceManager (Code) | | 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:
author: Edson Carlos Ericksson Richter author: Rajeev Kaul author: Thomas Mahler author: Armin Waibel version: $Id: SequenceManagerNextValImpl.java,v 1.17.2.4 2005/12/21 22:28:41 tomdz Exp $ |
getUniqueId | protected int getUniqueId(FieldDescriptor field) throws SequenceManagerException(Code) | | returns a unique int value for class clazz and field fieldName.
the returned number is unique accross all tables in the extent of clazz.
|
getUniqueLong | protected long getUniqueLong(FieldDescriptor field) throws SequenceManagerException(Code) | | returns a unique long value for class clazz and field fieldName.
the returned number is unique accross all tables in the extent of clazz.
|
|
|