protected static ListMultimap<UserIndicateurs, Integer> getAllStats(TopiaContext context, List<Camion> camions) throws TopiaException { log.info("getAllStats"); ListMultimap<UserIndicateurs, Integer> result = ArrayListMultimap.create(); int allCount = camions.size(); int cnt = 0; for (Camion camion : camions) { cnt++; log.info("Getting all stats for " + camion.getUserIndicateurs().getTaasUser().getLogin() + " : " + cnt + "/" + allCount); UserIndicateursStats stats = new UserIndicateursStats(camion); List<Integer> value = stats.aquireDatas(context); if (value != null) { result.putAll(camion.getUserIndicateurs(), value); } } log.info("End of getAllStats"); return result; }
protected static ListMultimap<UserIndicateurs, Integer> getAllStats(TopiaContext context, List<Camion> camions) throws TopiaException { log.info("getAllStats"); ListMultimap<UserIndicateurs, Integer> result = ArrayListMultimap.create(); int allCount = camions.size(); int cnt = 0; for (Camion camion : camions) { cnt++; log.info("Getting all stats for " + camion.getUserIndicateurs().getTaasUser().getLogin() + " : " + cnt + "/" + allCount); UserIndicateursStats stats = new UserIndicateursStats(camion); List<Integer> value = stats.aquireDatas(context); if (value != null) { result.putAll(camion.getUserIndicateurs(), value); } } log.info("End of getAllStats"); return result; }
protected Integer executeQuery(TopiaContext transaction, Indicator indicator) throws TopiaException { Date dateLessOneMonth = DateUtils.addMonths(new Date(), -1); List<?> found = transaction.findAll(indicator.getRequest(), "camion", camion, "dateLessMonth", dateLessOneMonth); int result = found.size(); if (log.isDebugEnabled()) { log.debug(indicator.getRequest() + "\n" + "indicator : " + indicator + " camion " + camion + " dateLessMonth " + dateLessOneMonth); log.debug(camion.getUserIndicateurs().getTaasUser().getLogin() + " " + indicator + " : " + result); } return result; } }
protected Integer executeQuery(TopiaContext transaction, Indicator indicator) throws TopiaException { Date dateLessOneMonth = DateUtils.addMonths(new Date(), -1); List<?> found = transaction.findAll(indicator.getRequest(), "camion", camion, "dateLessMonth", dateLessOneMonth); int result = found.size(); if (log.isDebugEnabled()) { log.debug(indicator.getRequest() + "\n" + "indicator : " + indicator + " camion " + camion + " dateLessMonth " + dateLessOneMonth); log.debug(camion.getUserIndicateurs().getTaasUser().getLogin() + " " + indicator + " : " + result); } return result; } }
@Override public void delete(E entity) throws TopiaException { { List<Camion> list = getContext() .getDAO(Camion.class) .findAllByProperties(Camion.PROPERTY_USER_INDICATEURS, entity); for (Camion item : list) { // sletellier : Set null only if target is concerned by deletion if (entity.equals(item.getUserIndicateurs())) { item.setUserIndicateurs(null); } } } super.delete(entity); }
List<Camion> camions = camionDAO.findAll(); for (Camion camion : camions) { UserIndicateurs userIndicateurs = camion.getUserIndicateurs();
List<Camion> camions = camionDAO.findAll(); for (Camion camion : camions) { UserIndicateurs userIndicateurs = camion.getUserIndicateurs();