com.groiss.reporting
Class QueryEngine

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

public class QueryEngine
extends java.lang.Object
implements Public

initalize reporting and executes reports


Constructor Summary
QueryEngine()
           
 
Method Summary
static void abort(java.lang.String query_id)
          Aborts a query execution
static java.lang.String encodeId(java.lang.String id)
           
static Pair<Query,java.util.List<java.util.List<java.lang.Object>>> execute(Query q, java.lang.String query_id)
          Executes a query Object using cache
static void executeQuery(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Execute a query.
static void executeQuery(MultipartRequest req, javax.servlet.http.HttpServletResponse res, boolean isStandardSearch)
           
static java.lang.String generateQueryId(Query q, User u)
          returns a unique query ID for caching purposes
static Query getContextQuery()
           
static int getDocSearchMode()
           
static java.lang.String getLocalizeString(java.lang.String key)
           
protected static int getMaxTable()
           
static void getQueryToken()
          Try to get a execution Token.
static ReportingData getReportingDataInstance(org.jdom.Element e)
           
static ReportingData getReportingDataInstance(java.lang.String entity, java.lang.String attribute)
           
static java.lang.String getSystemSchemaFile()
           
static ReportingTableModel getTableModel(java.util.List<java.util.List<java.lang.Object>> values, Query q)
           
static boolean hasStatRight(User u)
          check if a specified user has the statistic right
static void init(boolean forceInitalize)
          initalize the engine configuration
static boolean isOracle()
           
static java.lang.String localize(java.lang.String text)
           
static boolean openDocInNewWin()
           
static boolean openFormInEditMode()
           
static void outputTableModel(javax.servlet.http.HttpServletResponse res, java.util.List<java.util.List<java.lang.Object>> values, Query q)
          Outputs the query result using the exporter of the query
static void releaseQueryToken()
          Release Query Token so that queued reporty may start execution
static void sheduleReinit()
          shedules reinitalization for Reporting engine
static boolean showTimeInDateConds()
           
 
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

init

public static void init(boolean forceInitalize)
initalize the engine configuration


sheduleReinit

public static void sheduleReinit()
shedules reinitalization for Reporting engine


hasStatRight

public static boolean hasStatRight(User u)
check if a specified user has the statistic right

Parameters:
u - the user
Returns:
true if the user has the right statistic

executeQuery

public static void executeQuery(javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res)
Execute a query. Query parameter query is interpredted as a query xml string , id or object as a reference to a storedquery


executeQuery

public static void executeQuery(MultipartRequest req,
                                javax.servlet.http.HttpServletResponse res,
                                boolean isStandardSearch)

outputTableModel

public static void outputTableModel(javax.servlet.http.HttpServletResponse res,
                                    java.util.List<java.util.List<java.lang.Object>> values,
                                    Query q)
Outputs the query result using the exporter of the query

Parameters:
res -
values - the result table
q - the query object

getTableModel

public static ReportingTableModel getTableModel(java.util.List<java.util.List<java.lang.Object>> values,
                                                Query q)
Parameters:
values - the result values
the list of lists contains instances of com.groiss.reporting.data.ReportingExportable or java.lang.String
q - the query object
Returns:
the result tablemodel

execute

public static Pair<Query,java.util.List<java.util.List<java.lang.Object>>> execute(Query q,
                                                                                   java.lang.String query_id)
Executes a query Object using cache

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 values
the list of lists contains instances of com.groiss.reporting.data.ReportingExportable or java.lang.String
This matrix is the raw data of the ReportingTableModel

releaseQueryToken

public static void releaseQueryToken()
Release Query Token so that queued reporty may start execution


getQueryToken

public static void getQueryToken()
Try to get a execution Token. if report has to wait, a BeanManager.commit is done to release the If report has to wait for Token, the transaction is commited and the db-connection is released


encodeId

public static java.lang.String encodeId(java.lang.String id)

isOracle

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

generateQueryId

public static java.lang.String generateQueryId(Query q,
                                               User u)
returns a unique query ID for caching purposes


abort

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

Parameters:
query_id - the queryid to abort

openDocInNewWin

public static boolean openDocInNewWin()
Returns:
true if documents should be opended in a new window

openFormInEditMode

public static boolean openFormInEditMode()
Returns:
true if forms should be opened in edit mode

getDocSearchMode

public static int getDocSearchMode()
Returns:
the configured documet search mode

getSystemSchemaFile

public static java.lang.String getSystemSchemaFile()
Returns:
the name of the configured system schema file path

getReportingDataInstance

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

getReportingDataInstance

public static ReportingData getReportingDataInstance(org.jdom.Element e)
Parameters:
e - the xml element of the query xml
Returns:
the ReportingData Object for this attribute
See Also:
getReportingDataInstance(String, String)

getContextQuery

public static Query getContextQuery()
Returns:
current executed queryobject

localize

public static java.lang.String localize(java.lang.String text)

getLocalizeString

public static java.lang.String getLocalizeString(java.lang.String key)

getMaxTable

protected static int getMaxTable()
Returns:
the maxTable

showTimeInDateConds

public static boolean showTimeInDateConds()
Returns:
true if Datepickers in Dateconditions shall show timestamps too


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.