org.sixdml.xindice
Class xiSixdmlStatementService

java.lang.Object
  |
  +--org.sixdml.xindice.xiServiceBase
        |
        +--org.sixdml.xindice.xiSixdmlStatementService
All Implemented Interfaces:
Configurable, Service, SixdmlConstants, SixdmlStatementService

class xiSixdmlStatementService
extends xiServiceBase
implements SixdmlStatementService

 SixdmlStatementService.java

 This is a Service that enables users to create objects for issuing SiXDML statements over the 
 database. 

 Created: Mon Feb 25 01:03:24 2002
 

Version:
1.0
Author:
Dare Obasanjo

Fields inherited from class org.sixdml.xindice.xiServiceBase
collection, properties
 
Fields inherited from interface org.sixdml.SixdmlConstants
SIXDML_NS, SIXDML_VERSION
 
Constructor Summary
(package private) xiSixdmlStatementService()
          Default constructor initializes service.
 
Method Summary
 SixdmlStatement createStatement()
          Creates an implementation of the SixdmlStatement interface for executing SiXDML statements over the database.
 String getName()
          Gets the name of the service.
 SixdmlPreparedStatement prepareStatement(String query)
          Creates an implementation of the SixdmlPreparedStatement interface for executing parameterized SiXDML statements over the database.
 
Methods inherited from class org.sixdml.xindice.xiServiceBase
getProperty, getVersion, setCollection, setProperty
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface org.xmldb.api.base.Service
getVersion, setCollection
 
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, setProperty
 

Constructor Detail

xiSixdmlStatementService

xiSixdmlStatementService()
Default constructor initializes service.
Method Detail

createStatement

public SixdmlStatement createStatement()
                                throws XMLDBException
Creates an implementation of the SixdmlStatement interface for executing SiXDML statements over the database. Parameter-less SiXDML statements should be executed via SixdmlStatement objects although statements that are executed several times may benefit from using a SixdmlPreparedStatement if the database implements certain optimizations.
Specified by:
createStatement in interface SixdmlStatementService
Returns:
a SixdmlStatement object
Throws:
XMLDBException - if a database error occurs.

prepareStatement

public SixdmlPreparedStatement prepareStatement(String query)
                                         throws XMLDBException
Creates an implementation of the SixdmlPreparedStatement interface for executing parameterized SiXDML statements over the database. SixdmlPreparedStatement objects are also useful for implementations that support precompilation of SiXDML statements so that statements that are to be executed multiple times can be stored and precompiled once in a single object and not many times to increase efficiency.
Specified by:
prepareStatement in interface SixdmlStatementService
Parameters:
query - this is a SiXDML statement that contains one or more ? as placeholders for an XPath expression, an XML fragment or post-processing operation (such as an XQuery expression)
Returns:
a SixdmlPreparedStatement object.
Throws:
XMLDBException - if a database error occurs.
See Also:
ErrorMessages.NOT_IMPLEMENTED

getName

public String getName()
Gets the name of the service.
Specified by:
getName in interface Service
Overrides:
getName in class xiServiceBase
Returns:
the name of the service.