org.tm4j.tologx
Interface PreparedQuery


public interface PreparedQuery

Represents a parsed, optimized tolog query which can be executed as often as required.


Method Summary
 TologResultsSet execute()
          Executes the prepared query.
 TologResultsSet execute(java.lang.Object[] params)
          Executes a prepared query substituting %n references with the nth value from the parameter array.
 java.lang.String getQueryString()
          Returns the prepared query string in tolog syntax.
 

Method Detail

getQueryString

public java.lang.String getQueryString()
Returns the prepared query string in tolog syntax. This string may differ from the original string used to prepare the query, as optimisations may have been performed by the QueryEvaluator.

Returns:
the prepared query string in tolog syntax.

execute

public TologResultsSet execute()
                        throws TologProcessingException
Executes the prepared query.

Returns:
the results of the query evaluation.
Throws:
TologProcessingException - if an error occurred during query evaluation.

execute

public TologResultsSet execute(java.lang.Object[] params)
                        throws TologProcessingException
Executes a prepared query substituting %n references with the nth value from the parameter array.

Parameters:
params - the parameter array for this query evaluation
Returns:
the results of the query evaluation.
Throws:
TologProcessingException - if an error occurred during query evaluation.