scriptella.driver.xpath
Class XPathQueryExecutor

java.lang.Object
  extended by scriptella.driver.xpath.XPathQueryExecutor
All Implemented Interfaces:
ParametersCallback

public class XPathQueryExecutor
extends java.lang.Object
implements ParametersCallback

Executor for XPath queries.

Version:
1.0
Author:
Fyodor Kupolov

Constructor Summary
XPathQueryExecutor(org.w3c.dom.Document document, Resource xpathResource, scriptella.driver.xpath.XPathExpressionCompiler compiler, AbstractConnection.StatementCounter counter)
          Crates executor to query document using a specified xpath expression.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathQueryExecutor

public XPathQueryExecutor(org.w3c.dom.Document document,
                          Resource xpathResource,
                          scriptella.driver.xpath.XPathExpressionCompiler compiler,
                          AbstractConnection.StatementCounter counter)
Crates executor to query document using a specified xpath expression.

Parameters:
document - document to query.
xpathResource - resource with xpath expression.
counter - statement counter.
Method Detail

execute

public void execute(QueryCallback queryCallback,
                    ParametersCallback parentParameters)
Executes a query and notifies queryCallback for each found node.

Parameters:
queryCallback - callback to notify for each found node.
parentParameters - parent parameters to inherit.

getParameter

public java.lang.Object getParameter(java.lang.String name)
Description copied from interface: ParametersCallback
Returns the value of parameter specified by name.

The callback internally delegates a call to parent callbacks if the parameter cannot be found.

Specified by:
getParameter in interface ParametersCallback
Parameters:
name - 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.
Returns:
parameter value or null if parameter doesn't exist.


Copyright © Copyright 2006-2007 The Scriptella Project Team.