org.apache.ojb.broker.util.sequence
Class SequenceManagerNativeImpl
java.lang.Object
org.apache.ojb.broker.util.sequence.AbstractSequenceManager
org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl
- All Implemented Interfaces:
- SequenceManager
- public class SequenceManagerNativeImpl
- extends AbstractSequenceManager
Sequence manager implementation using native database Identity columns
(like MySQL, MSSQL, ...). For proper work some specific metadata settings
needed:
- field representing the identity column need attribute
autoincrement
'true'
- field representing the identity column need attribute
access
set 'readonly'
- field representing the identity column need attribute
primarykey
set 'true'
- only possible to declare one identity field per class
Note:
Make sure generated identity columns represent values >0, negative values
intern used by this implementation (thus identity columns should start with 1 or higher)
Implementation configuration properties:
Property Key |
Property Values |
no properties to set |
|
Limitations:
- Native key generation is not 'extent aware'
when extent classes span several tables! Please
see more in shipped docs 'extents and polymorphism'
or sequence manager docs.
- Version:
- $Id: SequenceManagerNativeImpl.java,v 1.12 2003/12/09 22:48:20 arminw Exp $
- Author:
- Travis Reeder, Armin Waibel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequenceManagerNativeImpl
public SequenceManagerNativeImpl(PersistenceBroker broker)
afterStore
public void afterStore(JdbcAccess dbAccess,
ClassDescriptor cld,
java.lang.Object obj)
throws SequenceManagerException
- Description copied from class:
AbstractSequenceManager
- noop
- Specified by:
afterStore
in interface SequenceManager
- Overrides:
afterStore
in class AbstractSequenceManager
- Throws:
SequenceManagerException
setReferenceFKs
public void setReferenceFKs(java.lang.Object obj,
ClassDescriptor cld)
throws SequenceManagerException
- Description copied from class:
AbstractSequenceManager
- noop
- Specified by:
setReferenceFKs
in interface SequenceManager
- Overrides:
setReferenceFKs
in class AbstractSequenceManager
- Throws:
SequenceManagerException
lastInsertSelect
protected java.lang.String lastInsertSelect(java.lang.String tableName)
getUniqueLong
protected long getUniqueLong(FieldDescriptor field)
throws SequenceManagerException
- returns a negative value
- 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