result.setProperty(pn_xqj_queryLanguageTypeAndVersion, String.valueOf(ctx.getQueryLanguageTypeAndVersion())); result.setProperty(pn_xqj_queryTimeout, String.valueOf(ctx.getQueryTimeout())); result.setProperty(pn_xqj_scrollability, String.valueOf(ctx.getScrollability())); return result;
@Override public XQResultSequence executeQuery() throws XQException { checkState(ex_expression_closed); closeResults(); ResultCursor<XQItemAccessor> result = connection.executeQuery(xquery, context); XQResultSequence sequence; if (context.getScrollability() == XQConstants.SCROLLTYPE_SCROLLABLE) { sequence = new ScrollableXQResultSequence(this, ((ResultCursorBase<XQItemAccessor>) result).getList()); } else { sequence = new IterableXQResultSequence(this, result); } results.add(sequence); return sequence; }
@Override public XQResultSequence executeQuery(String query) throws XQException { checkState(ex_expression_closed); if (query == null) { throw new XQException("Provided query is null"); } closeResults(); ResultCursor<XQItemAccessor> result = connection.executeQuery(query, context); XQResultSequence sequence; if (context.getScrollability() == XQConstants.SCROLLTYPE_SCROLLABLE) { sequence = new ScrollableXQResultSequence(this, ((ResultCursorBase<XQItemAccessor>) result).getList()); } else { sequence = new IterableXQResultSequence(this, result); } results.add(sequence); return sequence; }
public void copyFrom(XQStaticContext from) throws XQException { this.prefixes = null; this.namespaces.clear(); for (String prefix: from.getNamespacePrefixes()) { this.declareNamespace(prefix, from.getNamespaceURI(prefix)); } this.defaultElementTypeNamespace = from.getDefaultElementTypeNamespace(); this.defaultFunctionNamespace = from.getDefaultFunctionNamespace(); this.defaultCollationUri = from.getDefaultCollation(); this.constructionMode = from.getConstructionMode(); this.orderingMode = from.getOrderingMode(); this.defaultOrderForEmptySequences = from.getDefaultOrderForEmptySequences(); this.boundarySpacePolicy = from.getBoundarySpacePolicy(); this.copyNamespacesModePreserve = from.getCopyNamespacesModePreserve(); this.copyNamespacesModeInherit = from.getCopyNamespacesModeInherit(); this.baseUri = from.getBaseURI(); this.bindingMode = from.getBindingMode(); this.holdability = from.getHoldability(); this.queryLanguageTypeAndVersion = from.getQueryLanguageTypeAndVersion(); this.scrollability = from.getScrollability(); this.queryTimeout = from.getQueryTimeout(); setContextItemStaticType(from.getContextItemStaticType()); }