com.ibm.itim.adhocreport
Class Query

java.lang.Object
  |
  +--com.ibm.itim.adhocreport.Query
All Implemented Interfaces:
java.io.Serializable

public class Query
extends java.lang.Object
implements java.io.Serializable

This class it a template for storing the ad hoc report query. It contains information like columns used in the Query, tables used and the filter condition. The structure has a close mapping to the SQL statement organization.

See Also:
Serialized Form

Constructor Summary
Query()
           
Query(org.w3c.dom.Node node)
          This is the constructor which takes the query in XML format and constructs itself by populating its member variables.
 
Method Summary
 java.util.Vector getColumns()
          This method gets the columns.
 org.w3c.dom.Document getColumnsXML()
          This method returns the XML node containing the report columns.
 java.lang.String getFilter()
          Get the report filter
 java.util.Vector getTables()
          Get the tables used in the report
 org.w3c.dom.Document getTablesXML()
          This method returns the XML node containing the report tables.
 org.w3c.dom.Node getXML()
          This method returns the data contained by this object in XML format.
 void setAll(java.util.Vector columns, java.util.Vector tables, java.lang.String filter)
          Sets the member variables
 void setColumns(org.w3c.dom.Node node)
          This method sets the columns.
 void setColumns(java.util.Vector columns)
          Sets the columns in the report
 void setFilter(java.lang.String filter)
          Set the report filter
 void setTables(org.w3c.dom.Node node)
          This method sets the tables.
 void setTables(java.util.Vector tables)
          Sets the tables in the report
 java.lang.String toString()
          This method returns the SQL query string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Query

public Query()

Query

public Query(org.w3c.dom.Node node)
      throws InvalidReportColumnException
This is the constructor which takes the query in XML format and constructs itself by populating its member variables.
Parameters:
xml - - Report query in XML format.
Method Detail

setAll

public void setAll(java.util.Vector columns,
                   java.util.Vector tables,
                   java.lang.String filter)
            throws InvalidQueryException
Sets the member variables
Parameters:
columns -  
tables -  
filter -  
Throws:
InvalidQueryException -  

setColumns

public void setColumns(org.w3c.dom.Node node)
                throws InvalidReportColumnException
This method sets the columns. The argument is the Node object which represents the root Node of ReportXML which is represented in this Query object.
Parameters:
node -  
Throws:
InvalidReportColumnException -  

setTables

public void setTables(org.w3c.dom.Node node)
This method sets the tables. The argument is the Node object which represents the root Node of ReportXML which is represented in this Query object.
Parameters:
node - Root node of the XML representation of ReportXML object.

getXML

public org.w3c.dom.Node getXML()
                        throws javax.xml.parsers.ParserConfigurationException
This method returns the data contained by this object in XML format.
Returns:
Node

getColumnsXML

public org.w3c.dom.Document getColumnsXML()
                                   throws javax.xml.parsers.ParserConfigurationException
This method returns the XML node containing the report columns.
Returns:
Node

getTablesXML

public org.w3c.dom.Document getTablesXML()
                                  throws javax.xml.parsers.ParserConfigurationException
This method returns the XML node containing the report tables.
Returns:
Node

toString

public java.lang.String toString()
This method returns the SQL query string.
Overrides:
toString in class java.lang.Object
Returns:
java.lang.String

getColumns

public java.util.Vector getColumns()
This method gets the columns.
Returns:
Vector Columns in the report.

setColumns

public void setColumns(java.util.Vector columns)
                throws InvalidQueryException
Sets the columns in the report
Parameters:
columns -  
Throws:
InvalidQueryException -  

getFilter

public java.lang.String getFilter()
Get the report filter
Returns:
 

setFilter

public void setFilter(java.lang.String filter)
               throws InvalidQueryException
Set the report filter
Parameters:
filter -  
Throws:
InvalidQueryException -  

getTables

public java.util.Vector getTables()
Get the tables used in the report
Returns:
 

setTables

public void setTables(java.util.Vector tables)
               throws InvalidQueryException
Sets the tables in the report
Parameters:
tables -  
Throws:
InvalidQueryException -