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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
- idv
- validator (may be null) for validating the obtained XML tree sourceconn
- the connection to be used for the DB queryque
- the query to be use for the SELECTtableN
- name of the XML tree root elementrowsN
- name of the element enclosing each SELECTed rowresultURI
- URI of the namespace of the resulting XML treeresultPrefix
- prefix of the namespace of the resulting XML tree
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