BEA Systems, Inc.


com.bea.ldi.server.common
Interface QueryResult


public interface QueryResult
extends java.io.Serializable

Result of the query execution


Field Summary
static long serialVersionUID
          Serialization Version UID.
 
Method Summary
 void close()
          This method releases internal resources immediatelly, instead of waiting for them to be released automatically by the garbage collector.
 org.w3c.dom.Document getDocument()
          Returns the result of query execution as a DOM Document.
 QueryResultMetaData getMetaData()
           
 boolean isEmpty()
          Checks whether the query result is empty.
 void print(java.io.Writer writer, boolean deallocate)
          Prints the query result to the specified output as XML.
 void printWithFormat(java.io.Writer writer, boolean deallocate)
          Prints the query result to the specified output as XML.
 java.lang.String toXML()
           
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serialization Version UID.
Method Detail

getDocument

public org.w3c.dom.Document getDocument()
                                 throws QueryResultException
Returns the result of query execution as a DOM Document. Clients should provide a JAXP-compatible parser.

Returns:
the result of query execution as DOM Document
Throws:
QueryResultException - Thrown if there is no parser availabe to parse the result, or an error is encountered while parsing.

toXML

public java.lang.String toXML()

Returns:
The XML content of the result. Returns null if the result is empty.

printWithFormat

public void printWithFormat(java.io.Writer writer,
                            boolean deallocate)
                     throws QueryResultException
Prints the query result to the specified output as XML. Query result is parsed before being printed in order to be formatted.

Parameters:
writer - the Writer that will be used to output the result.
deallocate - a flag specifying whether the memory occupied by the QueryResult instance should be released while the result is being printed.
Throws:
QueryResultException - Thrown if a problem occurs during parsing.

print

public void print(java.io.Writer writer,
                  boolean deallocate)
           throws QueryResultException
Prints the query result to the specified output as XML.

Parameters:
writer - the Writer that will be used to output the result.
deallocate - a flag specifying whether the memory occupied by the QueryResult instance should be released after the result has been printed.
Throws:
QueryResultException - Thrown if an exception occurs during printing

isEmpty

public boolean isEmpty()
Checks whether the query result is empty.

Returns:
true if the result is empty, otherwise false.

close

public void close()
This method releases internal resources immediatelly, instead of waiting for them to be released automatically by the garbage collector. Instance becomes unusable after this call.


getMetaData

public QueryResultMetaData getMetaData()


BEA Systems, Inc.

Documentation is available at
http://download.oracle.com/docs/cd/E13190_01/liquiddata/docs81