public class XPathQueryExecutor extends java.lang.Object implements ParametersCallback
| Constructor and Description |
|---|
XPathQueryExecutor(java.lang.ThreadLocal<org.w3c.dom.Node> context,
org.w3c.dom.Document document,
Resource xpathResource,
scriptella.driver.xpath.XPathExpressionCompiler compiler,
AbstractConnection.StatementCounter counter,
boolean returnArrays)
Crates executor to query document using a specified xpath expression.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(QueryCallback queryCallback,
ParametersCallback parentParameters)
Executes a query and notifies queryCallback for each found node.
|
java.lang.Object |
getParameter(java.lang.String name)
Returns the value of parameter specified by name.
|
public XPathQueryExecutor(java.lang.ThreadLocal<org.w3c.dom.Node> context,
org.w3c.dom.Document document,
Resource xpathResource,
scriptella.driver.xpath.XPathExpressionCompiler compiler,
AbstractConnection.StatementCounter counter,
boolean returnArrays)
context - thread local for sharing current node between queries.
The instance of thread local is shared between all connection queries.document - document to query.xpathResource - resource with xpath expression.compiler - xpath expression compilercounter - statement counter.returnArrays - true if string arrays should be returned for variables.public void execute(QueryCallback queryCallback, ParametersCallback parentParameters)
queryCallback - callback to notify for each found node.parentParameters - parent parameters to inherit.public java.lang.Object getParameter(java.lang.String name)
ParametersCallbackThe callback internally delegates a call to parent callbacks if the parameter cannot be found.
getParameter in interface ParametersCallbackname - parameter name. Providers are allowed (but not required) to ignore a case of the name parameter
to comply with their internal model. For example JDBC drivers are case-insensitive to column names.Copyright © Copyright 2006-2019 The Scriptella Project Team.