public class SaxonXQConnection extends SaxonXQDataFactory implements XQConnection
For Javadoc descriptions of the public methors, see the XQJ documentation.
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Makes all changes made in the current transaction permanent and releases
any locks held by the datasource.
|
XQPreparedExpression |
copyPreparedExpression(XQPreparedExpression expression)
Copy a prepared expression to create a new prepared expression.
|
XQExpression |
createExpression()
Creates a new
XQExpression object that can be used
to perform execute immediate operations with XQuery expressions. |
XQExpression |
createExpression(XQStaticContext properties)
Creates a new
XQExpression object that can be used to
perform execute immediate operations with XQuery expressions. |
boolean |
getAutoCommit()
Gets the auto-commit attribute of this connection
|
Configuration |
getConfiguration()
Get the Saxon Configuration in use.
|
XQMetaData |
getMetaData()
Gets the metadata for this connection.
|
XQStaticContext |
getStaticContext()
Gets an
XQStaticContext representing the default values for
all expression properties. |
XQPreparedExpression |
prepareExpression(InputStream xquery)
Prepares an expression for execution.
|
XQPreparedExpression |
prepareExpression(InputStream xquery,
XQStaticContext properties)
Prepares an expression for execution.
|
XQPreparedExpression |
prepareExpression(Reader xquery)
Prepares an expression for execution.
|
XQPreparedExpression |
prepareExpression(Reader xquery,
XQStaticContext properties)
Prepares an expression for execution.
|
XQPreparedExpression |
prepareExpression(String xquery)
Prepares an expression for execution.
|
XQPreparedExpression |
prepareExpression(String xquery,
XQStaticContext properties)
Prepares an expression for execution.
|
void |
rollback()
Undoes all changes made in the current transaction and releases any
locks held by the datasource.
|
void |
setAutoCommit(boolean autoCommit)
Sets the auto-commit attribute to the given state.
|
void |
setStaticContext(XQStaticContext properties)
Sets the default values for all expression properties.
|
createAtomicType, createAtomicType, createAttributeType, createAttributeType, createCommentType, createDocumentElementType, createDocumentSchemaElementType, createDocumentType, createElementType, createElementType, createItem, createItemFromAtomicValue, createItemFromBoolean, createItemFromByte, createItemFromDocument, createItemFromDocument, createItemFromDocument, createItemFromDocument, createItemFromDocument, createItemFromDouble, createItemFromFloat, createItemFromInt, createItemFromLong, createItemFromNode, createItemFromObject, createItemFromShort, createItemFromString, createItemType, createNodeType, createProcessingInstructionType, createSchemaAttributeType, createSchemaElementType, createSequence, createSequence, createSequenceType, createTextType, getObjectConverter, init, setObjectConverterclose, isClosed, setClosableContainerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, isClosedcreateAtomicType, createAtomicType, createAttributeType, createAttributeType, createCommentType, createDocumentElementType, createDocumentSchemaElementType, createDocumentType, createElementType, createElementType, createItem, createItemFromAtomicValue, createItemFromBoolean, createItemFromByte, createItemFromDocument, createItemFromDocument, createItemFromDocument, createItemFromDocument, createItemFromDocument, createItemFromDouble, createItemFromFloat, createItemFromInt, createItemFromLong, createItemFromNode, createItemFromObject, createItemFromShort, createItemFromString, createItemType, createNodeType, createProcessingInstructionType, createSchemaAttributeType, createSchemaElementType, createSequence, createSequence, createSequenceType, createTextTypepublic Configuration getConfiguration()
public void commit()
throws XQException
XQConnectionXQResultSequence, or XQResultItem may be
implicitly closed upon commit, if the holdability property of the
sequence is set to XQConstants.HOLDTYPE_CLOSE_CURSORS_AT_COMMIT.commit in interface XQConnectionXQException - if the connection is in a closed state
or this connection is operating in auto-commit modepublic XQExpression createExpression() throws XQException
XQConnectionXQExpression object that can be used
to perform execute immediate operations with XQuery expressions.
The properties of the connection's default XQStaticContext are
copied to the returned XQExpression.createExpression in interface XQConnectionXQExpression that can be used to execute
multiple expressionsXQException - if the connection is in a closed statepublic XQExpression createExpression(XQStaticContext properties) throws XQException
XQConnectionXQExpression object that can be used to
perform execute immediate operations with XQuery expressions. The
properties of the specified XQStaticContext values are
copied to the returned XQExpression.createExpression in interface XQConnectionproperties - XQStaticContext containing
values of expression propertiesXQExpression that can be used to execute
multiple expressionsXQException - if (1) the connection is in a closed state, or
(2) the specified argument is nullpublic boolean getAutoCommit()
throws XQException
XQConnectiongetAutoCommit in interface XQConnectiontrue if the connection operates
in auto-commit mode; otherwise falseXQException - if the connection is in a closed statepublic XQMetaData getMetaData() throws XQException
XQConnectiongetMetaData in interface XQConnectionXQMetadata representing the metadata of
this connectionXQException - if the connection is in a closed statepublic XQStaticContext getStaticContext() throws XQException
XQConnectionXQStaticContext representing the default values for
all expression properties. In order to modify the defaults, it is not
sufficient to modify the values in the returned
XQStaticContext object; in addition
setStaticContext should be called to make those new values
effective.getStaticContext in interface XQConnectionXQStaticContext representing the
default values for all expression propertiesXQException - if the connection is in a closed statepublic XQPreparedExpression prepareExpression(InputStream xquery) throws XQException
XQConnection
The properties of the connection's default XQStaticContext are
copied to the returned XQPreparedExpression.
prepareExpression in interface XQConnectionxquery - the XQuery expression as an InputStream.
Cannot be nullXQException - if (1) the connection is in a closed state,
(2) there are errors preparing the expression
or (3) the xquery parameter is nullpublic XQPreparedExpression prepareExpression(InputStream xquery, XQStaticContext properties) throws XQException
XQConnection
The properties of the specified XQStaticContext values are
copied to the returned XQPreparedExpression.
prepareExpression in interface XQConnectionxquery - the XQuery expression as an InputStream.
Cannot be nullproperties - XQStaticContext containing
values of expression propertiesXQException - if (1) the connection is in a closed state, or
(2) the specified argument is nullpublic XQPreparedExpression prepareExpression(Reader xquery) throws XQException
XQConnection
The properties of the connection's default XQStaticContext are
copied to the returned XQPreparedExpression.
prepareExpression in interface XQConnectionxquery - the XQuery expression as a Reader.
Cannot be nullXQException - if (1) the connection is in a closed state,
(2) there are errors preparing the expression,
or (3) the xquery parameter is nullpublic XQPreparedExpression prepareExpression(Reader xquery, XQStaticContext properties) throws XQException
XQConnection
The properties of the specified XQStaticContext values are
copied to the returned XQPreparedExpression.
prepareExpression in interface XQConnectionxquery - the XQuery expression as a Reader.
Cannot be nullproperties - XQStaticContext containing
values of expression propertiesXQException - if (1) the connection is in a closed state, or
(2) the specified argument is nullpublic XQPreparedExpression prepareExpression(String xquery) throws XQException
XQConnection
The properties of the connection's default XQStaticContext are
copied to the returned XQPreparedExpression.
prepareExpression in interface XQConnectionxquery - the XQuery expression as a String.
Cannot be nullXQException - if (1) the connection is in a closed state,
(2) there are errors preparing the expression,
or (3) the xquery parameter is nullpublic XQPreparedExpression prepareExpression(String xquery, XQStaticContext properties) throws XQException
XQConnection
The properties of the specified XQStaticContext values are
copied to the returned XQPreparedExpression.
prepareExpression in interface XQConnectionxquery - the XQuery expression as a String.
Cannot be nullproperties - XQStaticContext containing
values of expression properties.XQException - if (1) the connection is in a closed state, or
(2) the specified argument is nullpublic XQPreparedExpression copyPreparedExpression(XQPreparedExpression expression) throws XQException
expression - the XQPreparedExpression to be copied. This must have been created using Saxon, and it
must have been created with an XQConnection derived from the same XQDataSource as this connection.XQException, - for example if either of the connections has been closedXQExceptionpublic void rollback()
throws XQException
XQConnectionrollback in interface XQConnectionXQException - if the connection is in a closed state
or this connection is operating
in auto-commit modepublic void setAutoCommit(boolean autoCommit)
throws XQException
XQConnectioncommit() or rollback().setAutoCommit
is called and the auto-commit attribute is not changed from its
current value, the request is treated as a no-op.setAutoCommit in interface XQConnectionautoCommit - true to enable auto-commit mode;
false to disable itXQException - if (1) the connection is in a closed state,
or (2) auto-commit is turned off but the
implementation doesn't support transactionspublic void setStaticContext(XQStaticContext properties) throws XQException
XQConnectionXQStaticContext and update its private copy.setStaticContext in interface XQConnectionproperties - XQStaticContext containing
values of expression propertiesXQException - if the connection is in a closed stateCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.