com.groiss.reporting.engine
Class QueryEngine

java.lang.Object
  extended by com.groiss.reporting.engine.QueryEngine
All Implemented Interfaces:
Public

public class QueryEngine
extends java.lang.Object
implements Public


Constructor Summary
QueryEngine()
           
 
Method Summary
static void abort(java.lang.String query_id)
          Aborts a query execution
static Pair execute(Query q)
           
static Pair execute(Query q, java.lang.String query_id)
          Executes a query Object
static void executeQuery(javax.servlet.http.HttpServletRequest r, javax.servlet.http.HttpServletResponse res)
           
static void executeQuery(MultipartRequest req, javax.servlet.http.HttpServletResponse res)
           
static java.lang.String generateQueryId()
          returns a generated query ID
static ReportingData getReportingDataObject(org.jdom.Element e)
           
static ReportingData getReportingDataObject(java.lang.String entity, java.lang.String attribute)
           
static boolean hasStatRight(User u)
           
static boolean isOracle()
           
static void outputTableModel(javax.servlet.http.HttpServletResponse res, javax.swing.table.TableModel tm, Query q)
          Outputs the query result using the exporter of the query
static org.jdom.Document parseXMLQuery(java.lang.String queryStr)
          Parses a XML String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryEngine

public QueryEngine()
Method Detail

hasStatRight

public static boolean hasStatRight(User u)
Parameters:
u -
Returns:
true if the user has the right statistic

executeQuery

public static void executeQuery(javax.servlet.http.HttpServletRequest r,
                                javax.servlet.http.HttpServletResponse res)
                         throws java.lang.Exception
Throws:
java.lang.Exception

executeQuery

public static void executeQuery(MultipartRequest req,
                                javax.servlet.http.HttpServletResponse res)
                         throws java.lang.Exception
Throws:
java.lang.Exception

outputTableModel

public static void outputTableModel(javax.servlet.http.HttpServletResponse res,
                                    javax.swing.table.TableModel tm,
                                    Query q)
                             throws java.lang.Exception
Outputs the query result using the exporter of the query

Parameters:
res -
tm - - the tablemodel
q - - the query object
Throws:
java.lang.Exception

execute

public static Pair execute(Query q)
                    throws java.lang.Exception
Throws:
java.lang.Exception

execute

public static Pair execute(Query q,
                           java.lang.String query_id)
                    throws java.lang.Exception
Executes a query Object

Parameters:
q - - the query object
query_id - - the id of the query
Returns:
a Pair. first Entry is the query Object, the second the result tablemodel
Throws:
java.lang.Exception

parseXMLQuery

public static org.jdom.Document parseXMLQuery(java.lang.String queryStr)
Parses a XML String

Parameters:
queryStr -
Returns:
the parsed DOM Document

getReportingDataObject

public static ReportingData getReportingDataObject(org.jdom.Element e)
                                            throws java.lang.Exception
Parameters:
e - - the xml element of the query xml
Returns:
- the ReportingData Object for this attribute
Throws:
java.lang.Exception
See Also:
getReportingDataObject(String, String)

getReportingDataObject

public static ReportingData getReportingDataObject(java.lang.String entity,
                                                   java.lang.String attribute)
                                            throws java.lang.Exception
Parameters:
entity - - the referenced entity id of schema
attribute - - the referenced attribute id of schema
Returns:
the ReportingData Object for this attribute
Throws:
java.lang.Exception

isOracle

public static boolean isOracle()
Returns:
true if Database is Oracle

generateQueryId

public static java.lang.String generateQueryId()
returns a generated query ID


abort

public static void abort(java.lang.String query_id)
                  throws java.lang.Exception
Aborts a query execution

Parameters:
query_id -
Throws:
java.lang.Exception


Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.