org.apache.xalan.lib.sql

Class SQLDocument

Implemented Interfaces:
DTM

public class SQLDocument
extends DTMDocument

The SQL Document is the main controlling class the executesa SQL Query

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.xalan.lib.sql.DTMDocument

DTMDocument.CharacterNodeHandler

Nested classes/interfaces inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseIterators

DTMDefaultBaseIterators.AncestorIterator, DTMDefaultBaseIterators.AttributeIterator, DTMDefaultBaseIterators.ChildrenIterator, DTMDefaultBaseIterators.DescendantIterator, DTMDefaultBaseIterators.FollowingIterator, DTMDefaultBaseIterators.FollowingSiblingIterator, DTMDefaultBaseIterators.InternalAxisIteratorBase, DTMDefaultBaseIterators.NamespaceAttributeIterator, DTMDefaultBaseIterators.NamespaceChildrenIterator, DTMDefaultBaseIterators.NamespaceIterator, DTMDefaultBaseIterators.NthDescendantIterator, DTMDefaultBaseIterators.ParentIterator, DTMDefaultBaseIterators.PrecedingIterator, DTMDefaultBaseIterators.PrecedingSiblingIterator, DTMDefaultBaseIterators.RootIterator, DTMDefaultBaseIterators.SingletonIterator, DTMDefaultBaseIterators.TypedAncestorIterator, DTMDefaultBaseIterators.TypedAttributeIterator, DTMDefaultBaseIterators.TypedChildrenIterator, DTMDefaultBaseIterators.TypedDescendantIterator, DTMDefaultBaseIterators.TypedFollowingIterator, DTMDefaultBaseIterators.TypedFollowingSiblingIterator, DTMDefaultBaseIterators.TypedNamespaceIterator, DTMDefaultBaseIterators.TypedPrecedingIterator, DTMDefaultBaseIterators.TypedPrecedingSiblingIterator, DTMDefaultBaseIterators.TypedRootIterator, DTMDefaultBaseIterators.TypedSingletonIterator

Field Summary

Fields inherited from class org.apache.xml.dtm.ref.DTMDefaultBase

DEFAULT_BLOCKSIZE, DEFAULT_NUMBLOCKS, DEFAULT_NUMBLOCKS_SMALL, ROOTNODE, m_mgr

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, ROOT_NODE, TEXT_NODE

Constructor Summary

SQLDocument(DTMManager mgr, int ident)

Method Summary

SQLWarning
checkWarnings()
void
close()
Close down any resources used by this document.
void
documentRegistration()
As the DTM is registered with the DTMManager, this method will be called.
void
documentRelease()
As documents are released from the DTMManager, the DTM implementation will be notified of the event.
void
execute(XConnection xconn, SQLQueryParser query)
ExpressionContext
getExpressionContext()
Return the context used to build this document
static SQLDocument
getNewDocument(ExpressionContext exprContext)
This static method simplifies the creation of an SQL Document and allows us to embedd the complexity of creating / handling the dtmIdent inside the document.
boolean
hasErrors()
Used by the XConnection to determine if the Document should handle the document differently.

Methods inherited from class org.apache.xalan.lib.sql.DTMDocument

appendChild, appendTextChild, dispatchCharactersEvents, dispatchToEvents, dumpDTM, getAttributeNode, getAxisIterator, getAxisTraverser, getContentHandler, getDTDHandler, getDeclHandler, getDocument, getDocumentAllDeclarationsProcessed, getDocumentBaseURI, getDocumentEncoding, getDocumentStandalone, getDocumentSystemIdentifier, getDocumentTypeDeclarationPublicIdentifier, getDocumentTypeDeclarationSystemIdentifier, getDocumentVersion, getElementById, getEntityResolver, getErrorHandler, getExpandedTypeID, getExpandedTypeID, getFirstAttribute, getFirstChild, getFirstNamespaceNode, getLastChild, getLevel, getLexicalHandler, getLocalName, getLocalNameFromExpandedNameID, getNamespaceFromExpandedNameID, getNamespaceType, getNamespaceURI, getNextAttribute, getNextNamespaceNode, getNextSibling, getNode, getNodeName, getNodeNameX, getNodeType, getNodeValue, getOwnerDocument, getParent, getPrefix, getPreviousSibling, getSourceLocatorFor, getStringValue, getStringValueChunk, getStringValueChunkCount, getTypedAxisIterator, getUnparsedEntityURI, hasChildNodes, isAttributeSpecified, isCharacterElementContentWhitespace, isDocumentAllDeclarationsProcessed, isNodeAfter, isSupported, needsTwoThreads, setDocumentBaseURI, setFeature, setProperty, supportsPreStripping

Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseIterators

getAxisIterator, getTypedAxisIterator

Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseTraversers

getAxisTraverser

Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBase

appendChild, appendTextChild, dispatchCharactersEvents, dispatchToEvents, documentRegistration, documentRelease, dumpDTM, dumpNode, getAttributeNode, getDTMIDs, getDocument, getDocumentAllDeclarationsProcessed, getDocumentBaseURI, getDocumentEncoding, getDocumentRoot, getDocumentStandalone, getDocumentSystemIdentifier, getDocumentTypeDeclarationPublicIdentifier, getDocumentTypeDeclarationSystemIdentifier, getDocumentVersion, getElementById, getExpandedTypeID, getExpandedTypeID, getFirstAttribute, getFirstChild, getFirstNamespaceNode, getLastChild, getLevel, getLocalName, getLocalNameFromExpandedNameID, getManager, getNamespaceFromExpandedNameID, getNamespaceType, getNamespaceURI, getNextAttribute, getNextNamespaceNode, getNextSibling, getNode, getNodeHandle, getNodeIdent, getNodeName, getNodeNameX, getNodeType, getNodeValue, getOwnerDocument, getParent, getPrefix, getPreviousSibling, getStringValue, getStringValueChunk, getStringValueChunkCount, getTypedFirstChild, getTypedNextSibling, getUnparsedEntityURI, hasChildNodes, isAttributeSpecified, isCharacterElementContentWhitespace, isDocumentAllDeclarationsProcessed, isNodeAfter, isSupported, makeNodeHandle, makeNodeIdentity, migrateTo, setDocumentBaseURI, setFeature, supportsPreStripping

Constructor Details

SQLDocument

public SQLDocument(DTMManager mgr,
                   int ident)
Parameters:
mgr -
ident -

Method Details

checkWarnings

public SQLWarning checkWarnings()

close

public void close()
Close down any resources used by this document. If an SQL Error occure while the document was being accessed, the SQL Connection used to create this document will be released to the Connection Pool on error. This allows the COnnection Pool to give special attention to any connection that may be in a errored state.

documentRegistration

public void documentRegistration()
As the DTM is registered with the DTMManager, this method will be called. This will give the DTM implementation a chance to initialize any subsystems that are required to build the DTM
Specified by:
documentRegistration in interface DTM
Overrides:
documentRegistration in interface DTMDefaultBase

documentRelease

public void documentRelease()
As documents are released from the DTMManager, the DTM implementation will be notified of the event. This will allow the DTM implementation to shutdown any subsystem activity that may of been assoiated with the active DTM Implementation.
Specified by:
documentRelease in interface DTM
Overrides:
documentRelease in interface DTMDefaultBase

execute

public void execute(XConnection xconn,
                    SQLQueryParser query)
            throws SQLException

getExpressionContext

public ExpressionContext getExpressionContext()
Return the context used to build this document

getNewDocument

public static SQLDocument getNewDocument(ExpressionContext exprContext)
This static method simplifies the creation of an SQL Document and allows us to embedd the complexity of creating / handling the dtmIdent inside the document. This type of method may better placed inside the DTMDocument code

hasErrors

public boolean hasErrors()
Used by the XConnection to determine if the Document should handle the document differently.

Copyright B) 2004 Apache XML Project. All Rights Reserved.