public Collection<LocationMonitorIpInterface> findStatusChangesForNodeForUniqueMonitorAndInterface(int nodeId) {
List l = getHibernateTemplate().find(
"select distinct status.locationMonitor, status.monitoredService.ipInterface from OnmsLocationSpecificStatus as status " +
"where status.monitoredService.ipInterface.node.id = ?",
nodeId
);
HashSet<LocationMonitorIpInterface> ret = new HashSet<LocationMonitorIpInterface>();
for (Object o : l) {
OnmsLocationMonitor mon = (OnmsLocationMonitor) ((Object[]) o)[0];
OnmsIpInterface ip = (OnmsIpInterface) ((Object[]) o)[1];
ret.add(new LocationMonitorIpInterface(mon, ip));
}
return ret;
}