java.lang.Object
org.jdbf.engine.keygen.MaxKeyGenerator
- All Implemented Interfaces:
- KeyGenerator
- public class MaxKeyGenerator
- extends java.lang.Object
- implements KeyGenerator
MaxKeyGenerator representes the key generator that creates OID
Obtains a key by adding 1 to the highest key in the table. This class has been
developed on Max approach described by Scott Ambler in
Mapping Objects To Relational
Databases.
- Version:
- $id$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MaxKeyGenerator
public MaxKeyGenerator()
isBeforeInsert
public boolean isBeforeInsert()
- Return true if before insert., false otherwise
- 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
- Obtains a key by adding 1 to the highest key in the table. This method
obtain a key creating a MAX select statement.
- Specified by:
generateKey in interface KeyGenerator