Class AbstractKeyGenerator
java.lang.Object
org.castor.cpa.persistence.sql.keygen.AbstractKeyGenerator
- All Implemented Interfaces:
KeyGenerator
- Direct Known Subclasses:
AbstractAfterKeyGenerator
,AbstractBeforeKeyGenerator
,NoKeyGenerator
,SequenceDuringKeyGenerator
Abstract Class that implements the KeyGenerator Interface and provide
implementation for methods that are common in more than one subclass of this
AbstractKeyGenerator.
- Version:
- $Revision$ $Date: 2009-07-13 17:22:43 (Tue, 28 Jul 2009) $
- Author:
- Ahmad Hassan, Ralf Joachim
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Close the JDBC Connection.final Connection
getSeparateConnection
(Database database) Operning new JDBC Connection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.castor.cpa.persistence.sql.keygen.KeyGenerator
buildStatement, executeStatement, generateKey, isInSameConnection
-
Constructor Details
-
AbstractKeyGenerator
public AbstractKeyGenerator()
-
-
Method Details
-
getSeparateConnection
Operning new JDBC Connection.- Parameters:
database
- The database on which it opens the JDBC connection.- Returns:
- A JDBC Connection
- Throws:
PersistenceException
- If fails to open connection.
-
closeSeparateConnection
Close the JDBC Connection.- Parameters:
conn
- A JDBC Connection.
-