Class HistoryColumn

    • Constructor Detail

      • HistoryColumn

        public HistoryColumn​(java.lang.String name,
                             LoggerEx queryLogger)
      • HistoryColumn

        protected HistoryColumn​(java.lang.String name,
                                DataTypeClass type,
                                LoggerEx queryLogger)
      • HistoryColumn

        protected HistoryColumn​(java.lang.String name,
                                DataTypeClass type)
        Protected because it should only be called by value-generating subclasses (like timestamp). Otherwise we want to enforce that a logger is passed in.
    • Method Detail

      • setQueryController

        public void setQueryController​(QueryController controller)
      • getDataType

        public DataTypeClass getDataType()
        Returns the type class of the column, or INTEGER if type has not been set. Therefore, it's not appropriate to use inside of this class, where we actually care if the type is null or not.
        It returns Integer for unknown, because 1) If type is unknown, it really means that there will be no data and 2) Integer reduces the chances of errors if using the query in a chart- charts don't like string types.
        Specified by:
        getDataType in interface DSHistoryColumn
        Specified by:
        getDataType in interface HistoryNode
        Overrides:
        getDataType in class AbstractHistoryNode
      • isSeedValue

        protected boolean isSeedValue​(long time)
      • canInterpolate

        protected boolean canInterpolate()
      • setAggregationMode

        public void setAggregationMode​(Aggregate mode)
      • getInterpolationModeAt

        protected InterpolationMode getInterpolationModeAt​(long time)
        Returns the registered interpolation mode at the given time, or Discreet if canInterpolate() returns false.
      • getScanClassRecordAt

        protected SCExecRecord getScanClassRecordAt​(long time)
      • createAggregationWindow

        protected DataWindow createAggregationWindow​(long blockId,
                                                     long windowSize)
      • adjustDataBlocksTo

        protected void adjustDataBlocksTo​(long blockId)
      • wasValueInterpolated

        public boolean wasValueInterpolated()
        Description copied from interface: HistoryNode
        Returns whether the the last value provided by getValue was purely interpolated- not based on any actual data.
        Specified by:
        wasValueInterpolated in interface HistoryNode
      • getValue

        public java.lang.Object getValue​(long blockId,
                                         int level)
        Gets the value at the given time. Timestamp should be less than nextAvailableTime, otherwise the value will be null and the quality will be UNKNOWN.
        Specified by:
        getValue in interface HistoryNode
        Parameters:
        level - the level of value to get. Usually 0 for the first value, but should be incremented each time hasMore is true.
      • hasMore

        public boolean hasMore()
        Indicates there are more values to return that can be retrieved through subsequent calls to getValue. Used for min/max values.
        Specified by:
        hasMore in interface HistoryNode