c2.select(hrc).where(predicate);
TypedQuery<HostRoleCommandEntity> q2 = em.createQuery(c2);
List<HostRoleCommandEntity> r2 = q2.getResultList();
HostRoleCommandDAO hostRoleCommandDAO = injector.getInstance(HostRoleCommandDAO.class);
if (r2 != null && !r2.isEmpty()) {
for (HostRoleCommandEntity entity : r2) {
entity.setStatus(HostRoleStatus.ABORTED);
hostRoleCommandDAO.merge(entity);
}
}
}
});