|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.sf.saxon.xqj.Closable
net.sf.saxon.xqj.SaxonXQDataFactory
net.sf.saxon.xqj.SaxonXQConnection
public class SaxonXQConnection
Saxon implementation of the XQL interface XQConnection. This interface represents a "connection" between an XQuery application and an XQuery server. In Saxon the client and server run in the same process so the concept of a connection is rather notional, and some of the properties have little meaning. However, the connection is the factory object used to compile queries.
For Javadoc descriptions of the public methors, see the XQJ documentation.
| Method Summary | |
|---|---|
void |
commit()
Makes all changes made in the current transaction permanent and releases any locks held by the datasource. |
javax.xml.xquery.XQPreparedExpression |
copyPreparedExpression(javax.xml.xquery.XQPreparedExpression expression)
Copy a prepared expression to create a new prepared expression. |
javax.xml.xquery.XQExpression |
createExpression()
Creates a new XQExpression object that can be used
to perform execute immediate operations with XQuery expressions. |
javax.xml.xquery.XQExpression |
createExpression(javax.xml.xquery.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. |
javax.xml.xquery.XQMetaData |
getMetaData()
Gets the metadata for this connection. |
javax.xml.xquery.XQStaticContext |
getStaticContext()
Gets an XQStaticContext representing the default values for
all expression properties. |
javax.xml.xquery.XQPreparedExpression |
prepareExpression(InputStream xquery)
Prepares an expression for execution. |
javax.xml.xquery.XQPreparedExpression |
prepareExpression(InputStream xquery,
javax.xml.xquery.XQStaticContext properties)
Prepares an expression for execution. |
javax.xml.xquery.XQPreparedExpression |
prepareExpression(Reader xquery)
Prepares an expression for execution. |
javax.xml.xquery.XQPreparedExpression |
prepareExpression(Reader xquery,
javax.xml.xquery.XQStaticContext properties)
Prepares an expression for execution. |
javax.xml.xquery.XQPreparedExpression |
prepareExpression(String xquery)
Prepares an expression for execution. |
javax.xml.xquery.XQPreparedExpression |
prepareExpression(String xquery,
javax.xml.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(javax.xml.xquery.XQStaticContext properties)
Sets the default values for all expression properties. |
| Methods inherited from class net.sf.saxon.xqj.Closable |
|---|
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.XQConnection |
|---|
close, isClosed |
| Methods inherited from interface javax.xml.xquery.XQDataFactory |
|---|
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 |
| Method Detail |
|---|
public Configuration getConfiguration()
public void commit()
throws javax.xml.xquery.XQException
javax.xml.xquery.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 javax.xml.xquery.XQConnectionjavax.xml.xquery.XQException - if the connection is in a closed state
or this connection is operating in auto-commit mode
public javax.xml.xquery.XQExpression createExpression()
throws javax.xml.xquery.XQException
javax.xml.xquery.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 javax.xml.xquery.XQConnectionXQExpression that can be used to execute
multiple expressions
javax.xml.xquery.XQException - if the connection is in a closed state
public javax.xml.xquery.XQExpression createExpression(javax.xml.xquery.XQStaticContext properties)
throws javax.xml.xquery.XQException
javax.xml.xquery.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 javax.xml.xquery.XQConnectionproperties - XQStaticContext containing
values of expression properties
XQExpression that can be used to execute
multiple expressions
javax.xml.xquery.XQException - if (1) the connection is in a closed state, or
(2) the specified argument is null
public boolean getAutoCommit()
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnection
getAutoCommit in interface javax.xml.xquery.XQConnectiontrue if the connection operates
in auto-commit mode; otherwise false
javax.xml.xquery.XQException - if the connection is in a closed state
public javax.xml.xquery.XQMetaData getMetaData()
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnection
getMetaData in interface javax.xml.xquery.XQConnectionXQMetadata representing the metadata of
this connection
javax.xml.xquery.XQException - if the connection is in a closed state
public javax.xml.xquery.XQStaticContext getStaticContext()
throws javax.xml.xquery.XQException
javax.xml.xquery.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 javax.xml.xquery.XQConnectionXQStaticContext representing the
default values for all expression properties
javax.xml.xquery.XQException - if the connection is in a closed state
public javax.xml.xquery.XQPreparedExpression prepareExpression(InputStream xquery)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnection
The properties of the connection's default XQStaticContext are
copied to the returned XQPreparedExpression.
prepareExpression in interface javax.xml.xquery.XQConnectionxquery - the XQuery expression as an InputStream.
Cannot be null
javax.xml.xquery.XQException - if (1) the connection is in a closed state,
(2) there are errors preparing the expression
or (3) the xquery parameter is null
public javax.xml.xquery.XQPreparedExpression prepareExpression(InputStream xquery,
javax.xml.xquery.XQStaticContext properties)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnection
The properties of the specified XQStaticContext values are
copied to the returned XQPreparedExpression.
prepareExpression in interface javax.xml.xquery.XQConnectionxquery - the XQuery expression as an InputStream.
Cannot be nullproperties - XQStaticContext containing
values of expression properties
javax.xml.xquery.XQException - if (1) the connection is in a closed state, or
(2) the specified argument is null
public javax.xml.xquery.XQPreparedExpression prepareExpression(Reader xquery)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnection
The properties of the connection's default XQStaticContext are
copied to the returned XQPreparedExpression.
prepareExpression in interface javax.xml.xquery.XQConnectionxquery - the XQuery expression as a Reader.
Cannot be null
javax.xml.xquery.XQException - if (1) the connection is in a closed state,
(2) there are errors preparing the expression,
or (3) the xquery parameter is null
public javax.xml.xquery.XQPreparedExpression prepareExpression(Reader xquery,
javax.xml.xquery.XQStaticContext properties)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnection
The properties of the specified XQStaticContext values are
copied to the returned XQPreparedExpression.
prepareExpression in interface javax.xml.xquery.XQConnectionxquery - the XQuery expression as a Reader.
Cannot be nullproperties - XQStaticContext containing
values of expression properties
javax.xml.xquery.XQException - if (1) the connection is in a closed state, or
(2) the specified argument is null
public javax.xml.xquery.XQPreparedExpression prepareExpression(String xquery)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnection
The properties of the connection's default XQStaticContext are
copied to the returned XQPreparedExpression.
prepareExpression in interface javax.xml.xquery.XQConnectionxquery - the XQuery expression as a String.
Cannot be null
javax.xml.xquery.XQException - if (1) the connection is in a closed state,
(2) there are errors preparing the expression,
or (3) the xquery parameter is null
public javax.xml.xquery.XQPreparedExpression prepareExpression(String xquery,
javax.xml.xquery.XQStaticContext properties)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnection
The properties of the specified XQStaticContext values are
copied to the returned XQPreparedExpression.
prepareExpression in interface javax.xml.xquery.XQConnectionxquery - the XQuery expression as a String.
Cannot be nullproperties - XQStaticContext containing
values of expression properties.
javax.xml.xquery.XQException - if (1) the connection is in a closed state, or
(2) the specified argument is null
public javax.xml.xquery.XQPreparedExpression copyPreparedExpression(javax.xml.xquery.XQPreparedExpression expression)
throws javax.xml.xquery.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 closed
javax.xml.xquery.XQException
public void rollback()
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnection
rollback in interface javax.xml.xquery.XQConnectionjavax.xml.xquery.XQException - if the connection is in a closed state
or this connection is operating
in auto-commit mode
public void setAutoCommit(boolean autoCommit)
throws javax.xml.xquery.XQException
javax.xml.xquery.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 javax.xml.xquery.XQConnectionautoCommit - true to enable auto-commit mode;
false to disable it
javax.xml.xquery.XQException - if (1) the connection is in a closed state,
or (2) auto-commit is turned off but the
implementation doesn't support transactions
public void setStaticContext(javax.xml.xquery.XQStaticContext properties)
throws javax.xml.xquery.XQException
javax.xml.xquery.XQConnectionXQStaticContext and update its private copy.
setStaticContext in interface javax.xml.xquery.XQConnectionproperties - XQStaticContext containing
values of expression properties
javax.xml.xquery.XQException - if the connection is in a closed state
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||