Package org.opennms.netmgt.dao.api
Interface AcknowledgmentDao
-
- All Superinterfaces:
OnmsDao<OnmsAcknowledgment,Integer>
- All Known Implementing Classes:
AcknowledgmentDaoHibernate
,MockAcknowledgmentDao
public interface AcknowledgmentDao extends OnmsDao<OnmsAcknowledgment,Integer>
Contract for persisting Acknowledgments- Version:
- $Id: $
- Author:
-
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Acknowledgeable>
findAcknowledgables(OnmsAcknowledgment ack)
findAcknowledgablesOptional<OnmsAcknowledgment>
findLatestAckForRefId(Integer refId)
findLatestAckForRefIdList<OnmsAcknowledgment>
findLatestAcks(Date from)
findLatestAcksvoid
processAck(OnmsAcknowledgment ack)
processAckvoid
processAcks(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
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(Collection<OnmsAcknowledgment> acks)
processAcks
- Parameters:
acks
- aCollection
object.
-
findLatestAcks
List<OnmsAcknowledgment> findLatestAcks(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
Optional<OnmsAcknowledgment> findLatestAckForRefId(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
-
-