net.sf.fikin.sql.core
Class JdbcStatement

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

public class JdbcStatement
extends SQLPipeElement

Represetn a JDBC Statement as a pipe element

Typicaly it is placed after JdbcConnection (as it requires it) so that all consequent pipe elements can use it to sumit the sql command to the database

created on Dec 15, 2006

Since:
Version:
$Revision: 1.5 $
Author:
fiykov

Constructor Summary
JdbcStatement()
           
 
Method Summary
 void execute(java.lang.String cmd)
          instantiate a new jdbc statment if getStatement() is null and then pass the sql command to the next pipe element
 java.sql.Statement getStatement()
          get the jdbc statement
 void setStatement(java.sql.Statement stmt)
          assign the jdbc statement to be used
 
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

JdbcStatement

public JdbcStatement()
Method Detail

execute

public void execute(java.lang.String cmd)
             throws java.sql.SQLException
instantiate a new jdbc statment if getStatement() is null and then pass the sql command to the next pipe element

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

getStatement

public java.sql.Statement getStatement()
get the jdbc statement

Returns:
the jdbc statement

setStatement

public void setStatement(java.sql.Statement stmt)
assign the jdbc statement to be used

Parameters:
stmt - to use


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