net.sf.saxon.xqj

Class SaxonXQPreparedExpression

Implemented Interfaces:
XQDynamicContext, XQPreparedExpression

public class SaxonXQPreparedExpression
extends SaxonXQDynamicContext
implements 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

SaxonXQPreparedExpression(SaxonXQConnection connection, XQueryExpression expression, DynamicQueryContext context)

Method Summary

void
cancel()
protected void
checkNotClosed()
void
close()
XQResultSequence
executeQuery()
QName[]
getAllExternalVariables()
QName[]
getAllUnboundExternalVariables()
protected SaxonXQDataFactory
getDataFactory()
protected DynamicQueryContext
getDynamicContext()
XQStaticContext
getStaticContext()
XQSequenceType
getStaticResultType()
XQSequenceType
getStaticVariableType(QName name)
boolean
isClosed()

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, checkNotClosed, getDataFactory, getDynamicContext, getImplicitTimeZone, setImplicitTimeZone

Constructor Details

SaxonXQPreparedExpression

protected SaxonXQPreparedExpression(SaxonXQConnection connection,
                                    XQueryExpression expression,
                                    DynamicQueryContext context)
            throws XQException

Method Details

cancel

public void cancel()
            throws XQException
Specified by:
cancel in interface XQPreparedExpression

checkNotClosed

protected void checkNotClosed()
            throws XQException
Overrides:
checkNotClosed in interface SaxonXQDynamicContext

close

public void close()
Specified by:
close in interface XQPreparedExpression

executeQuery

public XQResultSequence executeQuery()
            throws XQException
Specified by:
executeQuery in interface XQPreparedExpression

getAllExternalVariables

public QName[] getAllExternalVariables()
            throws XQException
Specified by:
getAllExternalVariables in interface XQPreparedExpression

getAllUnboundExternalVariables

public QName[] getAllUnboundExternalVariables()
            throws XQException
Specified by:
getAllUnboundExternalVariables in interface XQPreparedExpression

getDataFactory

protected SaxonXQDataFactory getDataFactory()
            throws XQException
Overrides:
getDataFactory in interface SaxonXQDynamicContext

getDynamicContext

protected DynamicQueryContext getDynamicContext()
Overrides:
getDynamicContext in interface SaxonXQDynamicContext

getStaticContext

public XQStaticContext getStaticContext()
            throws XQException
Specified by:
getStaticContext in interface XQPreparedExpression

getStaticResultType

public XQSequenceType getStaticResultType()
            throws XQException
Specified by:
getStaticResultType in interface XQPreparedExpression

getStaticVariableType

public XQSequenceType getStaticVariableType(QName name)
            throws XQException
Specified by:
getStaticVariableType in interface XQPreparedExpression

isClosed

public boolean isClosed()
Specified by:
isClosed in interface XQPreparedExpression