org.castor.cpa.persistence.sql.engine
Class CastorConnection

java.lang.Object
  extended by org.castor.cpa.persistence.sql.engine.CastorConnection

public final class CastorConnection
extends Object

CastorConnection class holding connection and factory parameters to encapsulate their usage in case of creation of CastorStatements.

Version:
$Revision: 8469 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Dennis Butterstein, Ralf Joachim

Constructor Summary
CastorConnection(Connection connection, PersistenceFactory factory)
          Constructor.
 
Method Summary
 CastorStatement createStatement()
          Method to create new CastorStatement using local instances of Connection & PersistenceFactory.
 Connection getConnection()
          Getter returning current _connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CastorConnection

public CastorConnection(Connection connection,
                        PersistenceFactory factory)
Constructor.

Parameters:
connection - Instance of the connection to be used to create CastorStatements.
factory - Instance of PersistenceFactory to be used to create CastorStatements.
Method Detail

createStatement

public CastorStatement createStatement()
Method to create new CastorStatement using local instances of Connection & PersistenceFactory.

Returns:
New instance of CastorStatement.

getConnection

public Connection getConnection()
Getter returning current _connection.

Returns:
Connection currently set.


Copyright © 2011. All Rights Reserved.