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

Quick Search    Search Deep

org.jdbf.engine.sql.connection
Class ConnectionSource  view ConnectionSource download ConnectionSource.java

java.lang.Object
  extended byorg.jdbf.engine.sql.connection.ConnectionSource

public class ConnectionSource
extends java.lang.Object

This class provides an object Connection.i ConnecitonSource contains the state of connection also.When a connection has is got by ConnectionManager, it is marked as in use and it is locked until releaseConnection method is invoked.


Field Summary
private  java.sql.Connection connection
          Connection object
private  boolean isUsed
          flag that indicates if connection is in use
private  java.lang.String vendor
          Database's vendor
 
Constructor Summary
ConnectionSource()
          Creates an empty object
ConnectionSource(java.sql.Connection connection, java.lang.String vendor)
          Creates a ConnectionSource object.
 
Method Summary
 void closeConnection()
          Close the connection
 java.sql.Connection getConnection()
          Returns the Connection object.
 java.lang.String getVendor()
          Return name of database vendor
 boolean isUsed()
          Return the state of ConnectionSource
 void releaseConnection()
          Release the connection.
 void setConnection(java.sql.Connection connection)
          Sets the Connection object
 void setVendor(java.lang.String vendor)
          Set the name of database vendor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

private java.sql.Connection connection
Connection object


isUsed

private boolean isUsed
flag that indicates if connection is in use


vendor

private java.lang.String vendor
Database's vendor

Constructor Detail

ConnectionSource

public ConnectionSource()
Creates an empty object


ConnectionSource

public ConnectionSource(java.sql.Connection connection,
                        java.lang.String vendor)
Creates a ConnectionSource object.

Method Detail

closeConnection

public void closeConnection()
                     throws java.sql.SQLException
Close the connection


getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Returns the Connection object.


isUsed

public boolean isUsed()
Return the state of ConnectionSource


getVendor

public java.lang.String getVendor()
Return name of database vendor


setConnection

public void setConnection(java.sql.Connection connection)
Sets the Connection object


setVendor

public void setVendor(java.lang.String vendor)
Set the name of database vendor


releaseConnection

public void releaseConnection()
Release the connection.