public Float getSumOfHoursByCommandes(CommandesEntity commandesEntity) { Float res = 0.f; for (HistoriqueHeuresEntity historiqueHeuresEntity : commandesEntity.getHistoriqueHeuresesByCommandId()) { res += historiqueHeuresEntity.getHistoriqueHeures(); } return res; }
public CommandesEntity removeHistoriqueHeuresToCommandes( HistoriqueHeuresEntity historiqueHeuresEntity, CommandesEntity commandesEntity) { commandesEntity.getHistoriqueHeuresesByCommandId().remove(historiqueHeuresEntity); dao.makePersistent(commandesEntity); return commandesEntity; }