Class AbstractSQLQuery
java.lang.Object
com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractChartQuery
com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractSQLQuery
- All Implemented Interfaces:
IQueryResponseListener
- Direct Known Subclasses:
HistogramQuery
,PenSQLQuery
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Holds the query (a String), and a list of parameters and their types. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected String
protected String
protected String
protected String
protected String
Fields inherited from class com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractChartQuery
badQuality, chart, data, log, showWarnings
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
generateWhereAndOrder
(StringBuilder sb, List<IValue<? extends Serializable>> params, List<Class<?>> paramTypes) Appends the WHERE and ORDER BY clauses to a string buffer, like:protected String
Generate a unique string for the query, independent of any values that may change (date ranges, for example.) Used as the "property key" for the quality system in case the query fails.protected abstract AbstractSQLQuery.QueryInfo
Construct the query and any parametersprotected Object
registerQuery
(int pollTime, boolean runOnce) Register this query with the QueryManager.protected void
setChart
(PMIEasyChart chart) void
setDatasource
(String datasource) protected abstract void
setDates
(PMIEasyChart chart) protected void
setGlobalWhere
(String globalWhere) void
setGroupName
(String groupName) protected void
setGroupWhere
(String groupWhere) void
setPenWhere
(String penWhere) void
setTableName
(String tName) void
setTimeCol
(String timeCol) toString()
Methods inherited from class com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractChartQuery
getData, getTargetFullPath, handleQueryReturnedError, handleQueryReturnedNoRows, handleQueryReturnedValue, notifyQueryRunning, setData, shutdown, startup, warn
-
Field Details
-
datasource
-
timeCol
-
tableName
-
groupName
-
penWhere
-
startDate
-
endDate
-
globalWhere
-
groupWhere
-
-
Constructor Details
-
AbstractSQLQuery
-
-
Method Details
-
registerQuery
Description copied from class:AbstractChartQuery
Register this query with the QueryManager. Called by AbstractchartQuery duringAbstractChartQuery.startup(PMIEasyChart)
- Specified by:
registerQuery
in classAbstractChartQuery
- Returns:
- The key object that the query manager gave back.
-
setChart
- Overrides:
setChart
in classAbstractChartQuery
-
setDates
-
toString
-
getQuasiPropertyName
Description copied from class:AbstractChartQuery
Generate a unique string for the query, independent of any values that may change (date ranges, for example.) Used as the "property key" for the quality system in case the query fails.- Specified by:
getQuasiPropertyName
in classAbstractChartQuery
-
setTableName
-
getTableName
-
setTimeCol
-
getTimeCol
-
generateWhereAndOrder
protected void generateWhereAndOrder(StringBuilder sb, List<IValue<? extends Serializable>> params, List<Class<?>> paramTypes) Appends the WHERE and ORDER BY clauses to a string buffer, like:" WHERE cond AND cond AND cond ORDER BY xval"
-
getWholeQuery
Construct the query and any parameters -
getDatasource
-
setDatasource
-
setGlobalWhere
-
setGroupWhere
-
getPenWhere
-
setPenWhere
-
getGroupName
-
setGroupName
-