use of org.opennms.core.criteria.restrictions.GtRestriction in project opennms by OpenNMS.
the class HypericAckProcessor method fetchUnclearedHypericAlarms.
/**
* <p>fetchUnclearedHypericAlarms</p>
*
* @return a {@link java.util.List} object.
*/
public List<OnmsAlarm> fetchUnclearedHypericAlarms() {
// Query for existing, unacknowledged alarms in OpenNMS that were generated based on Hyperic alerts
Criteria criteria = new Criteria(OnmsAlarm.class);
// criteria.add(Restrictions.isNull("alarmAckUser"));
// Restrict to Hyperic alerts
criteria.addRestriction(new EqRestriction("uei", "uei.opennms.org/external/hyperic/alert"));
// Only consider alarms that are above severity NORMAL
// {@see org.opennms.netmgt.model.OnmsSeverity}
criteria.addRestriction(new GtRestriction("severity", OnmsSeverity.NORMAL));
// Query list of outstanding alerts with remote platform identifiers
return m_alarmDao.findMatching(criteria);
}
Aggregations