Class AbstractKeyGenerator
- java.lang.Object
-
- org.castor.cpa.persistence.sql.keygen.AbstractKeyGenerator
-
- All Implemented Interfaces:
KeyGenerator
- Direct Known Subclasses:
AbstractAfterKeyGenerator
,AbstractBeforeKeyGenerator
,NoKeyGenerator
,SequenceDuringKeyGenerator
public abstract class AbstractKeyGenerator extends java.lang.Object implements KeyGenerator
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 Constructor Description AbstractKeyGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeSeparateConnection(java.sql.Connection conn)
Close the JDBC Connection.java.sql.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
-
-
-
-
Method Detail
-
getSeparateConnection
public final java.sql.Connection getSeparateConnection(Database database) throws PersistenceException
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
public final void closeSeparateConnection(java.sql.Connection conn)
Close the JDBC Connection.- Parameters:
conn
- A JDBC Connection.
-
-