public class SaxonXQPreparedExpression extends SaxonXQDynamicContext implements XQPreparedExpression
connection
Modifier | Constructor and Description |
---|---|
protected |
SaxonXQPreparedExpression(SaxonXQConnection connection,
XQueryExpression expression,
SaxonXQStaticContext sqc,
DynamicQueryContext context) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Attempts to cancel the execution if both the XQuery engine and XQJ
driver support aborting the execution of an
XQPreparedExpression . |
XQResultSequence |
executeQuery()
Executes the prepared query expression.
|
protected boolean |
externalVariableExists(javax.xml.namespace.QName name) |
javax.xml.namespace.QName[] |
getAllExternalVariables()
Retrieves all the external variables defined in the prolog of the
prepared expression.
|
javax.xml.namespace.QName[] |
getAllUnboundExternalVariables()
Retrieves the names of all unbound external variables.
|
protected SaxonXQConnection |
getConnection() |
protected SaxonXQDataFactory |
getDataFactory() |
protected DynamicQueryContext |
getDynamicContext() |
protected SaxonXQStaticContext |
getSaxonXQStaticContext() |
XQStaticContext |
getStaticContext()
Gets an
XQStaticContext representing the values for all
expression properties. |
XQSequenceType |
getStaticResultType()
Gets the static type information of the result sequence.
|
XQSequenceType |
getStaticVariableType(javax.xml.namespace.QName name)
Retrieves the static type of a given external variable.
|
protected XQueryExpression |
getXQueryExpression() |
bindAtomicValue, bindBoolean, bindByte, bindDocument, bindDocument, bindDocument, bindDocument, bindDocument, bindDouble, bindFloat, bindInt, bindItem, bindLong, bindNode, bindObject, bindSequence, bindShort, bindString, getConfiguration, getImplicitTimeZone, setImplicitTimeZone
close, isClosed, setClosableContainer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, isClosed
bindAtomicValue, bindBoolean, bindByte, bindDocument, bindDocument, bindDocument, bindDocument, bindDocument, bindDouble, bindFloat, bindInt, bindItem, bindLong, bindNode, bindObject, bindSequence, bindShort, bindString, getImplicitTimeZone, setImplicitTimeZone
protected SaxonXQPreparedExpression(SaxonXQConnection connection, XQueryExpression expression, SaxonXQStaticContext sqc, DynamicQueryContext context) throws XQException
XQException
protected DynamicQueryContext getDynamicContext()
getDynamicContext
in class SaxonXQDynamicContext
protected SaxonXQConnection getConnection()
protected SaxonXQDataFactory getDataFactory() throws XQException
getDataFactory
in class SaxonXQDynamicContext
XQException
protected XQueryExpression getXQueryExpression()
protected SaxonXQStaticContext getSaxonXQStaticContext()
public void cancel() throws XQException
XQPreparedExpression
XQPreparedExpression
.
This method can be used by one thread to cancel an XQPreparedExpression
,
that is being executed in another thread. If cancellation is not supported or
the attempt to cancel the execution was not successful, the method returns without
any error. If the cancellation is successful, an XQException
is thrown, to indicate that it has been aborted, by executeQuery
,
executeCommand
or any method accessing the XQResultSequence
returned by executeQuery
. If applicable, any open XQResultSequence
and XQResultItem
objects will also be implicitly closed in this case.cancel
in interface XQPreparedExpression
XQException
- if the prepared expression is in a closed statepublic XQResultSequence executeQuery() throws XQException
XQPreparedExpression
executeQuery
in interface XQPreparedExpression
XQException
- if (1) there are errors when executing the prepared
expression, (2) the prepared expression is in a closed state,
or (3) the query execution is cancelledpublic javax.xml.namespace.QName[] getAllExternalVariables() throws XQException
XQPreparedExpression
getAllExternalVariables
in interface XQPreparedExpression
QName
objects for all the external
variables defined in the prolog of a prepared expression.
Empty array if there are no external variables present.XQException
- if the prepared expression is in a closed statepublic javax.xml.namespace.QName[] getAllUnboundExternalVariables() throws XQException
XQPreparedExpression
getAllUnboundExternalVariables
in interface XQPreparedExpression
QName
for all the external variables defined
in the prolog of a prepared expression that are yet to be bound
with a value. If there are no such variables an empty array
is returnedXQException
- if the prepared expression is in a closed statepublic XQStaticContext getStaticContext() throws XQException
XQPreparedExpression
XQStaticContext
representing the values for all
expression properties. Note that these properties cannot be changed; in
order to change, a new XQPreparedExpression
needs to be created.getStaticContext
in interface XQPreparedExpression
XQStaticContext
representing
the values for all expression propertiesXQException
- if the expression is in a closed statepublic XQSequenceType getStaticResultType() throws XQException
XQPreparedExpression
XQSequenceType
object
corresponding to the XQuery sequence type item()*
.getStaticResultType
in interface XQPreparedExpression
XQSequenceType
containing the static
result information.XQException
- if the prepared expression is in a closed statepublic XQSequenceType getStaticVariableType(javax.xml.namespace.QName name) throws XQException
XQPreparedExpression
getStaticVariableType
in interface XQPreparedExpression
name
- the name of the external variableXQException
- if (1) the variable does not exist in the static
context of the expression, or (2) the sequence is
in a closed state, or (3) the name
parameter is null
protected boolean externalVariableExists(javax.xml.namespace.QName name)
externalVariableExists
in class SaxonXQDynamicContext
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.