KeyGeneratorpublic final class SequenceAfterKeyGenerator extends AbstractAfterKeyGenerator
| Constructor | Description | 
|---|---|
SequenceAfterKeyGenerator(PersistenceFactory factory,
                         java.util.Properties params,
                         int sqlType) | 
 Initialize the SEQUENCE key generator for AFTER_INSERT style 
  
generateKey(java.sql.Connection, java.lang.String, java.lang.String) is called after INSERT. | 
| Modifier and Type | Method | Description | 
|---|---|---|
java.lang.Object | 
generateKey(java.sql.Connection conn,
           java.lang.String tableName,
           java.lang.String primKeyName) | 
 Generate a new key for the specified table. 
 | 
protected void | 
initSqlTypeHandler(int sqlType) | 
 Initialize the Handler based on SQL Type. 
 | 
boolean | 
isInSameConnection() | 
 Is key generated in the same connection as INSERT?
 For DURING_INSERT style this method is never called. 
 | 
buildStatement, executeStatementcloseSeparateConnection, getSeparateConnectionpublic SequenceAfterKeyGenerator(PersistenceFactory factory, java.util.Properties params, int sqlType) throws MappingException
generateKey(java.sql.Connection, java.lang.String, java.lang.String) is called after INSERT.factory - A PersistenceFactory instance.params - Database engine specific parameters.sqlType - A SQLTypidentifier.MappingException - if this key generator is not compatible with the
         persistance factory.protected void initSqlTypeHandler(int sqlType)
sqlType - A SQLTypidentifier.public java.lang.Object generateKey(java.sql.Connection conn,
                                    java.lang.String tableName,
                                    java.lang.String primKeyName)
                             throws PersistenceException
KeyGeneratorconn - An open connection within the given transaction.tableName - The table name.primKeyName - The primary key name.PersistenceException - An error occured talking to persistent storage.public boolean isInSameConnection()
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com