net.sf.fikin.sql.core
Class JdbcConnection

java.lang.Object
  extended by net.sf.fikin.sql.SQLPipeElement
      extended by net.sf.fikin.sql.core.JdbcConnection

public class JdbcConnection
extends SQLPipeElement

Represent a JDBC Connection object as a pipe element

Typically it is placed in pipe immediately after an sql command has been formed so all consequent pipe elements can use it for performing actual operations with the database

created on Dec 15, 2006

Since:
Version:
$Revision: 1.4 $
Author:
fiykov

Constructor Summary
JdbcConnection(java.sql.Connection con)
          Instantiate the pipe element with the given connection
 
Method Summary
 void execute(java.lang.String cmd)
          pass the commnad to the next pipe element
 java.sql.Connection getConnection()
          get the jdbc connection
 void setConnection(java.sql.Connection con)
          set the jdbc connection
 
Methods inherited from class net.sf.fikin.sql.SQLPipeElement
getBaseClassName, getId, getNext, getPipe, setNext, setPipe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcConnection

public JdbcConnection(java.sql.Connection con)
Instantiate the pipe element with the given connection

Parameters:
con -
Method Detail

execute

public void execute(java.lang.String cmd)
             throws java.sql.SQLException
pass the commnad to the next pipe element

Specified by:
execute in class SQLPipeElement
Parameters:
cmd - to execute
Throws:
java.sql.SQLException - in case of error

setConnection

public void setConnection(java.sql.Connection con)
set the jdbc connection

Parameters:
con - to set

getConnection

public java.sql.Connection getConnection()
get the jdbc connection

Returns:
jdbc connection


Copyright © 2003-2007 Nikolay Fiykov. All Rights Reserved.