Class QueryProvider


  • public class QueryProvider
    extends java.lang.Object
    Here we store the search queries in the class-path in the form of Freemarker templates and use the templating to perform the parameter substitution. This makes it cleaner than storing the search queries as multiline strings in Java code, and is much less verbose than storing these as POJOs.
    • Field Detail

      • MAX_STATES_FOR_ALARM

        public static final long MAX_STATES_FOR_ALARM
        Maximum number of states to return when querying the states for a single alarm.
        See Also:
        Constant Field Values
      • MAX_BUCKETS

        public static final long MAX_BUCKETS
        Maximum number of buckets that can be processed in one request. Subsequent requests should be made to page through the results
        See Also:
        Constant Field Values
    • Constructor Detail

      • QueryProvider

        public QueryProvider()
    • Method Detail

      • getAlarmStatesByDbId

        public java.lang.String getAlarmStatesByDbId​(long id)
      • getAlarmStatesByReductionKey

        public java.lang.String getAlarmStatesByReductionKey​(java.lang.String reductionKey)
      • getAlarmByDbIdAt

        public java.lang.String getAlarmByDbIdAt​(long id,
                                                 TimeRange timeRange)
      • getAlarmByReductionKeyAt

        public java.lang.String getAlarmByReductionKeyAt​(java.lang.String reductionKey,
                                                         TimeRange timeRange)
      • getActiveAlarmsAt

        public java.lang.String getActiveAlarmsAt​(TimeRange timeRange,
                                                  java.lang.Integer afterAlarmWithId)
      • getActiveAlarmIdsAt

        public java.lang.String getActiveAlarmIdsAt​(TimeRange timeRange,
                                                    java.lang.Integer afterAlarmWithId)
      • getActiveAlarmIdsAtTimeAndExclude

        public java.lang.String getActiveAlarmIdsAtTimeAndExclude​(TimeRange timeRange,
                                                                  java.util.Set<java.lang.Integer> alarmIdsToKeep,
                                                                  java.lang.Integer afterAlarmWithId)
      • getAllAlarms

        public java.lang.String getAllAlarms​(TimeRange timeRange,
                                             java.lang.Integer afterAlarmWithId)