public class QueryEngine
extends java.lang.Object
Constructor and Description |
---|
QueryEngine() |
Modifier and Type | Method and Description |
---|---|
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 Query |
getQueryObject(javax.servlet.http.HttpServletRequest req,
boolean isStandardSearch) |
static Query |
getQueryObject(java.lang.String id,
java.lang.String title,
Document queryDoc,
com.groiss.reporting.StoredQuery q,
java.util.Map<java.lang.String,java.lang.String[]> paramMap,
java.util.Date execution)
Create Query Object
|
static void |
getQueryToken()
Try to get a execution Token. if report has to wait, a BeanManager.commit is done to release the connection
If report has to wait for Token, the transaction is commited and the db-connection is released
|
static ReportingData |
getReportingDataInstance(Element e) |
static ReportingData |
getReportingDataInstance(java.lang.String entity,
java.lang.String attribute) |
static java.lang.String |
getSystemSchemaFile()
returns always "reporting.xml"
|
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 boolean |
inCache(java.lang.String query_id) |
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 |
sendReportRefreshToClient(java.lang.String reportId)
Send refresh notification to clients to refresh displayed reports with the given id.
|
static void |
sendReportRefreshToClient(java.lang.String reportId,
int maxSecondsDelayToRefresh)
Send refresh notification to clients to refresh displayed reports with the given id.
|
static void |
setThreadTzAndLocale(java.lang.String tz,
java.lang.String locale) |
static void |
sheduleReinit()
shedules reinitalization for Reporting engine
|
static boolean |
showTimeInDateConds() |
public static void init(boolean forceInitalize)
public static void sheduleReinit()
public static void setThreadTzAndLocale(java.lang.String tz, java.lang.String locale)
tz
- locale
- public static boolean hasStatRight(User u)
u
- the usertrue
if the user has the right statistic
public static void executeQuery(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
public static Query getQueryObject(javax.servlet.http.HttpServletRequest req, boolean isStandardSearch)
public static Query getQueryObject(java.lang.String id, java.lang.String title, Document queryDoc, com.groiss.reporting.StoredQuery q, java.util.Map<java.lang.String,java.lang.String[]> paramMap, java.util.Date execution)
id
- the query idtitle
- the query titlequeryDoc
- the xml structure of the reportq
- the base stored query - maybe nullparamMap
- the map with parametersexecution
- execution timestamppublic static void executeQuery(MultipartRequest req, javax.servlet.http.HttpServletResponse res, boolean isStandardSearch)
public static void outputTableModel(javax.servlet.http.HttpServletResponse res, java.util.List<java.util.List<java.lang.Object>> values, Query q)
res
- values
- the result tableq
- the query objectpublic static ReportingTableModel getTableModel(java.util.List<java.util.List<java.lang.Object>> values, Query q)
values
- the result valuesq
- the query objectpublic static boolean inCache(java.lang.String query_id)
public static Pair<Query,java.util.List<java.util.List<java.lang.Object>>> execute(Query q, java.lang.String query_id)
q
- - the query objectquery_id
- - the internal cache id of the query, use generateQueryId Method to generate an unique ID.public static void releaseQueryToken()
public static void getQueryToken()
public static java.lang.String encodeId(java.lang.String id)
public static boolean isOracle()
true
if Database is Oraclepublic static java.lang.String generateQueryId(Query q, User u)
public static void abort(java.lang.String query_id)
query_id
- the queryid to abortpublic static boolean openDocInNewWin()
public static boolean openFormInEditMode()
public static int getDocSearchMode()
public static java.lang.String getSystemSchemaFile()
public static ReportingData getReportingDataInstance(java.lang.String entity, java.lang.String attribute)
entity
- the referenced entity id of schemaattribute
- the referenced attribute id of schemapublic static ReportingData getReportingDataInstance(Element e)
e
- the xml element of the query xmlgetReportingDataInstance(String, String)
public static Query getContextQuery()
public static java.lang.String localize(java.lang.String text)
public static java.lang.String getLocalizeString(java.lang.String key)
protected static int getMaxTable()
public static boolean showTimeInDateConds()
public static void sendReportRefreshToClient(java.lang.String reportId)
reportId
- the report to refresh - must not be nullpublic static void sendReportRefreshToClient(java.lang.String reportId, int maxSecondsDelayToRefresh)
reportId
- the report to refresh - must not be nullmaxSecondsDelayToRefresh
- - maximum delay (in seconds, default:30) to refresh report, the actual delay is random.
If a negative number is used, the event is sent immediately, if not, the notification is done after commit of the user transaction@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.