Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jbreport.data
Class JavaPhysicalConnection  view JavaPhysicalConnection download JavaPhysicalConnection.java

java.lang.Object
  extended byjbreport.data.JavaPhysicalConnection
All Implemented Interfaces:
jbreport.Constants, PhysicalConnection

class JavaPhysicalConnection
extends java.lang.Object
implements jbreport.Constants, PhysicalConnection

This is used to extract a database connection from an existing application connection.

Version:
$Revision: 1.1.1.1 $

Field Summary
private  java.sql.Connection connection
          The connection to the database
private  jbreport.ConnectionFactory factory
          The factory used to obtain the database connection.
 
Fields inherited from interface jbreport.Constants
BASIC_HTML, BOUND_PARAMS, DS_JAVA, DS_JAVA_CONN_FACTORY, DS_JDBC, DS_JDBC_DRIVER, DS_JDBC_PWD, DS_JDBC_URL, DS_JDBC_USER, RE_BODY_ELEMENTS, RE_CHILDREN, RE_COLUMNS, RE_TABLE_CELLS, RE_TABLE_HEADER_ROW
 
Constructor Summary
JavaPhysicalConnection()
          Required by the interface.
 
Method Summary
 java.sql.Connection getConnection()
          Returns the database connection to the caller
 void initialize(java.lang.String datasourceType, java.util.Map properties)
          This method is called once, just after the instance is created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

private jbreport.ConnectionFactory factory
The factory used to obtain the database connection. We keep it here as the fetch is only done when the connection is requested.


connection

private java.sql.Connection connection
The connection to the database

Constructor Detail

JavaPhysicalConnection

public JavaPhysicalConnection()
Required by the interface.

Method Detail

initialize

public void initialize(java.lang.String datasourceType,
                       java.util.Map properties)
                throws jbreport.ReportException
Description copied from interface: PhysicalConnection
This method is called once, just after the instance is created. It should use the parameters in the map to initialize itself as appropriate.

Specified by:
initialize in interface PhysicalConnection

getConnection

public java.sql.Connection getConnection()
                                  throws jbreport.ReportException
Description copied from interface: PhysicalConnection
Returns the database connection to the caller

Specified by:
getConnection in interface PhysicalConnection