tomp.ext.jdbc
Class SQLSelectSource

java.lang.Object
  |
  +--tomp.ext.Base
        |
        +--tomp.ext.TreeSource
              |
              +--tomp.ext.jdbc.SQLSelectSource
All Implemented Interfaces:
Source

public class SQLSelectSource
extends TreeSource

Wrapper for a SQL SELECT command.

being processed, makes a XML tree from the returned db rows and provides a EXT Source.


Field Summary
 
Fields inherited from class tomp.ext.TreeSource
builder
 
Fields inherited from class tomp.ext.Base
action, application, status, STATUS, STATUS_ABORTED, STATUS_IN_PROCESSING, STATUS_NOT_PROCESSED, STATUS_READY, STATUS_READY_INVALID, STATUS_READY_VALID, validator
 
Constructor Summary
SQLSelectSource(Action e, java.lang.String id, Validator v, JDBCConnection conn, java.lang.String que, java.lang.String tableN, java.lang.String rowsN, java.lang.String resultURI, java.lang.String resultPrefix)
          Constructs the SQLSelectSource.
 
Method Summary
 int allocateName(java.lang.String tableName)
           
 void update()
          Builds the XML tree for the data returned from a SQL SELECT query.
 
Methods inherited from class tomp.ext.TreeSource
getAsRawSource
 
Methods inherited from class tomp.ext.Base
abortProcessing, commitProcessing, getAsSource, id, isReady, isValid, startProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface tomp.ext.Source
getAsSource, id, isReady, isValid
 

Constructor Detail

SQLSelectSource

public SQLSelectSource(Action e,
                       java.lang.String id,
                       Validator v,
                       JDBCConnection conn,
                       java.lang.String que,
                       java.lang.String tableN,
                       java.lang.String rowsN,
                       java.lang.String resultURI,
                       java.lang.String resultPrefix)
                throws EXTException

Constructs the SQLSelectSource.

Parameters:
e - action (used only for initializing the application field)
id - id
v - validator (may be null) for validating the obtained XML tree source
conn - the connection to be used for the DB query
que - the query to be use for the SELECT
tableN - name of the XML tree root element
rowsN - name of the element enclosing each SELECTed row
resultURI - URI of the namespace of the resulting XML tree
resultPrefix - prefix of the namespace of the resulting XML tree
Method Detail

allocateName

public int allocateName(java.lang.String tableName)

update

public void update()
            throws EXTException

Builds the XML tree for the data returned from a SQL SELECT query.

The tree can be later obtained by getAsRawSource().

EXTException