org.jafer.query
Class CQLQuery

java.lang.Object
  extended by org.jafer.query.CQLQuery
All Implemented Interfaces:
QueryConverter

public class CQLQuery
extends java.lang.Object
implements QueryConverter

This class wraps a CQL Query


Field Summary
protected  java.lang.String cql
          Stores a reference to the base cql for the XCQL query root
protected  org.w3c.dom.Node queryRoot
          Stores a reference to the root of the cql query
 
Constructor Summary
CQLQuery(JaferQuery jaferQuery)
          constructor
CQLQuery(org.w3c.dom.Node xcql)
          constructor
CQLQuery(java.lang.String cql)
          constructor
 
Method Summary
 java.lang.String getCQLQuery()
          Get the constructed query object as CQL
 org.w3c.dom.Node getXCQLQuery()
          Get the constructed query object as XCQL
 java.lang.String getXML()
          This method returns a string representation of the XML for the current query
 CQLQuery toCQLQuery()
          This method converts the current Query representation into a CQLQuery object
 JaferQuery toJaferQuery()
          This method converts the current Query representation into a JaferQuery object
 RPNQuery toRPNQuery()
          This method converts the current Query representation into a RPNQuery object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queryRoot

protected org.w3c.dom.Node queryRoot
Stores a reference to the root of the cql query


cql

protected java.lang.String cql
Stores a reference to the base cql for the XCQL query root

Constructor Detail

CQLQuery

public CQLQuery(JaferQuery jaferQuery)
         throws QueryException
constructor

Parameters:
jaferQuery - the jafer query to construct from
Throws:
QueryException

CQLQuery

public CQLQuery(org.w3c.dom.Node xcql)
         throws QueryException
constructor

Parameters:
xcql - the XCQL root node
Throws:
QueryException

CQLQuery

public CQLQuery(java.lang.String cql)
         throws QueryException
constructor

Parameters:
cql - the cql as a string
Throws:
QueryException
Method Detail

getXCQLQuery

public org.w3c.dom.Node getXCQLQuery()
Get the constructed query object as XCQL

Returns:
the root node of the cql query

getCQLQuery

public java.lang.String getCQLQuery()
                             throws QueryException
Get the constructed query object as CQL

Returns:
the cql query as straight CQL
Throws:
QueryException

toCQLQuery

public CQLQuery toCQLQuery()
This method converts the current Query representation into a CQLQuery object

Specified by:
toCQLQuery in interface QueryConverter
Returns:
A new CQLQuery

toJaferQuery

public JaferQuery toJaferQuery()
                        throws QueryException
This method converts the current Query representation into a JaferQuery object

Specified by:
toJaferQuery in interface QueryConverter
Returns:
A new JaferQuery
Throws:
QueryException

toRPNQuery

public RPNQuery toRPNQuery()
                    throws QueryException
This method converts the current Query representation into a RPNQuery object

Specified by:
toRPNQuery in interface QueryConverter
Returns:
A new RPNQuery
Throws:
QueryException

getXML

public java.lang.String getXML()
                        throws QueryException
This method returns a string representation of the XML for the current query

Specified by:
getXML in interface QueryConverter
Returns:
The query in XML
Throws:
QueryException