scriptella.driver.xpath
Class XPathConnection

java.lang.Object
  extended by scriptella.spi.AbstractConnection
      extended by scriptella.driver.xpath.XPathConnection
All Implemented Interfaces:
Connection

public class XPathConnection
extends AbstractConnection

Represents a connection to an XML file.

For configuration details and examples see overview page.

Version:
1.0
Author:
Fyodor Kupolov

Nested Class Summary
 
Nested classes/interfaces inherited from class scriptella.spi.AbstractConnection
AbstractConnection.StatementCounter
 
Field Summary
 
Fields inherited from class scriptella.spi.AbstractConnection
counter
 
Constructor Summary
protected XPathConnection()
          For testing purposes only.
  XPathConnection(ConnectionParameters parameters)
           
 
Method Summary
 void close()
          Closes the connection and releases all related resources.
 void executeQuery(Resource queryContent, ParametersCallback parametersCallback, QueryCallback queryCallback)
          Executes a query specified by its content.
 void executeScript(Resource scriptContent, ParametersCallback parametersCallback)
          Executes a script specified by its content.
 
Methods inherited from class scriptella.spi.AbstractConnection
commit, getDialectIdentifier, getExecutedStatementsCount, isReadonly, rollback, setDialectIdentifier, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XPathConnection

protected XPathConnection()
For testing purposes only.


XPathConnection

public XPathConnection(ConnectionParameters parameters)
Method Detail

executeScript

public void executeScript(Resource scriptContent,
                          ParametersCallback parametersCallback)
                   throws ProviderException
Description copied from interface: Connection
Executes a script specified by its content.

scriptContent may be used as a key for caching purposes, i.e. provider may precompile scripts and use compiled versions for subsequent executions. Please note that only inline text resources can be safely cached.

Parameters:
scriptContent - script content. Cannot be null.
parametersCallback - callback to get parameter values. Cannot be null.
Throws:
ProviderException - if script execution failed.

executeQuery

public void executeQuery(Resource queryContent,
                         ParametersCallback parametersCallback,
                         QueryCallback queryCallback)
                  throws ProviderException
Description copied from interface: Connection
Executes a query specified by its content.

Parameters:
queryContent - query content. Cannot be null.
parametersCallback - callback to get parameter values. Cannot be null.
queryCallback - callback to call for each result set element produced by this query. Cannot be null.
Throws:
ProviderException - if query execution failed.
See Also:
Connection.executeScript(scriptella.spi.Resource,scriptella.spi.ParametersCallback)

close

public void close()
           throws ProviderException
Description copied from interface: Connection
Closes the connection and releases all related resources.

Throws:
ProviderException - if a critical failure occured.


Copyright © Copyright 2006-2007 The Scriptella Project Team.