net.sf.fikin.sql.core
Class SetAutocommit

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

public class SetAutocommit
extends SQLPipeElement

A pipe element governing autocommit mode.

created on Dec 16, 2006

Since:
Version:
$Revision: 1.3 $
Author:
fiykov

Constructor Summary
SetAutocommit()
          create an element catching all exceptions and ignoring them
SetAutocommit(boolean autoCommitOn)
          create an element whit defualt exceptions handling based on catchErrors
 
Method Summary
 void execute(java.lang.String cmd)
          set on/off JDBC's connection to autocommit
 boolean getAutocommit()
          get current flag, if true all exceptions are ignored, otherwise false
 void setAutocommit(boolean autoCommitOn)
           
 
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

SetAutocommit

public SetAutocommit()
create an element catching all exceptions and ignoring them


SetAutocommit

public SetAutocommit(boolean autoCommitOn)
create an element whit defualt exceptions handling based on catchErrors

Parameters:
autoCommitOn - if true all exceptions will be silenced, if false they will be passed alog the calling pipe elements
Method Detail

execute

public void execute(java.lang.String cmd)
             throws java.sql.SQLException
set on/off JDBC's connection to autocommit

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

getAutocommit

public boolean getAutocommit()
get current flag, if true all exceptions are ignored, otherwise false

Returns:
true or false

setAutocommit

public void setAutocommit(boolean autoCommitOn)


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