org.sixdml.command
Interface SixdmlStatement

All Known Implementing Classes:
xiSixdmlStatement

public interface SixdmlStatement

 SixdmlStatement.java

 This class is used to execute SiXDML statements over the database.  

 Created: Sun Feb 24 01:03:24 2002
 

Version:
1.0
Author:
Dare Obasanjo
See Also:
SixdmlStatementService.createStatement()

Method Summary
 Document execute(String statement)
          Executes a SiXDML statement against the database and returns the results as an XML DOM object.
 void execute(String statement, DefaultHandler handler)
          Executes a SiXDML statement against the database and feeds the results to a SAX handler.
 void execute(String statement, OutputStream outputStream)
          Executes a SiXDML statement against the database and writes the results to the specified OutputStream.
 void execute(String statement, Writer writer)
          Executes a SiXDML statement against the database and writes the results using the specified writer.
 

Method Detail

execute

public Document execute(String statement)
                 throws XMLDBException,
                        SixdmlException
Executes a SiXDML statement against the database and returns the results as an XML DOM object. This method is best used if the results of the statement is XML which is not large.
Parameters:
statement - the statement to execute
Returns:
the results of the statement as a DOM object.
Throws:
SixdmlException - if the statement is invalid.
XMLDBException - if a database error occurs

execute

public void execute(String statement,
                    DefaultHandler handler)
             throws XMLDBException,
                    SixdmlException
Executes a SiXDML statement against the database and feeds the results to a SAX handler. This method is best used if the results of the statement is XML which may be large and the database supports streaming of the results.
Parameters:
statement - the statement to execute
handler - a SAX handler which operates on the results of the statement.
Throws:
SixdmlException - if the statement is invalid.
XMLDBException - if a database error occurs

execute

public void execute(String statement,
                    OutputStream outputStream)
             throws XMLDBException,
                    SixdmlException
Executes a SiXDML statement against the database and writes the results to the specified OutputStream. This method is best used when the results of the statement are not XML.
Parameters:
statement - the statement to execute
outputStream - the stream to write the results to
Throws:
SixdmlException - if the statement is invalid.
XMLDBException - if a database error occurs

execute

public void execute(String statement,
                    Writer writer)
             throws XMLDBException,
                    SixdmlException
Executes a SiXDML statement against the database and writes the results using the specified writer. This method is best used when the results of the statement are not XML.
Parameters:
statement - the statement to execute
writer - the writer to send results to
Throws:
SixdmlException - if the statement is invalid.
XMLDBException - if a database error occurs