java.lang.Object
org.jdbf.engine.keygen.HighLowKeyGenerator
- All Implemented Interfaces:
- KeyGenerator
- public class HighLowKeyGenerator
- extends java.lang.Object
- implements KeyGenerator
This is not the HighLow approach described by Scott Ambler in
Mapping Objects To Relational Databases.
Scott Ambler calls this the key-values approach, but others
use "HighLow" to describe a modified key-values approach which
does not use database access for each key.
- Version:
- $id$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keys
private java.util.Map keys
- Holds a KeyKeeper for each table. The table's name
is the key and the value is a KeyKeeper.
HighLowKeyGenerator
public HighLowKeyGenerator()
isBeforeInsert
public boolean isBeforeInsert()
- Generation of key is before insert.
- Specified by:
isBeforeInsert in interface KeyGenerator
generateKey
public java.lang.Object generateKey(org.jdbf.engine.repository.RepositoryView view,
java.sql.Connection conn,
java.lang.String vendor)
throws org.jdbf.engine.mapping.MappingException
- Returns a generated key.
- Specified by:
generateKey in interface KeyGenerator