@RequiresSession
  public List<AlertTargetEntity> findTargetsById(List<Long> targetIds) {
    TypedQuery<AlertTargetEntity> query = entityManagerProvider.get().createNamedQuery(
        "AlertTargetEntity.findByIds", AlertTargetEntity.class);

    query.setParameter("targetIds", targetIds);

    return daoUtils.selectList(query);
  }
Gets all of the alert targets for the list of IDs given.

@param targetIds
         the IDs of the targets to retrieve.
@return the targets or an empty list (never {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDispatchDAO.java