io::zorba::api::xqj::ZorbaXQConnectionA connection (session) with a specific XQuery engine. Connections are obtained through an ZorbaXQDataSource object.XQuery expressions are executed and results are returned within the context of a connection. They are either executed through ZorbaXQExpression or ZorbaXQPreparedExpression objects.ZorbaXQDataSource ds;// obtain the XQuery datasource ... ZorbaXQConnection conn = ds.getConnection();ZorbaXQPreparedExpression expr = conn.prepareExpression("for $i in ..."); XQResultSequence result = expr.executeQuery();
Private Attributes
Protected Functions
Public Functions
Private Functions
Private Attributesautocommitboolean autocommit
cExpressionCollection< XQExpression > cExpression
closedboolean closed
cMetadataCollection< XQMetaData > cMetadata
cPreparedExpressionCollection< XQPreparedExpression > cPreparedExpression
libPathsStringVector libPaths
lStaticContextXQStaticContext lStaticContext
modulePathsStringVector modulePaths
propertiesProperties properties
storeInMemoryStore store
uriPathsStringVector uriPaths
zorbaZorba zorba
Protected FunctionsgetZorbaInstanceZorba getZorbaInstance()
Public Functionsclosevoid close() Closes the connection. Closes the connection. This also closes any ZorbaXQExpression and ZorbaXQPreparedExpression obtained from this connection. Once the connection is closed, no method other than close or the isClosed method may be called on the connection object. Calling close on an ZorbaXQConnection object that is already closed has no effect. Note that an XQJ driver is not required to provide finalizer methods for the connection and other objects. Hence it is strongly recommended that users call this method explicitly to free any resources. It is also recommended that they do so under a final block to ensure that the object is closed even when there are exceptions. Parameters
commitvoid commit() Makes all changes made in the current transaction permanent and releases any locks held by the datasource. This method should be used only when auto-commit mode is disabled. Any XQResultSequence, or XQResultItem may be implicitly closed upon commit, if the holdability property of the sequence is set to XQConstants.HOLDTYPE_CLOSE_CURSORS_AT_COMMIT. Parameters
createAtomicTypeXQItemType createAtomicType(int basetype) Creates a new ZorbaXQItemType object representing an XQuery atomic type. The item kind of the item type will be ZorbaXQItemType.XQITEMKIND_ATOMIC. Example - {.java} ZorbaXQConnection conn = ...; // to create xs:integer item type conn.createAtomicType(ZorbaXQItemType.XQBASETYPE_INTEGER); Parameters
Returnsa new ZorbaXQItemType representing the atomic typeParameters
createAtomicTypeXQItemType createAtomicType(int basetype, QName qname, URI uri) Creates a new ZorbaXQItemType object representing an XQuery atomic type. The item kind of the item type will be ZorbaXQItemType.XQITEMKIND_ATOMIC. Example - {.java} ZorbaXQConnection conn = ...; // to create xs:integer item type conn.createAtomicType(ZorbaXQItemType.XQBASETYPE_INTEGER); Parameters
Returnsa new ZorbaXQItemType representing the atomic typeParameters
createAttributeTypeXQItemType createAttributeType(QName nodename, int basetype) Creates a new ZorbaXQItemType object representing the XQuery attribute(nodename, basetype) type with the given node name and base type. This method can be used to create item type for attributes with a pre-defined schema type.Example - {.java} ZorbaXQConnection conn = ..; // An XQuery connection - attribute() // no node name, pass null for the node name conn.createAttributeType(null, ZorbaXQItemType.XQBASETYPE_ANYSIMPLETYPE); - attribute (*) // equivalent to attribute() conn.createAttributeType(null, ZorbaXQItemType.XQBASETYPE_ANYSIMPLETYPE); - attribute (person) // attribute of name person and any simple type. conn.createAttributeType(new QName("person"), ZorbaXQItemType.XQBASETYPE_ANYSIMPLETYPE); - attribute(foo:bar) // node name foo:bar, type is any simple type conn.createAttributeType(new QName("http://www.foo.com", "bar","foo"), ZorbaXQItemType.XQBASETYPE_ANYSIMPLETYPE); - attribute(foo:bar, xs:integer) // node name foo:bar, type is xs:integer conn.createAttributeType(new QName("http://www.foo.com", "bar","foo"), ZorbaXQItemType.XQBASETYPE_INTEGER); Parameters
Returnsa new ZorbaXQItemType representing the XQuery attribute(nodename, basetype) typeParameters
createAttributeTypeXQItemType createAttributeType(QName nodename, int basetype, QName typename, URI schemaURI) Creates a new ZorbaXQItemType object representing the XQuery attribute(nodename, basetype) type with the given node name and base type. The type name can reference either pre-defined simple types or user-defined simple types.Example - {.java} ZorbaXQConnection conn = ..; // An XQuery connection - attribute (name, employeename) // attribute name of type employeename conn.createAttributeType(new QName("name"), ZorbaXQItemType.XQBASETYPE_ANYSIMPLETYPE, new QName("employeename"), null); - attribute (foo:bar, po:city) where the prefix foo refers to the namespace http://www.foo.com and the prefix po refers to the namespace "http://www.address.com" conn.createAttributeType(new QName("http://www.foo.com", "bar","foo"), ZorbaXQItemType.XQBASETYPE_ANYSIMPLETYPE, new QName("http://address.com", "address","po"), null); - attribute (zip, zipcode) // attribute zip of type zipchode which derives from // xs:string conn.createAttributeType(new QName("zip"), ZorbaXQItemType.XQBASETYPE_STRING, new QName("zipcode"), null); - attribute(foo:bar, po:hatsize) where the prefix foo refers to the namespace http://www.foo.com and the prefix po refers to the namespace "http://www.hatsizes.com" with schema URI "http://hatschema.com" conn.createAttributeType(new QName("http://www.foo.com", "bar","foo"), ZorbaXQItemType.XQBASETYPE_INTEGER, new QName("http://www.hatsizes.com", "hatsize","po"), new QName("http://hatschema.com")); Parameters
Returnsa new ZorbaXQItemType representing the XQuery attribute(nodename,basetype, typename,schemaURI) type.Parameters
createCommentTypeXQItemType createCommentType() Creates a new ZorbaXQItemType object representing the XQuery comment() type. Creates a new ZorbaXQItemType object representing the XQuery comment() type. The ZorbaXQItemType object will have the item kind set to ZorbaXQItemType.XQITEMKIND_COMMENT.Example - {.java} ZorbaXQConnection conn = ..; // An XQuery connection ZorbaXQItemType cmttype = conn.createCommentType(); int itemkind = cmttype.getItemKind(); // will be ZorbaXQItemType.XQITEMKIND_COMMENT ZorbaXQExpression expr = conn.createExpression(); ZorbaXQSequence result = expr.executeQuery("<!-- comments -->"); result.next(); boolean pi = result.instanceOf(cmttype); // will be true Returnsa new ZorbaXQItemType representing the XQuery comment() typeParameters
createDocumentElementTypeXQItemType createDocumentElementType(XQItemType elementType) Creates a new ZorbaXQItemType object representing the XQuery document-node(elementType) type containing a single element. Creates a new ZorbaXQItemType object representing the XQuery document-node(elementType) type containing a single element. The ZorbaXQItemType object will have the item kind set to ZorbaXQItemType.XQITEMKIND_DOCUMENT_ELEMENT and the base type set to the item type of the input elementType. Parameters
Returnsa new ZorbaXQItemType representing the XQuery document-node(elementType) type containing a single elementParameters
createDocumentSchemaElementTypeXQItemType createDocumentSchemaElementType(XQItemType elementType) Creates a new ZorbaXQItemType object representing the XQuery document-node(elementType) type containing a single schema-element(...). The ZorbaXQItemType object will have the item kind set to ZorbaXQItemType.XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT and the base type set to the item type of the input elementType. Parameters
Returnsa new ZorbaXQItemType representing the XQuery document-node(elementType) type containing a single schema-element(...) elementParameters
createDocumentTypeXQItemType createDocumentType() Creates a new ZorbaXQItemType object representing the XQuery document-node() type. The ZorbaXQItemType object will have the item kind set to ZorbaXQItemType.XQITEMKIND_DOCUMENT. Returnsa new ZorbaXQItemType representing the XQuery document-node() typeParameters
createElementTypeXQItemType createElementType(QName nodename, int baseType) Creates a new ZorbaXQItemType object representing the XQuery element(nodename, basetype) type, with the given node name and base type. This method can be used to create item type for elements with a pre-defined schema type.Example - {.java} ZorbaXQConnection conn = ..; // An XQuery connection - element() // no node name, pass null for the node name conn.createElementType(null, ZorbaXQItemType.XQBASETYPE_ANYTYPE); - element (*) // equivalent to element() conn.createElementType(null, ZorbaXQItemType.XQBASETYPE_ANYTYPE); - element(person) // element of name person and any type. conn.createElementType(new QName("person"), ZorbaXQItemType.XQBASETYPE_ANYTYPE); - element(foo:bar) // node name foo:bar, type is anytype conn.createElementType(new QName("http://www.foo.com", "bar","foo"), ZorbaXQItemType.XQBASETYPE_ANYTYPE); - element(foo:bar, xs:integer) // node name foo:bar, type is xs:integer conn.createElementType(new QName("http://www.foo.com", "bar","foo"), ZorbaXQItemType.XQBASETYPE_INTEGER); Parameters
Returnsa new ZorbaXQItemType representing the XQuery element(nodename, basetype) typeParameters
createElementTypeXQItemType createElementType(QName nodename, int baseType, QName typename, URI schemaURI, boolean allowNill) Creates a new ZorbaXQItemType object representing the XQuery element(nodename,basetype,typename,schemaURI, allowNill) type, given the node name, base type, schema type name, schema URI, and nilled check. The type name can reference either pre-defined schema types or user-defined types.Example - {.java} ZorbaXQConnection conn = ..; // An XQuery connection - element (person, employee) // element person of type employee conn.createElementType(new QName("person"), ZorbaXQItemType.XQBASETYPE_ANYTYPE, new QName("employee"), null ,false); - element(person, employee ? ) // element person of type employee, whose nilled // property may be true or false. conn.createElementType(new QName("person"), ZorbaXQItemType.XQBASETYPE_ANYTYPE, new QName("employee"), null ,true); - element(foo:bar, po:address) where the prefix foo refers to the namespace http://www.foo.com and the prefix po refers to the namespace "http://www.address.com" conn.createElementType(new QName("http://www.foo.com", "bar","foo"), ZorbaXQItemType.XQBASETYPE_ANYTYPE, new QName("http://address.com", "address","po"), null, false); - element (zip, zipcode) // element zip of type zipchode which derives from // xs:string conn.createElementType(new QName("zip"), ZorbaXQItemType.XQBASETYPE_STRING, new QName("zipcode"), null, false); - element (*, xs:anyType ?) conn.createElementType(null, ZorbaXQItemType.XQBASETYPE_ANYTYPE, null, null, true); - element(foo:bar, po:hatsize) where the prefix foo refers to the namespace http://www.foo.com and the prefix po refers to the namespace "http://www.hatsizes.com" with schema URI "http://hatschema.com" conn.createElementType(new QName("http://www.foo.com", "bar","foo"), ZorbaXQItemType.XQBASETYPE_INTEGER, new QName("http://www.hatsizes.com", "hatsize","po"), new QName("http://hatschema.com"), false); Parameters
Returnsa new ZorbaXQItemType representing the XQuery element(nodename,basetype, typename,schemaURI, allowNill) typeParameters
createExpressionXQExpression createExpression() Creates a new ZorbaXQExpression object that can be used to perform execute immediate operations with XQuery expressions. The properties of the connection's default ZorbaXQStaticContext are copied to the returned ZorbaXQExpression. ReturnsZorbaXQExpression that can be used to execute multiple expressionsParameters
createExpressionXQExpression createExpression(XQStaticContext value) Creates a new ZorbaXQExpression object that can be used to perform execute immediate operations with XQuery expressions. The properties of the specified ZorbaXQStaticContext values are copied to the returned ZorbaXQExpression. Parameters
ReturnsZorbaXQExpression that can be used to execute multiple expressionsParameters
createItemXQItem createItem(XQItem value) Creates a copy of the specified ZorbaXQItem. This method can be used, for example, to copy an XQResultItem object so that the new item is not dependant on the connection. Parameters
Parameters
createItemFromAtomicValueXQItem createItemFromAtomicValue(String value, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type according to the casting from xs:string rules outlined in 17.1.1 Casting from xs:string and xs:untypedAtomic, XQuery 1.0 and XPath 2.0 Functions and Operators. If the cast fails an XQException is thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromBooleanXQItem createItemFromBoolean(boolean bln, XQItemType type)
createItemFromByteXQItem createItemFromByte(byte b, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the converstion fails, an XQException will be thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromDocumentXQItem createItemFromDocument(String value, String baseURI, XQItemType type) Creates an item from the given value. If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be null, XQITEMKIND_DOCUMENT_ELEMENT, or XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT.The value is converted into an instance of the specified type according to the rules defined in 14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0.If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromDocumentXQItem createItemFromDocument(Reader value, String baseURI, XQItemType type) Creates an item from the given value. If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be null, XQITEMKIND_DOCUMENT_ELEMENT, or XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT.The value is converted into an instance of the specified type according to the rules defined in 14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0.If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromDocumentXQItem createItemFromDocument(InputStream value, String baseURI, XQItemType type) Creates an item from the given value. If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be null, XQITEMKIND_DOCUMENT_ELEMENT, or XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT.The value is converted into an instance of the specified type according to the rules defined in 14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0.If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromDocumentXQItem createItemFromDocument(XMLStreamReader value, XQItemType type) Creates an item from the given value. If the value represents a well-formed XML document, it will be parsed and results in a document node. The kind of the input type must be null, XQITEMKIND_DOCUMENT_ELEMENT, or XQITEMKIND_DOCUMENT_SCHEMA_ELEMENT.The value is converted into an instance of the specified type according to the rules defined in 14.3 Mapping a Java XML document to an XQuery document node, XQuery API for Java (XQJ) 1.0.If the value is not well formed, or if a kind of the input type other than the values list above is specified, behavior is implementation defined and may raise an exception. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromDocumentXQItem createItemFromDocument(Source value, XQItemType type) Creates an item from the given value. An XQJ implementation must at least support the following implementations:
Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromDoubleXQItem createItemFromDouble(double value, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the converstion fails, an XQException will be thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromFloatXQItem createItemFromFloat(float value, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the converstion fails, an XQException will be thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromIntXQItem createItemFromInt(int value, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the converstion fails, an XQException will be thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromLongXQItem createItemFromLong(long value, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the converstion fails, an XQException will be thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromNodeXQItem createItemFromNode(Node value, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the converstion fails, an XQException will be thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromObjectXQItem createItemFromObject(Object value, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the converstion fails, an XQException will be thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromShortXQItem createItemFromShort(short value, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the converstion fails, an XQException will be thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemFromStringXQItem createItemFromString(String value, XQItemType type) Creates an item from a given value. The value is converted into an instance of the specified type, which must represent an xs:string or a type derived by restriction from xs:string. If the specified type is null, it defaults to xs:string. Subsequently the value is converted into an instance of the specified type according to the rule defined in 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the conversion fails, an XQException will be thrown. Parameters
ReturnsZorbaXQItem representing the resulting itemParameters
createItemTypeXQItemType createItemType() Creates a new ZorbaXQItemType object representing the XQuery item type. The ZorbaXQItemType object will have the item kind set to ZorbaXQItemType.XQITEMKIND_ITEM.Example - {.java} ZorbaXQConnection conn = ..; // An XQuery connection ZorbaXQItemType typ = conn.createItemType(); // represents the XQuery item type "item()" Returnsa new ZorbaXQItemType representing the XQuery item typeParameters
createNodeTypeXQItemType createNodeType() Creates a new ZorbaXQItemType object representing the XQuery node() type. The ZorbaXQItemType object will have the item kind set to ZorbaXQItemType.XQITEMKIND_NODE. Returnsa new ZorbaXQItemType representing the XQuery node() typeParameters
createProcessingInstructionTypeXQItemType createProcessingInstructionType(String piTarget) Creates a new ZorbaXQItemType object representing the XQuery processing-instruction(piTarget) type. The ZorbaXQItemType object will have the item kind set to ZorbaXQItemType.XQITEMKIND_PI. A string literal can be passed to match the PITarget of the processing instruction as described in 2.5.4.2 Matching an Item Type and an Item, XQuery 1.0: An XML Query Language.Example - {.java} ZorbaXQConnection conn = ..; // An XQuery connection ZorbaXQItemType anypi = conn.createProcessingInstructionType(); ZorbaXQItemType foopi = conn.createProcessingInstructionType("foo-format"); ZorbaXQExpression expr = conn.createExpression(); ZorbaXQSequence result = expr.executeQuery("<?format role="output" ?>"); result.next(); boolean pi = result.instanceOf(anypi); // will be true pi = result.instanceOf(foopi); // will be false ZorbaXQExpression expr = conn.createExpression(); ZorbaXQSequence result = expr.executeQuery("<?foo-format role="output" ?>"); result.next(); boolean pi = result.instanceOf(anypi); // will be true pi = result.instanceOf(foopi); // will be true Parameters
Returnsa new ZorbaXQItemType representing the XQuery processing-instruction(piTarget) typeParameters
createSchemaAttributeTypeXQItemType createSchemaAttributeType(QName nodename, int basetype, URI uri) Creates a new ZorbaXQItemType object representing the XQuery schema-attribute(nodename,basetype,schemaURI) type, with the given node name, base type, and schema URI. Example - {.java} ZorbaXQConnection conn = ..; // An XQuery connection - schema-attribute (name) // schema-attribute name, found in the schema // available at http://customerschema.com conn.createSchemaAttributeType(new QName("name"), ZorbaXQItemType.XQBASETYPE_STRING, new URI(http://customerschema.com)); Parameters
Returnsa new ZorbaXQItemType representing the XQuery schema-attribute(nodename,basetype, schemaURI) typeParameters
createSchemaElementTypeXQItemType createSchemaElementType(QName nodename, int baseType, URI schemaURI) Creates a new ZorbaXQItemType object representing the XQuery schema-element(nodename,basetype,schemaURI) type, given the node name, base type, and the schema URI. Example - {.java} ZorbaXQConnection conn = ..; // An XQuery connection - schema-element (customer) // schema-element person, found in // the schema available at http://customerschema.com conn.createElementType(new QName("customer"), ZorbaXQItemType.XQBASETYPE_ANYTYPE, new URI("http://customerschema.com")); Parameters
Returnsa new ZorbaXQItemType representing the XQuery schema-element(nodename,basetype, schemaURI) typeParameters
createSequenceXQSequence createSequence(XQSequence value) Creates a copy of the specified ZorbaXQSequence. Creates a copy of the specified ZorbaXQSequence. The newly created ZorbaXQSequence is scrollable and independent of any underlying ZorbaXQConnection. The new ZorbaXQSequence will contain all items from the specified ZorbaXQSequence starting from its current position. The copy process will implicitly perform next operations on the specified sequence to read the items. All items are consumed, the current position of the cursor is set to point after the last item. Parameters
ReturnsZorbaXQSequence representing a copy of the input sequenceParameters
createSequenceXQSequence createSequence(Iterator value) Creates an ZorbaXQSequence, containing all the items from the iterator. The newly created ZorbaXQSequence is scrollable and independent of any underlying ZorbaXQConnection. If the iterator returns an ZorbaXQItem, it is added to the sequence. If the iterator returns any other object, an item is added to the sequence following the rules from 14.2 Mapping a Java Data Type to an XQuery Data Type, XQuery API for Java (XQJ) 1.0. If the iterator does not return any items, then an empty sequence is created. Parameters
ReturnsZorbaXQSequence representing a copy of the input sequenceParameters
createSequenceTypeXQSequenceType createSequenceType(XQItemType item, int occurence) Creates a new sequence type from an item type and occurence indicator.
Parameters
Returnsa new ZorbaXQSequenceType representing the type of a sequenceParameters
createTextTypeXQItemType createTextType() Creates a new ZorbaXQItemType object representing the XQuery text() type. The ZorbaXQItemType object will have the item kind set to ZorbaXQItemType.XQITEMKIND_TEXT. Returnsa new ZorbaXQItemType representing the XQuery text() typeParameters
getAutoCommitboolean getAutoCommit() Gets the auto-commit attribute of this connection.
Returnsthe auto-commit attribute of this connection. true if the connection operates in auto-commit mode; otherwise falseParameters
getMetaDataXQMetaData getMetaData() Gets the metadata for this connection.
ReturnsXQMetadata representing the metadata of this connectionParameters
getStaticContextXQStaticContext getStaticContext() Gets an ZorbaXQStaticContext 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 ZorbaXQStaticContext object; in addition setStaticContext should be called to make those new values effective. ReturnsZorbaXQStaticContext representing the default values for all expression propertiesParameters
isClosedboolean isClosed() Checks if the connection is closed.
Returnstrue if the connection is in a closed state, false otherwiseprepareExpressionXQPreparedExpression prepareExpression(String value) Prepares an expression for execution. The properties of the connection's default ZorbaXQStaticContext are copied to the returned ZorbaXQPreparedExpression. Parameters
Returnsthe prepared XQuery expressionParameters
prepareExpressionXQPreparedExpression prepareExpression(String string, XQStaticContext xqsc) Prepares an expression for execution. The properties of the connection's default ZorbaXQStaticContext are copied to the returned ZorbaXQPreparedExpression. Parameters
Returnsthe prepared XQuery expressionParameters
prepareExpressionXQPreparedExpression prepareExpression(Reader reader) Prepares an expression for execution. The properties of the connection's default ZorbaXQStaticContext are copied to the returned ZorbaXQPreparedExpression. Parameters
Returnsthe prepared XQuery expressionParameters
prepareExpressionXQPreparedExpression prepareExpression(Reader reader, XQStaticContext xqsc) Prepares an expression for execution. The properties of the connection's default ZorbaXQStaticContext are copied to the returned ZorbaXQPreparedExpression. Parameters
Returnsthe prepared XQuery expressionParameters
prepareExpressionXQPreparedExpression prepareExpression(InputStream in) Prepares an expression for execution. The properties of the connection's default ZorbaXQStaticContext are copied to the returned ZorbaXQPreparedExpression. Parameters
Returnsthe prepared XQuery expressionParameters
prepareExpressionXQPreparedExpression prepareExpression(InputStream in, XQStaticContext xqsc) Prepares an expression for execution. The properties of the connection's default ZorbaXQStaticContext are copied to the returned ZorbaXQPreparedExpression. Parameters
Returnsthe prepared XQuery expressionParameters
rollbackvoid rollback() Undoes all changes made in the current transaction and releases any locks held by the datasource. This method should be used only when auto-commit mode is disabled. Parameters
setAutoCommitvoid setAutoCommit(boolean bln)
setStaticContextvoid setStaticContext(XQStaticContext xqsc) Sets the default values for all expression properties. The implementation will read out all expression properties from the specified ZorbaXQStaticContext and update its private copy. Parameters
Parameters
ZorbaXQConnection ZorbaXQConnection()
ZorbaXQConnection ZorbaXQConnection(Properties aProperties)
Private FunctionscreateDecimalXQItem createDecimal(BigDecimal value, XQItemType type)
isClosedXQExceptionvoid isClosedXQException()
isNullXQExceptionvoid isNullXQException(Object value)
nodeToStringString nodeToString(Node node)
|