@Transactional
  public void remove(StageEntity stageEntity) {
    entityManagerProvider.get().remove(merge(stageEntity));
  }
Finds the first stage matching any of the specified statuses for every
request. For example, to find the first {@link HostRoleStatus#IN_PROGRESS}
stage for every request, pass in
{@link HostRoleStatus#IN_PROGRESS_STATUSES}.

@param statuses
         {@link HostRoleStatus}
@return the list of the first matching stage for the given statuses for
        every request.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java