@RequiresSession
  public List<AlertGroupEntity> findGroupsById(List<Long> groupIds) {
    TypedQuery<AlertGroupEntity> query = entityManagerProvider.get().createNamedQuery(
        "AlertGroupEntity.findByIds", AlertGroupEntity.class);

    query.setParameter("groupIds", groupIds);

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

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