|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.fikin.sql.SQLPipeElement net.sf.fikin.sql.core.SqlsCounter
public class SqlsCounter
Counter of the sql commands
One can query the current counter from before of after in the pipe chain.
Counter is incremented even in case of SQLException during sql command execution.
It provides with built-in functionality to execute sql commands in the range of start-stop i.e. one can instantiate the element with start=5 and stop=10 which would result that all sql commands before 5 and after 10 will be ignored i.e. it will return from execute() without passing it to the next in the pipe.
created on Dec 16, 2006
Constructor Summary | |
---|---|
SqlsCounter()
create an element without any start-stop filtering |
|
SqlsCounter(int start)
create an element where it will pass sql commands after start |
|
SqlsCounter(int start,
int stop)
create an element where it will pass sql commands in between start-stop |
Method Summary | |
---|---|
void |
execute(java.lang.String cmd)
increment the sql command counter and pass it to the next in the pipe if current command is <start or >stop it will not pass it and simply return from the method |
int |
getCurrent()
get current sql command counter |
void |
setStart(int start)
assign start-from sql command |
void |
setStop(int stop)
assign stop-to sql command |
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 |
---|
public SqlsCounter()
public SqlsCounter(int start)
start
- public SqlsCounter(int start, int stop)
start
- stop
- Method Detail |
---|
public void setStart(int start)
start
- public void setStop(int stop)
stop
- public void execute(java.lang.String cmd) throws java.sql.SQLException
execute
in class SQLPipeElement
cmd
- to execute
java.sql.SQLException
- in case of errorpublic int getCurrent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |