Class QueryProvider


  • public class QueryProvider
    extends 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 String getAlarmStatesByDbId​(long id)
      • getAlarmStatesByReductionKey

        public String getAlarmStatesByReductionKey​(String reductionKey)
      • getAlarmByDbIdAt

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

        public String getAlarmByReductionKeyAt​(String reductionKey,
                                               TimeRange timeRange)
      • getActiveAlarmIdsAtTimeAndExclude

        public String getActiveAlarmIdsAtTimeAndExclude​(TimeRange timeRange,
                                                        Set<Integer> alarmIdsToKeep,
                                                        Integer afterAlarmWithId)