org.springframework.jdbc.datasource
Class SimpleConnectionHandle

java.lang.Object
  extended by org.springframework.jdbc.datasource.SimpleConnectionHandle
All Implemented Interfaces:
ConnectionHandle

public class SimpleConnectionHandle
extends java.lang.Object
implements ConnectionHandle

Simple implementation of the ConnectionHandle interface, containing a given JDBC Connection.

Since:
1.1
Author:
Juergen Hoeller

Field Summary
private  java.sql.Connection connection
           
 
Constructor Summary
SimpleConnectionHandle(java.sql.Connection connection)
          Create a new SimpleConnectionHandle for the given Connection.
 
Method Summary
 java.sql.Connection getConnection()
          Return the specified Connection as-is.
 void releaseConnection(java.sql.Connection con)
          This implementation is empty, as we're using a standard Connection handle that does not have to be released.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

connection

private final java.sql.Connection connection
Constructor Detail

SimpleConnectionHandle

public SimpleConnectionHandle(java.sql.Connection connection)
Create a new SimpleConnectionHandle for the given Connection.

Parameters:
connection - the JDBC Connection
Method Detail

getConnection

public java.sql.Connection getConnection()
Return the specified Connection as-is.

Specified by:
getConnection in interface ConnectionHandle

releaseConnection

public void releaseConnection(java.sql.Connection con)
This implementation is empty, as we're using a standard Connection handle that does not have to be released.

Specified by:
releaseConnection in interface ConnectionHandle
Parameters:
con - the JDBC Connection to release

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object