|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.dtm.ref.DTMDefaultBase org.apache.xml.dtm.ref.DTMDefaultBaseTraversers org.apache.xml.dtm.ref.DTMDefaultBaseIterators org.apache.xalan.lib.sql.DTMDocument org.apache.xalan.lib.sql.SQLDocument
The SQL Document is the main controlling class the executesa SQL Query
Nested Class Summary |
Nested classes inherited from class org.apache.xalan.lib.sql.DTMDocument |
DTMDocument.CharacterNodeHandler |
Nested classes inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseIterators |
|
Nested classes inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseTraversers |
|
Field Summary | |
private boolean |
DEBUG
|
private int |
m_Col_TypeID
|
private int |
m_ColAttrib_CASESENSITIVE_TypeID
|
private int |
m_ColAttrib_CATALOGUE_NAME_TypeID
|
private int |
m_ColAttrib_COLUMN_LABEL_TypeID
|
private int |
m_ColAttrib_COLUMN_NAME_TypeID
|
private int |
m_ColAttrib_COLUMN_TYPE_TypeID
|
private int |
m_ColAttrib_COLUMN_TYPENAME_TypeID
|
private int |
m_ColAttrib_DEFINITLEYWRITEABLE_TypeID
|
private int |
m_ColAttrib_DISPLAY_SIZE_TypeID
|
private int |
m_ColAttrib_ISNULLABLE_TypeID
|
private int |
m_ColAttrib_ISSEARCHABLE_TypeID
|
private int |
m_ColAttrib_ISSIGNED_TypeID
|
private int |
m_ColAttrib_ISWRITEABLE_TypeID
|
private int |
m_ColAttrib_PRECISION_TypeID
|
private int |
m_ColAttrib_SCALE_TypeID
|
private int |
m_ColAttrib_SCHEMA_NAME_TypeID
|
private int |
m_ColAttrib_TABLE_NAME_TypeID
|
private int |
m_ColCount
An indicator on how many columns are in this query |
private int[] |
m_ColHeadersIdx
As the column header array is built, keep the node index for each Column. |
private int |
m_ColumnHeader_TypeID
|
private Connection |
m_Connection
The DBMS Connection used to produce this SQL Document. |
private ConnectionPool |
m_ConnectionPool
The Connection Pool that originally produced the connection. |
private int |
m_FirstRowIdx
Demark the first row element where we started adding rows into the Document. |
private int |
m_LastRowIdx
Keep track of the Last row inserted into the DTM from the ResultSet. |
private int |
m_MetaData_TypeID
|
private int |
m_MetaDataIdx
The Index of the MetaData Node. |
private ResultSet |
m_ResultSet
The conduit to our data that will be used to fill the document. |
private int |
m_Row_TypeID
|
private int |
m_RowSet_TypeID
|
private int |
m_RowSetIdx
The index of the Row Set node. |
private int |
m_SQL_TypeID
|
private int |
m_SQLIdx
|
private Statement |
m_Statement
The Statement used to extract the data from the Database connection. |
private boolean |
m_StreamingMode
Streaming Mode Control, In Streaming mode we reduce the memory footprint since we only use a single row instance. |
private static String |
S_CASESENSITIVE
|
private static String |
S_CATALOGUE_NAME
|
private static String |
S_COL
|
private static String |
S_COLUMN_HEADER
|
private static String |
S_COLUMN_LABEL
|
private static String |
S_COLUMN_NAME
|
private static String |
S_COLUMN_TYPE
|
private static String |
S_COLUMN_TYPENAME
|
private static String |
S_DEFINITLEYWRITABLE
|
private static String |
S_DISPLAY_SIZE
|
private static String |
S_ISNULLABLE
|
private static String |
S_ISSEARCHABLE
|
private static String |
S_ISSIGNED
|
private static String |
S_ISWRITEABLE
|
private static String |
S_METADATA
|
private static String |
S_NAMESPACE
|
private static String |
S_PRECISION
|
private static String |
S_ROW
|
private static String |
S_ROW_SET
|
private static String |
S_SCALE
|
private static String |
S_SCHEMA_NAME
|
private static String |
S_SQL
|
private static String |
S_TABLE_NAME
|
Fields inherited from class org.apache.xalan.lib.sql.DTMDocument |
m_attribute, m_Document_TypeID, m_DocumentIdx, m_ObjectArray, m_TextNode_TypeID, S_ATTRIB_NOT_SUPPORTED, S_DOCUMENT, S_ELEMENT_NODE, S_ISFALSE, S_ISTRUE, S_TEXT_NODE |
Fields inherited from class org.apache.xml.dtm.ref.DTMDefaultBase |
m_blocksize, m_documentBaseURI, m_dtmIdent, m_elemIndexes, m_expandedNameTable, m_exptype, m_firstch, m_indexing, m_initialblocksize, m_mgr, m_mgrDefault, m_namespaceDeclSetElements, m_namespaceDeclSets, m_nextsib, m_parent, m_prevsib, m_shouldStripWhitespaceStack, m_shouldStripWS, m_size, m_traversers, m_wsfilter, m_xstrf, NOTPROCESSED |
Fields inherited from interface org.apache.xml.dtm.DTM |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NAMESPACE_NODE, NOTATION_NODE, NTYPES, NULL, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
SQLDocument(DTMManager mgr,
int ident,
ConnectionPool pool,
Connection con,
Statement stmt,
ResultSet data,
boolean streamingMode)
|
Method Summary | |
protected int |
_nextsib(int identity)
Get the next sibling for the given node identity. |
private boolean |
addRowToDTMFromResultSet()
Pull a record from the result set and map it to a DTM based ROW If we are in Streaming mode, then only create a single row and keep copying the data into the same row. |
void |
close()
Clean up our ties to the database but this does not necessarly clean up the document. |
void |
closeOnError()
When an error occurs, the XConnection will call this method do that we can deal with the Connection properly |
protected void |
createExpandedNameTable()
Populate the Expanded Name Table with the Node that we will use. |
void |
documentRegistration()
A dummy routine to satisify the abstract interface. |
void |
documentRelease()
A dummy routine to satisify the abstract interface. |
private void |
extractSQLMetaData(ResultSetMetaData meta)
Extract the Meta Data and build the Column Attribute List. |
protected boolean |
nextNode()
This method should try and build one or more nodes in the table. |
Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBase |
dumpDTM, dumpNode, getDocumentRoot, getDTMIDs, getManager, makeNodeHandle, makeNodeIdentity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private boolean DEBUG
private static final String S_NAMESPACE
private static final String S_SQL
private static final String S_ROW_SET
private static final String S_METADATA
private static final String S_COLUMN_HEADER
private static final String S_ROW
private static final String S_COL
private static final String S_CATALOGUE_NAME
private static final String S_DISPLAY_SIZE
private static final String S_COLUMN_LABEL
private static final String S_COLUMN_NAME
private static final String S_COLUMN_TYPE
private static final String S_COLUMN_TYPENAME
private static final String S_PRECISION
private static final String S_SCALE
private static final String S_SCHEMA_NAME
private static final String S_TABLE_NAME
private static final String S_CASESENSITIVE
private static final String S_DEFINITLEYWRITABLE
private static final String S_ISNULLABLE
private static final String S_ISSIGNED
private static final String S_ISWRITEABLE
private static final String S_ISSEARCHABLE
private int m_SQL_TypeID
private int m_MetaData_TypeID
private int m_ColumnHeader_TypeID
private int m_RowSet_TypeID
private int m_Row_TypeID
private int m_Col_TypeID
private int m_ColAttrib_CATALOGUE_NAME_TypeID
private int m_ColAttrib_DISPLAY_SIZE_TypeID
private int m_ColAttrib_COLUMN_LABEL_TypeID
private int m_ColAttrib_COLUMN_NAME_TypeID
private int m_ColAttrib_COLUMN_TYPE_TypeID
private int m_ColAttrib_COLUMN_TYPENAME_TypeID
private int m_ColAttrib_PRECISION_TypeID
private int m_ColAttrib_SCALE_TypeID
private int m_ColAttrib_SCHEMA_NAME_TypeID
private int m_ColAttrib_TABLE_NAME_TypeID
private int m_ColAttrib_CASESENSITIVE_TypeID
private int m_ColAttrib_DEFINITLEYWRITEABLE_TypeID
private int m_ColAttrib_ISNULLABLE_TypeID
private int m_ColAttrib_ISSIGNED_TypeID
private int m_ColAttrib_ISWRITEABLE_TypeID
private int m_ColAttrib_ISSEARCHABLE_TypeID
private Connection m_Connection
private Statement m_Statement
private ResultSet m_ResultSet
private ConnectionPool m_ConnectionPool
private int[] m_ColHeadersIdx
private int m_ColCount
private int m_MetaDataIdx
private int m_RowSetIdx
private int m_SQLIdx
private int m_FirstRowIdx
private int m_LastRowIdx
private boolean m_StreamingMode
Constructor Detail |
public SQLDocument(DTMManager mgr, int ident, ConnectionPool pool, Connection con, Statement stmt, ResultSet data, boolean streamingMode) throws SQLException
mgr
- ident
- pool
- con
- stmt
- data
- streamingMode
-
SQLException
Method Detail |
private void extractSQLMetaData(ResultSetMetaData meta)
meta
-
protected void createExpandedNameTable()
createExpandedNameTable
in class DTMDocument
private boolean addRowToDTMFromResultSet()
public void close()
public void closeOnError()
protected boolean nextNode()
DTMDefaultBase
nextNode
in class DTMDocument
protected int _nextsib(int identity)
DTMDefaultBase
_nextsib
in class DTMDocument
identity
-
public void documentRegistration()
DTMDefaultBase
documentRegistration
in interface DTM
documentRegistration
in class DTMDefaultBase
public void documentRelease()
DTMDefaultBase
documentRelease
in interface DTM
documentRelease
in class DTMDefaultBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |