Class HistogramQuery
- java.lang.Object
-
- com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractChartQuery
-
- com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractSQLQuery
-
- com.inductiveautomation.factorypmi.application.components.chart.easychart.HistogramQuery
-
- All Implemented Interfaces:
IHistogramDatasource
,IPenDatasource
,IQueryResponseListener
public class HistogramQuery extends AbstractSQLQuery implements IHistogramDatasource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractSQLQuery
AbstractSQLQuery.QueryInfo
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractSQLQuery
datasource, endDate, globalWhere, groupName, groupWhere, penWhere, startDate, tableName, timeCol
-
Fields inherited from class com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractChartQuery
badQuality, chart, data, log, showWarnings
-
-
Constructor Summary
Constructors Constructor Description HistogramQuery(java.lang.String datasource, java.lang.String tableName, java.lang.String timeCol)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPen(PenData penData)
Adds a pen to this datasource.Dataset
getDataset()
The underlying dataset that drives this datasourceIHistogram
getHistogram()
int
getNumDatapoints()
Return the number of datapoints currently loaded in this sourceprotected AbstractSQLQuery.QueryInfo
getWholeQuery()
Construct the query and any parametersvoid
initRefs(java.util.Map<java.lang.String,PenData> allPens)
Gives the datasource a chance to install references to other pensboolean
isDataIn()
boolean
isZoomTracking()
True if this datasource should be restarted when the zoom level changes.protected java.lang.Object
registerQuery(int pollTime, boolean runOnce)
Register this query with the QueryManager.protected void
setData(Dataset data)
protected void
setDates(PMIEasyChart chart)
Called in order to set theAbstractSQLQuery.startDate
andAbstractSQLQuery.endDate
fields with proper late-binding IValue implementations.void
startup(PMIEasyChart chart)
Start this datasouce up.-
Methods inherited from class com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractSQLQuery
generateWhereAndOrder, getDatasource, getGroupName, getPenWhere, getQuasiPropertyName, getTableName, getTimeCol, setChart, setDatasource, setGlobalWhere, setGroupName, setGroupWhere, setPenWhere, setTableName, setTimeCol, toString
-
Methods inherited from class com.inductiveautomation.factorypmi.application.components.chart.easychart.AbstractChartQuery
getData, getTargetFullPath, handleQueryReturnedError, handleQueryReturnedNoRows, handleQueryReturnedValue, notifyQueryRunning, shutdown, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.factorypmi.application.components.chart.easychart.IPenDatasource
shutdown
-
-
-
-
Method Detail
-
getWholeQuery
protected AbstractSQLQuery.QueryInfo getWholeQuery()
Description copied from class:AbstractSQLQuery
Construct the query and any parameters- Specified by:
getWholeQuery
in classAbstractSQLQuery
-
registerQuery
protected java.lang.Object registerQuery(int pollTime, boolean runOnce)
Description copied from class:AbstractChartQuery
Register this query with the QueryManager. Called by AbstractchartQuery duringAbstractChartQuery.startup(PMIEasyChart)
- Overrides:
registerQuery
in classAbstractSQLQuery
- Returns:
- The key object that the query manager gave back.
-
setDates
protected void setDates(PMIEasyChart chart)
Description copied from class:AbstractSQLQuery
Called in order to set theAbstractSQLQuery.startDate
andAbstractSQLQuery.endDate
fields with proper late-binding IValue implementations.- Specified by:
setDates
in classAbstractSQLQuery
-
startup
public void startup(PMIEasyChart chart)
Description copied from interface:IPenDatasource
Start this datasouce up. This should certainly mean that the data gets generated at least once, and possibly more based upon the chart's polling settings. May be called again after shutdown().- Specified by:
startup
in interfaceIPenDatasource
- Overrides:
startup
in classAbstractChartQuery
-
setData
protected void setData(Dataset data)
- Overrides:
setData
in classAbstractChartQuery
-
getHistogram
public IHistogram getHistogram()
- Specified by:
getHistogram
in interfaceIHistogramDatasource
-
isDataIn
public boolean isDataIn()
-
addPen
public void addPen(PenData penData)
Description copied from interface:IPenDatasource
Adds a pen to this datasource. All pens will be added before startup() is called for the first time.- Specified by:
addPen
in interfaceIPenDatasource
-
initRefs
public void initRefs(java.util.Map<java.lang.String,PenData> allPens)
Description copied from interface:IPenDatasource
Gives the datasource a chance to install references to other pens- Specified by:
initRefs
in interfaceIPenDatasource
-
getNumDatapoints
public int getNumDatapoints()
Description copied from interface:IPenDatasource
Return the number of datapoints currently loaded in this source- Specified by:
getNumDatapoints
in interfaceIPenDatasource
-
getDataset
public Dataset getDataset()
Description copied from interface:IPenDatasource
The underlying dataset that drives this datasource- Specified by:
getDataset
in interfaceIPenDatasource
-
isZoomTracking
public boolean isZoomTracking()
Description copied from interface:IPenDatasource
True if this datasource should be restarted when the zoom level changes.- Specified by:
isZoomTracking
in interfaceIPenDatasource
-
-