|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.castor.cpa.persistence.sql.keygen.AbstractKeyGenerator
org.castor.cpa.persistence.sql.keygen.AbstractBeforeKeyGenerator
org.castor.cpa.persistence.sql.keygen.MaxKeyGenerator
public final class MaxKeyGenerator
MAX key generators.
MaxKeyGeneratorFactory| Constructor Summary | |
|---|---|
MaxKeyGenerator(PersistenceFactory factory,
int sqlType)
Initialize the MAX key generator. |
|
| Method Summary | |
|---|---|
java.lang.Object |
generateKey(java.sql.Connection conn,
java.lang.String tableName,
java.lang.String primKeyName)
Generate a new key for the specified table as "MAX(primary_key) + 1". |
boolean |
isInSameConnection()
Is key generated in the same connection as INSERT? For DURING_INSERT style this method is never called. |
| Methods inherited from class org.castor.cpa.persistence.sql.keygen.AbstractBeforeKeyGenerator |
|---|
bindIdentity, buildStatement, executeStatement |
| Methods inherited from class org.castor.cpa.persistence.sql.keygen.AbstractKeyGenerator |
|---|
closeSeparateConnection, getSeparateConnection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MaxKeyGenerator(PersistenceFactory factory,
int sqlType)
throws MappingException
factory - A PersistenceFactory instance.sqlType - A SQLTypidentifier.
MappingException - if this key generator is not compatible with the
persistance factory.| Method Detail |
|---|
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 name
PersistenceException - An error occured talking to persistent
storagepublic boolean isInSameConnection()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||