## org.apache.xalan.lib.sql
Class SQLDocument

    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

public class SQLDocument
extends DTMDocument

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

Inner classes inherited from class org.apache.xalan.lib.sql.DTMDocument
`DTMDocument.CharacterNodeHandler`

Inner classes 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`

Fields inherited from class org.apache.xml.dtm.ref.DTMDefaultBase
`DEFAULT_BLOCKSIZE, DEFAULT_NUMBLOCKS, DEFAULT_NUMBLOCKS_SMALL, m_mgr, ROOTNODE`

Constructor Summary
`SQLDocument(DTMManager mgr, int ident)`

Method Summary
`java.sql.SQLWarning` `checkWarnings()`
`void` `close(boolean flushConnPool)` Close down any resources used by this document.
`void` `documentRegistration()`
`void` `documentRelease()`
`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.
`void` `skip(int value)` Push the record set forward value rows.

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

`appendChild, appendTextChild, dispatchCharactersEvents, dispatchToEvents, dumpDTM, getAttributeNode, getAxisIterator, getAxisTraverser, getContentHandler, getDeclHandler, getDocument, getDocumentAllDeclarationsProcessed, getDocumentBaseURI, getDocumentEncoding, getDocumentStandalone, getDocumentSystemIdentifier, getDocumentTypeDeclarationPublicIdentifier, getDocumentTypeDeclarationSystemIdentifier, getDocumentVersion, getDTDHandler, 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.DTMDefaultBase
`dumpDTM, dumpNode, getDocumentRoot, getDTMIDs, getManager, getNodeHandle, getNodeIdent, getTypedFirstChild, getTypedNextSibling, makeNodeHandle, makeNodeIdentity, migrateTo`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SQLDocument

    public SQLDocument(DTMManager mgr,
                       int ident)

  Parameters:
    `mgr` -
    `ident` -
  Throws:
    java.sql.SQLException -

Method Detail

### 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

### getExpressionContext

    public ExpressionContext getExpressionContext()

  Return the context used to build this document

### execute

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

### skip

    public void skip(int value)

  Push the record set forward value rows. Used to help in SQL pagination.
  Parameters:
    `value` -

### hasErrors

    public boolean hasErrors()

  Used by the XConnection to determine if the Document should handle the document differently.

### close

    public void close(boolean flushConnPool)

  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()

  Overrides:
    documentRegistration in class DTMDefaultBase

### documentRelease

    public void documentRelease()

  Overrides:
    documentRelease in class DTMDefaultBase

### checkWarnings

    public java.sql.SQLWarning checkWarnings()

Copyright © 2006 Apache XML Project. All Rights Reserved.