public Float getSumOfCostByCommandes(CommandesEntity commandesEntity) {
   Float res = 0.f;
   for (HistoriqueSommeEntity historiqueSommeEntity :
       commandesEntity.getHistoriqueSommesByCommandId()) {
     res += historiqueSommeEntity.getHistoriqueSomme();
   }
   return res;
 }
 public CommandesEntity removeHistoriqueSommeToCommandes(
     HistoriqueSommeEntity historiqueSommeEntity, CommandesEntity commandesEntity) {
   commandesEntity.getHistoriqueSommesByCommandId().remove(historiqueSommeEntity);
   dao.makePersistent(commandesEntity);
   return commandesEntity;
 }