Package org.opennms.netmgt.dao.api
Interface AcknowledgmentDao
-
- All Superinterfaces:
OnmsDao<OnmsAcknowledgment,java.lang.Integer>
- All Known Implementing Classes:
AcknowledgmentDaoHibernate
,MockAcknowledgmentDao
public interface AcknowledgmentDao extends OnmsDao<OnmsAcknowledgment,java.lang.Integer>
Contract for persisting Acknowledgments- Version:
- $Id: $
- Author:
-
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Acknowledgeable>
findAcknowledgables(OnmsAcknowledgment ack)
findAcknowledgablesjava.util.Optional<OnmsAcknowledgment>
findLatestAckForRefId(java.lang.Integer refId)
findLatestAckForRefIdjava.util.List<OnmsAcknowledgment>
findLatestAcks(java.util.Date from)
findLatestAcksvoid
processAck(OnmsAcknowledgment ack)
processAckvoid
processAcks(java.util.Collection<OnmsAcknowledgment> acks)
processAcksvoid
updateAckable(Acknowledgeable ackable)
updateAckable-
Methods inherited from interface org.opennms.netmgt.dao.api.OnmsDao
clear, countAll, countMatching, delete, delete, findAll, findMatching, flush, get, initialize, load, lock, save, saveOrUpdate, update
-
-
-
-
-
Method Detail
-
findAcknowledgables
java.util.List<Acknowledgeable> findAcknowledgables(OnmsAcknowledgment ack)
findAcknowledgables
- Parameters:
ack
- aOnmsAcknowledgment
object.- Returns:
- a
List
object.
-
updateAckable
void updateAckable(Acknowledgeable ackable)
updateAckable
- Parameters:
ackable
- aAcknowledgeable
object.
-
processAck
void processAck(OnmsAcknowledgment ack)
processAck
- Parameters:
ack
- aOnmsAcknowledgment
object.
-
processAcks
void processAcks(java.util.Collection<OnmsAcknowledgment> acks)
processAcks
- Parameters:
acks
- aCollection
object.
-
findLatestAcks
java.util.List<OnmsAcknowledgment> findLatestAcks(java.util.Date from)
findLatestAcks
Finds the latest acknowledgement for each refId. The latest acknowledgement is selected based on the most recent ackTime (and highest Id in the case of multiple occuring at the same time).- Parameters:
from
- limit results to acks created on or after- Returns:
- the list of latest acks (empty list in the case of no acks found)
-
findLatestAckForRefId
java.util.Optional<OnmsAcknowledgment> findLatestAckForRefId(java.lang.Integer refId)
findLatestAckForRefId
Finds the latest acknowledgement for the given refId. The latest acknowledgement is selected based on the most recent ackTime (and highest Id in the case of multiple occurring at the same time).- Parameters:
refId
- the refId to search for- Returns:
- an optional containing the latest ack for the given refId or Optional.empty() if none found
-
-