|
||||||||||
| 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.HighLowKeyGenerator
public final class HighLowKeyGenerator
HIGH-LOW key generators.
HighLowKeyGeneratorFactory| Constructor Summary | |
|---|---|
HighLowKeyGenerator(PersistenceFactory factory,
Properties params,
int sqlType)
Initialize the HIGH-LOW key generator. |
|
| Method Summary | |
|---|---|
Object |
generateKey(Connection conn,
String tableName,
String primKeyName)
Generate a new key for the specified table. |
void |
initFromParameters(Properties params)
Method to init some class variables. |
boolean |
isInSameConnection()
Is key generated in the same connection as INSERT? |
| 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 HighLowKeyGenerator(PersistenceFactory factory,
Properties params,
int sqlType)
throws MappingException
factory - A PersistenceFactory instance.params - Database engine specific parameters.sqlType - A SQLTypidentifier.
MappingException - if this key generator is not compatible with the
persistance factory.| Method Detail |
|---|
public void initFromParameters(Properties params)
throws MappingException
params - Database engine specific parameters.
MappingException - if this key generator is not compatible with the
persistance factory.
public Object generateKey(Connection conn,
String tableName,
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 | |||||||||