public abstract class SimpleSQLAdapter extends SimpleAdapter
Abstract adapter dedicated to SQL statements input streams
The only methods to implement are the processQuery and processUpdate methods
err, log, out
Constructor and Description |
---|
SimpleSQLAdapter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDataSource()
Get target datasource name (null means default datasource)
|
java.lang.String |
preProcess()
Called before processing lines,
by default it sends the XML header to output
|
void |
process()
Processes each SQL statement
Each result line is passed to the processQuery or processUpdate method for SQL result processing |
abstract java.lang.String |
processSelect(java.lang.String sql,
java.util.Vector<java.lang.String[]> rows)
Select result processing
|
abstract java.lang.String |
processUpdate(java.lang.String sql,
int result)
Update result processing
|
void |
setDataSource(java.lang.String datasource)
Set target datasource name (null means default datasource)
|
append, appendError, appendLog, appendLog, close, directProcess, getErrorStream, getErrorWriter, getGrant, getInput, getInputReader, getInputStream, getLogStream, getLogWriter, getName, getOutput, getOutputStream, getOutputWriter, getParameter, getParameters, getProcessCount, getStatus, init, postProcess, setInputStream, setOutputStream, setParameter, setProcessCount, setStatus
public java.lang.String preProcess()
SimpleAdapter
Called before processing lines, by default it sends the XML header to output
preProcess
in interface AdapterInterface
preProcess
in class SimpleAdapter
public final java.lang.String getDataSource()
Get target datasource name (null means default datasource)
public final void setDataSource(java.lang.String datasource)
Set target datasource name (null means default datasource)
public void process() throws java.lang.InterruptedException
Processes each SQL statement
Each result line is passed to the processQuery or processUpdate method for SQL result processing
java.lang.InterruptedException
public abstract java.lang.String processSelect(java.lang.String sql, java.util.Vector<java.lang.String[]> rows) throws java.lang.Exception
Select result processing
sql
- SQL statementrows
- Result rows (including headers)java.lang.Exception
public abstract java.lang.String processUpdate(java.lang.String sql, int result) throws java.lang.Exception
Update result processing
sql
- SQL statementresult
- Resultjava.lang.Exception
Copyright (c)2006-2014 Simplicite Software. All Rights Reserved.