class AlertDispatchDAO {

  @RequiresSession
  public List<AlertGroupEntity> findGroupsByDefinition(
      AlertDefinitionEntity definitionEntity) {

    TypedQuery<AlertGroupEntity> query = entityManagerProvider.get().createNamedQuery(
        "AlertGroupEntity.findByAssociatedDefinition", AlertGroupEntity.class);

    query.setParameter("alertDefinition", definitionEntity);
    query.setHint(QueryHints.REFRESH, HintValues.TRUE);

    return daoUtils.selectList(query);
  }

}