public final class UUIDKeyGenerator extends AbstractBeforeKeyGenerator
UUIDKeyGeneratorFactory
Constructor and Description |
---|
UUIDKeyGenerator(PersistenceFactory factory,
int sqlType)
Initialize the UUID key generator.
|
Modifier and Type | Method and 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.
|
boolean |
isInSameConnection()
Is key generated in the same connection as INSERT?
|
bindIdentity, buildStatement, executeStatement
closeSeparateConnection, getSeparateConnection
public UUIDKeyGenerator(PersistenceFactory factory, int sqlType) throws MappingException
factory
- Instance of PersistenceFactory to be used.sqlType
- SqlType variable to determine type.MappingException
- An exception indicating an invalid mapping error.public java.lang.Object generateKey(java.sql.Connection conn, java.lang.String tableName, java.lang.String primKeyName) throws PersistenceException
conn
- An open connection within the given transactiontableName
- The table nameprimKeyName
- The primary key namePersistenceException
- An error occured talking to persistent
storagepublic boolean isInSameConnection()
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com