Class OutageDaoHibernate

    • Constructor Detail

      • OutageDaoHibernate

        public OutageDaoHibernate()

        Constructor for OutageDaoHibernate.

    • Method Detail

      • currentOutageCount

        public java.lang.Integer currentOutageCount()

        currentOutageCount

        Specified by:
        currentOutageCount in interface OutageDao
        Returns:
        a Integer object.
      • currentOutages

        public java.util.Collection<OnmsOutage> currentOutages()

        currentOutages

        Specified by:
        currentOutages in interface OutageDao
        Returns:
        a Collection object.
      • findAll

        public java.util.Collection<OnmsOutage> findAll​(java.lang.Integer offset,
                                                        java.lang.Integer limit)

        findAll

        Specified by:
        findAll in interface OutageDao
        Parameters:
        offset - a Integer object.
        limit - a Integer object.
        Returns:
        a Collection object.
      • newestCurrentOutages

        public java.util.Collection<CurrentOutageDetails> newestCurrentOutages​(java.util.List<java.lang.String> serviceNames)
        Finds the latest (unresolved) outages that match the given services.
        Specified by:
        newestCurrentOutages in interface OutageDao
        Parameters:
        serviceNames - a list of services
        Returns:
        a Collection of outages
      • matchingCurrentOutages

        public java.util.Collection<OnmsOutage> matchingCurrentOutages​(ServiceSelector selector)
        Finds all current (unresolved) outages that match the given service selector.
        Specified by:
        matchingCurrentOutages in interface OutageDao
        Parameters:
        selector - a service selector (filter + service list)
        Returns:
        a Collection of outages
      • countOutagesByNode

        public int countOutagesByNode()
        Get the number of nodes with outages.
        Specified by:
        countOutagesByNode in interface OutageDao
        Returns:
        the number of nodes with outages.
      • getNodeOutageSummaries

        public java.util.List<OutageSummary> getNodeOutageSummaries​(int rows)
        Get the list of current outages, one per node. If a node has more than one outage, the oldest outstanding outage is returned.
        Specified by:
        getNodeOutageSummaries in interface OutageDao
        Parameters:
        rows - The maximum number of outages to return.
        Returns:
        A list of outages.
      • getHeatMapItemsForEntity

        public java.util.List<HeatMapElement> getHeatMapItemsForEntity​(java.lang.String entityNameColumn,
                                                                       java.lang.String entityIdColumn,
                                                                       java.lang.String restrictionColumn,
                                                                       java.lang.String restrictionValue,
                                                                       java.lang.String... groupByColumns)
        Description copied from interface: OutageDao
        Retrieves heatmap elements for a given combination of database columns.
        Specified by:
        getHeatMapItemsForEntity in interface OutageDao
        Parameters:
        entityNameColumn - the entity's name column
        entityIdColumn - the entity's id column
        restrictionColumn - a column used for a restriction of the results
        restrictionValue - the value that must match against the restrictionColumn
        groupByColumns - columns used for the SQL group-by clause
        Returns:
        the heatmap elements for this query
      • getStatusChangesForApplicationIdBetween

        public java.util.Collection<OnmsOutage> getStatusChangesForApplicationIdBetween​(java.util.Date startDate,
                                                                                        java.util.Date endDate,
                                                                                        java.lang.Integer applicationId)
        Specified by:
        getStatusChangesForApplicationIdBetween in interface OutageDao