public class QueryEngine extends Object
Constructor and Description |
---|
QueryEngine() |
Modifier and Type | Method and Description |
---|---|
static void |
abort(String query_id)
Aborts a query execution
|
static String |
encodeId(String id) |
static Pair<Query,List<List<Object>>> |
execute(Query q)
Executes a query Object using cache
|
static Pair<Query,List<List<Object>>> |
execute(Query q,
String query_id)
Deprecated.
use
execute(Query) instead |
static Pair<Query,List<List<Object>>> |
execute(Query q,
String query_id,
String requestId)
Executes a query Object using cache
|
static Pair<Query,List<List<Object>>> |
execute(Report sq,
Map<String,String[]> params) |
static void |
executeQuery(HttpServletRequest req,
HttpServletResponse res)
the method executes report in a iframe context.
|
static String |
generateQueryId(Query q,
User u)
returns a unique query ID for caching purposes
|
static Query |
getContextQuery() |
static int |
getDocSearchMode() |
static String |
getLocalizeString(String key) |
static int |
getMaxParallel() |
protected static int |
getMaxTable() |
static Query |
getQueryObject(HttpServletRequest req,
boolean isStandardSearch) |
static Query |
getQueryObject(String id,
String title,
Document queryDoc,
Report q,
Map<String,String[]> paramMap,
Date execution)
Create Query Object
|
static ReportingData |
getReportingDataInstance(Element e) |
static ReportingData |
getReportingDataInstance(String entity,
String attribute) |
static String |
getSystemSchemaFile()
returns always "reporting.xml"
|
static ReportingTableModel |
getTableModel(List<List<Object>> values,
Query q) |
static boolean |
hasStatRight() |
static boolean |
hasStatRight(User u)
check if a specified user has the statistic right
|
static boolean |
inCache(String query_id) |
static void |
init(boolean forceInitalize)
initalize the engine configuration
|
static boolean |
isOracle() |
static String |
localize(String text) |
static boolean |
openDocInNewWin() |
static boolean |
openFormInEditMode() |
static void |
sendReportRefreshToClient(String reportId)
Send refresh notification to clients to refresh displayed reports with the given id.
|
static void |
sendReportRefreshToClient(String reportId,
int maxSecondsDelayToRefresh)
Send refresh notification to clients to refresh displayed reports with the given id.
|
static void |
setThreadTzAndLocale(String tz,
String locale) |
static void |
sheduleReinit()
shedules reinitalization for Reporting engine
|
static void |
showStatus(HttpServletRequest req,
HttpServletResponse resp) |
static boolean |
showTimeInDateConds()
Deprecated.
|
public static void init(boolean forceInitalize)
public static void sheduleReinit()
public static void setThreadTzAndLocale(String tz, String locale)
tz
- locale
- public static boolean hasStatRight(User u)
u
- the usertrue
if the user has the right statistic
public static boolean hasStatRight()
public static Query getQueryObject(HttpServletRequest req, boolean isStandardSearch)
public static Query getQueryObject(String id, String title, Document queryDoc, Report q, Map<String,String[]> paramMap, 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(HttpServletRequest req, HttpServletResponse res)
public static ReportingTableModel getTableModel(List<List<Object>> values, Query q)
values
- the result valuesq
- the query objectpublic static boolean inCache(String query_id)
public static Pair<Query,List<List<Object>>> execute(Report sq, Map<String,String[]> params)
public static Pair<Query,List<List<Object>>> execute(Query q)
q
- - the query object@Deprecated public static Pair<Query,List<List<Object>>> execute(Query q, String query_id)
execute(Query)
insteadq
- - the query objectquery_id
- - the internal cache id of the query, use generateQueryId(Query, com.groiss.org.User)
to generate an unique ID.public static Pair<Query,List<List<Object>>> execute(Query q, String query_id, String requestId)
q
- - the query objectquery_id
- - the internal cache id of the query, use generateQueryId Method to generate an unique ID.public static boolean isOracle()
true
if Database is Oraclepublic static String generateQueryId(Query q, User u)
public static void abort(String query_id)
query_id
- the queryid to abortpublic static boolean openDocInNewWin()
public static boolean openFormInEditMode()
public static int getDocSearchMode()
public static String getSystemSchemaFile()
public static ReportingData getReportingDataInstance(String entity, 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()
protected static int getMaxTable()
@Deprecated public static boolean showTimeInDateConds()
public static void sendReportRefreshToClient(String reportId)
reportId
- the report to refresh - must not be nullpublic static void sendReportRefreshToClient(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 transactionpublic static void showStatus(HttpServletRequest req, HttpServletResponse resp) throws Exception
Exception
public static int getMaxParallel()
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.