|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.reporting.engine.Query
public class Query
| Constructor Summary | |
|---|---|
Query(java.lang.String id,
java.lang.String title,
org.jdom.Document xml,
java.util.Date execution,
javax.servlet.http.HttpServletRequest req)
|
|
Query(java.lang.String id,
java.lang.String title,
org.jdom.Document xml,
java.util.Date execution,
javax.servlet.http.HttpServletRequest req,
com.groiss.reporting.StoredQuery q)
|
|
Query(java.lang.String id,
java.lang.String title,
org.jdom.Document xml,
java.util.Date execution,
java.util.Map paramMap)
Constructs a Query, builds the SQL Statement |
|
Query(java.lang.String id,
java.lang.String title,
org.jdom.Document xml,
java.util.Date execution,
java.util.Map paramMap,
com.groiss.reporting.StoredQuery q)
|
|
| Method Summary | |
|---|---|
void |
addCondition(java.lang.String tablename,
java.lang.String alias,
java.lang.String condition,
java.lang.String selection,
java.util.Vector condValues)
|
void |
addCondString(java.lang.String condition)
adds a sql syntax fitting string to conditon (Warning: no join for this statement is done!) |
void |
addConnector(java.lang.String connector)
|
void |
addOrderByForAggregateValueData(java.lang.String att)
|
boolean |
addRowNumber()
|
java.lang.String |
addSelect(java.lang.String tablename,
java.lang.String selectAttribute,
java.lang.String alias,
java.lang.String selection,
boolean addToGroupBy,
boolean addAliasAsPrefix)
Adds a select Attribute to the query. |
void |
addSelectNameOfAttrib(org.jdom.Element attribute,
java.lang.String name)
stores the attributenames gained from @link #addSelect(String, String, String, String, boolean, boolean) |
void |
addTempJoin(java.lang.String key1,
java.lang.String key2,
org.jdom.Element rel)
|
boolean |
containsTable(java.lang.String table,
java.lang.String alias)
|
boolean |
getAddArchive()
|
java.util.List |
getAttributes()
returns a list of all attributes of this query |
int |
getConditionCount()
|
java.lang.StringBuffer |
getConditionString()
|
protected java.util.Map |
getCondNeedsParam()
|
java.lang.String |
getDispStringForAttriubtes(org.jdom.Element attr,
boolean addSortPattern)
returns a displayname for the attribute |
java.lang.String |
getDispStringForConditions(org.jdom.Element c)
returns a displayname for the condtion c |
java.util.Date |
getExecutionTime()
|
ReportingExporter |
getExporter()
|
java.lang.String |
getExportingParam(java.lang.String key)
|
java.util.Map |
getExportingParams()
|
java.lang.String |
getId()
|
java.lang.String |
getMaxUnit()
|
java.lang.String |
getMinUnit()
|
java.lang.String |
getParam(java.lang.String key)
Returns the parameter from Map... if param has several values, they are returned seperated by a semicolon |
java.util.Map |
getParamMap()
|
java.lang.String |
getParamMask()
|
java.util.Vector |
getSelectNamesOfAttribs(org.jdom.Element attribute)
|
java.lang.String |
getSqlQueryString()
|
com.groiss.reporting.StoredQuery |
getStoredQuery()
|
TimeModel |
getTimemodel()
|
java.lang.String |
getTitle()
|
java.util.List |
getValues()
|
org.jdom.Document |
getXMLDoc()
|
boolean |
shallLockOperatorInParamMask()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Query(java.lang.String id,
java.lang.String title,
org.jdom.Document xml,
java.util.Date execution,
javax.servlet.http.HttpServletRequest req)
throws java.lang.Exception
id - title - xml - execution - req - - the HttpServletRequest parameter Map is used for Query(String, String, Document, Date, Map)
java.lang.ExceptionQuery(String, String, Document, Date, Map)
public Query(java.lang.String id,
java.lang.String title,
org.jdom.Document xml,
java.util.Date execution,
javax.servlet.http.HttpServletRequest req,
com.groiss.reporting.StoredQuery q)
throws java.lang.Exception
java.lang.Exception
public Query(java.lang.String id,
java.lang.String title,
org.jdom.Document xml,
java.util.Date execution,
java.util.Map paramMap)
throws java.lang.Exception
id - - the id of querytitle - - the query titlexml - - the xml documents descibing the queryexecution - - the timestamp of executionparamMap - - a map with parameters (e.g. params at execution), usually all request params are stored in this map
java.lang.Exception
public Query(java.lang.String id,
java.lang.String title,
org.jdom.Document xml,
java.util.Date execution,
java.util.Map paramMap,
com.groiss.reporting.StoredQuery q)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public org.jdom.Document getXMLDoc()
public java.lang.String getId()
public TimeModel getTimemodel()
public java.lang.String getMaxUnit()
public java.lang.String getMinUnit()
public int getConditionCount()
ReportingData.addConditionToQuery(Query, Element) to gain the maybe already filled parameter at execution values from parametermappublic java.util.Map getParamMap()
public java.lang.String getParam(java.lang.String key)
key - - the param name
public java.lang.String addSelect(java.lang.String tablename,
java.lang.String selectAttribute,
java.lang.String alias,
java.lang.String selection,
boolean addToGroupBy,
boolean addAliasAsPrefix)
tablename - - the tablename in databaseselectAttribute - - the sql select statementalias - - the used tablealiasselection - - an additional (additional to the selection defined in schema) selection to the table if neededaddToGroupBy - - false if sqlaggr is the selected aggregation. false otherwiseaddAliasAsPrefix - - true if tablealias shoulb be added in front of selectAttribute. false otherwise
public void addCondition(java.lang.String tablename,
java.lang.String alias,
java.lang.String condition,
java.lang.String selection,
java.util.Vector condValues)
tablename - - the tablename in databasealias - - the used tablealiascondition - - the condition stringselection - - an additional (additional to the selection defined in schema) selection to the table if neededcondValues - - a vector with values for the prepared statement. There has to be an element in the vector for each ? in conditionpublic void addCondString(java.lang.String condition)
condition - - the condition string
public boolean containsTable(java.lang.String table,
java.lang.String alias)
table - - the tablename in databasealias - - the used tablealias
true if table is already added with thos alias
public void addTempJoin(java.lang.String key1,
java.lang.String key2,
org.jdom.Element rel)
public java.lang.String getSqlQueryString()
public java.util.List getValues()
public java.util.List getAttributes()
public java.util.Vector getSelectNamesOfAttribs(org.jdom.Element attribute)
attribute - - the attribute
public void addSelectNameOfAttrib(org.jdom.Element attribute,
java.lang.String name)
attribute - - the attribute, which caused this select statementname - - the attribute name in the sql querypublic java.util.Date getExecutionTime()
public boolean getAddArchive()
true if query includes data from archive schemaprotected java.util.Map getCondNeedsParam()
public java.lang.StringBuffer getConditionString()
public java.lang.String getDispStringForAttriubtes(org.jdom.Element attr,
boolean addSortPattern)
attr - - attributeaddSortPattern - - if true the sortpaterns %ASC%, %DESC% and %NONE% are added to the displayname
public java.lang.String getDispStringForConditions(org.jdom.Element c)
c - - condition
public ReportingExporter getExporter()
public java.util.Map getExportingParams()
public java.lang.String getExportingParam(java.lang.String key)
key - - the name of the exorting parameter
public java.lang.String getTitle()
public boolean addRowNumber()
true if report should include row numberpublic java.lang.String getParamMask()
public com.groiss.reporting.StoredQuery getStoredQuery()
public void addConnector(java.lang.String connector)
public boolean shallLockOperatorInParamMask()
public void addOrderByForAggregateValueData(java.lang.String att)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||