net.sf.saxon.xqj
Class SaxonXQPreparedExpression

java.lang.Object
  extended by net.sf.saxon.xqj.Closable
      extended by net.sf.saxon.xqj.SaxonXQDynamicContext
          extended by net.sf.saxon.xqj.SaxonXQPreparedExpression
All Implemented Interfaces:
javax.xml.xquery.XQDynamicContext, javax.xml.xquery.XQPreparedExpression

public class SaxonXQPreparedExpression
extends SaxonXQDynamicContext
implements javax.xml.xquery.XQPreparedExpression

Saxon implementation of the XQJ interface XQPreparedExpression. This represents a compiled XQuery expression, together with the dynamic context for its evaluation. Note that this means the object should not be used in more than one thread concurrently.

Note that an expression is scrollable or not depending on the scrollability property of the XQConnection that was used to compile this expression (at the time it was compiled). If the expression is scrollable then its results are delivered in an XQSequence that supports scrolling backwards as well as forwards.

For full Javadoc details, see the XQJ interface specification.


Field Summary
 
Fields inherited from class net.sf.saxon.xqj.SaxonXQDynamicContext
connection
 
Constructor Summary
protected SaxonXQPreparedExpression(SaxonXQConnection connection, XQueryExpression expression, SaxonXQStaticContext sqc, DynamicQueryContext context)
           
 
Method Summary
 void cancel()
           
 javax.xml.xquery.XQResultSequence executeQuery()
           
protected  boolean externalVariableExists(javax.xml.namespace.QName name)
           
 javax.xml.namespace.QName[] getAllExternalVariables()
           
 javax.xml.namespace.QName[] getAllUnboundExternalVariables()
           
protected  SaxonXQConnection getConnection()
           
protected  SaxonXQDataFactory getDataFactory()
           
protected  DynamicQueryContext getDynamicContext()
           
protected  SaxonXQStaticContext getSaxonXQStaticContext()
           
 javax.xml.xquery.XQStaticContext getStaticContext()
           
 javax.xml.xquery.XQSequenceType getStaticResultType()
           
 javax.xml.xquery.XQSequenceType getStaticVariableType(javax.xml.namespace.QName name)
           
protected  XQueryExpression getXQueryExpression()
           
 
Methods inherited from class net.sf.saxon.xqj.SaxonXQDynamicContext
bindAtomicValue, bindBoolean, bindByte, bindDocument, bindDocument, bindDocument, bindDocument, bindDocument, bindDocument, bindDouble, bindFloat, bindInt, bindItem, bindLong, bindNode, bindObject, bindSequence, bindShort, bindString, getConfiguration, getImplicitTimeZone, setImplicitTimeZone
 
Methods inherited from class net.sf.saxon.xqj.Closable
checkNotClosed, close, isClosed, setClosableContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.xquery.XQPreparedExpression
close, isClosed
 
Methods inherited from interface javax.xml.xquery.XQDynamicContext
bindAtomicValue, bindBoolean, bindByte, bindDocument, bindDocument, bindDocument, bindDocument, bindDocument, bindDouble, bindFloat, bindInt, bindItem, bindLong, bindNode, bindObject, bindSequence, bindShort, bindString, getImplicitTimeZone, setImplicitTimeZone
 

Constructor Detail

SaxonXQPreparedExpression

protected SaxonXQPreparedExpression(SaxonXQConnection connection,
                                    XQueryExpression expression,
                                    SaxonXQStaticContext sqc,
                                    DynamicQueryContext context)
                             throws javax.xml.xquery.XQException
Throws:
javax.xml.xquery.XQException
Method Detail

getDynamicContext

protected DynamicQueryContext getDynamicContext()
Specified by:
getDynamicContext in class SaxonXQDynamicContext

getConnection

protected SaxonXQConnection getConnection()

getDataFactory

protected SaxonXQDataFactory getDataFactory()
                                     throws javax.xml.xquery.XQException
Specified by:
getDataFactory in class SaxonXQDynamicContext
Throws:
javax.xml.xquery.XQException

getXQueryExpression

protected XQueryExpression getXQueryExpression()

getSaxonXQStaticContext

protected SaxonXQStaticContext getSaxonXQStaticContext()

cancel

public void cancel()
            throws javax.xml.xquery.XQException
Specified by:
cancel in interface javax.xml.xquery.XQPreparedExpression
Throws:
javax.xml.xquery.XQException

executeQuery

public javax.xml.xquery.XQResultSequence executeQuery()
                                               throws javax.xml.xquery.XQException
Specified by:
executeQuery in interface javax.xml.xquery.XQPreparedExpression
Throws:
javax.xml.xquery.XQException

getAllExternalVariables

public javax.xml.namespace.QName[] getAllExternalVariables()
                                                    throws javax.xml.xquery.XQException
Specified by:
getAllExternalVariables in interface javax.xml.xquery.XQPreparedExpression
Throws:
javax.xml.xquery.XQException

getAllUnboundExternalVariables

public javax.xml.namespace.QName[] getAllUnboundExternalVariables()
                                                           throws javax.xml.xquery.XQException
Specified by:
getAllUnboundExternalVariables in interface javax.xml.xquery.XQPreparedExpression
Throws:
javax.xml.xquery.XQException

getStaticContext

public javax.xml.xquery.XQStaticContext getStaticContext()
                                                  throws javax.xml.xquery.XQException
Specified by:
getStaticContext in interface javax.xml.xquery.XQPreparedExpression
Throws:
javax.xml.xquery.XQException

getStaticResultType

public javax.xml.xquery.XQSequenceType getStaticResultType()
                                                    throws javax.xml.xquery.XQException
Specified by:
getStaticResultType in interface javax.xml.xquery.XQPreparedExpression
Throws:
javax.xml.xquery.XQException

getStaticVariableType

public javax.xml.xquery.XQSequenceType getStaticVariableType(javax.xml.namespace.QName name)
                                                      throws javax.xml.xquery.XQException
Specified by:
getStaticVariableType in interface javax.xml.xquery.XQPreparedExpression
Throws:
javax.xml.xquery.XQException

externalVariableExists

protected boolean externalVariableExists(javax.xml.namespace.QName name)
Specified by:
externalVariableExists in class SaxonXQDynamicContext