Class TagHistoryTables.ScanclassExecutions

  • Enclosing class:
    TagHistoryTables

    public static class TagHistoryTables.ScanclassExecutions
    extends java.lang.Object
    The SCE (scan class execution) table is an important table which tracks when scan classes run. As long as the SC continues to execute, the END date is updated. After a period of non execution, a new row is inserted. It is therefore possible to calculate whether an interpolated value should be good or bad, based on whether in occured while the SC was running or not.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String END  
      static java.lang.String RATE  
      static java.lang.String SC_ID  
      static java.lang.String START  
      static java.lang.String TABLE_NAME  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String queryDeleteOldAllDrivers()  
      static java.lang.String queryGetCountSCToUpdate()
      Returns the count of rows that would match the UpdateEndTime query.
      static java.lang.String queryInsertExec()
      Params: scid, start, end, rate
      static java.lang.String queryUpdateEndTime()
      Returns the query which will update the END time of a SCE to INTIME where INTIME>StartTime and ENDTIME>INTIME-2*RATE.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScanclassExecutions

        public ScanclassExecutions()
    • Method Detail

      • queryUpdateEndTime

        public static java.lang.String queryUpdateEndTime()
        Returns the query which will update the END time of a SCE to INTIME where INTIME>StartTime and ENDTIME>INTIME-2*RATE. (but the query doesn't encode that equation.

        Params: intime (for new end), SCID, Rate, intime (for start compare), intime-2*Rate (for end compare).

      • queryGetCountSCToUpdate

        public static java.lang.String queryGetCountSCToUpdate()
        Returns the count of rows that would match the UpdateEndTime query. Due to problems with some db drivers not properly returning update counts, we have to use this method.
        SELECT count(*) FROM table WHERE {SCID},{RATE},{START},{END}
      • queryDeleteOldAllDrivers

        public static java.lang.String queryDeleteOldAllDrivers()
      • queryInsertExec

        public static java.lang.String queryInsertExec()
        Params: scid, start, end, rate