public void updateRetourUsine(TopiaContext transaction, Date dateLivraison, String codeCamion, String codeSociete, int numero, Date retourUsineDate) throws TopiaException { SocieteDAO societeDAO = SandraDAOHelper.getSocieteDAO(transaction); Societe societe = societeDAO.findByCode(codeSociete); if (societe != null) { CamionDAO dao = SandraDAOHelper.getCamionDAO(transaction); Camion camion = dao.findByNaturalId(codeCamion, societe); if (camion != null) { TourDAO tourDAO = SandraDAOHelper.getTourDAO(transaction); Tour tour = tourDAO.findByNaturalId(dateLivraison, numero, camion); if (tour != null) { tour.setNotificationRetourUsine(retourUsineDate); tourDAO.update(tour); } else if (log.isWarnEnabled()) { log.warn("[updateRetourUsine] Tour not found"); } } else if (log.isWarnEnabled()) { log.warn("[updateRetourUsine] Camion not found"); } } else if (log.isWarnEnabled()) { log.warn("[updateRetourUsine] Societe not found"); } }
public Tour getTourWhithId(TopiaContext transaction, String topiaId) throws TopiaException { if (log.isDebugEnabled()) { log.debug("[" + getUserLogin() + "]" + " getTourWhithId topiaId[" + topiaId + "]"); } TourDAO tourDAO = SandraDAOHelper.getTourDAO(transaction); Tour tour = tourDAO.findByTopiaId(topiaId); return tour; }
@Override public <U extends TopiaEntity> List<U> findUsages(Class<U> type, E entity) throws TopiaException { List<?> result = new ArrayList(); List tmp; if (type == Tour.class) { TourDAO dao = (TourDAO) getContext().getDAO(Tour.class); tmp = dao.findAllByCamion(entity); result.addAll(tmp); } if (type == Chauffeur.class) { ChauffeurDAO dao = (ChauffeurDAO) getContext().getDAO(Chauffeur.class); tmp = dao.findAllContainsCamions(entity); result.addAll(tmp); } if (type == Camion.class) { CamionDAO dao = (CamionDAO) getContext().getDAO(Camion.class); tmp = dao.findAllContainsCamionsAssocies(entity); result.addAll(tmp); } return (List<U>) result; }
tour = tourDAO.findByNaturalId(ibu.getTourDateLivraison(), ibu.getTourNumero(), camion); tour = tourDAO.createByNaturalId(ibu.getTourDateLivraison(), ibu.getTourNumero(), camion);
cachedTopiaid.add(id2); Tour tourToDelete = tourDAO.findByTopiaId(String.valueOf(id2)); tourDAO.delete(tourToDelete);
Tour tour = tourDAO.findByTopiaId(topiaIdTourCurrent); if (log.isDebugEnabled()) { log.debug("Tour is: " + tour); tourDAO.update(tour);
Tour tour = tourDAO.findBySuiviTour(suiviTour);
@Override public <U extends TopiaEntity> List<U> findUsages(Class<U> type, E entity) throws TopiaException { List<?> result = new ArrayList(); List tmp; if (type == Tour.class) { TourDAO dao = (TourDAO) getContext().getDAO(Tour.class); tmp = dao.findAllBySuiviTour(entity); result.addAll(tmp); } return (List<U>) result; }
@Override public <U extends TopiaEntity> List<U> findUsages(Class<U> type, E entity) throws TopiaException { List<?> result = new ArrayList(); List tmp; if (type == Tour.class) { TourDAO dao = (TourDAO) getContext().getDAO(Tour.class); tmp = dao.findAllByDefautChauffeur(entity); result.addAll(tmp); } if (type == SuiviTour.class) { SuiviTourDAO dao = (SuiviTourDAO) getContext().getDAO(SuiviTour.class); tmp = dao.findAllByReel(entity); result.addAll(tmp); } if (type == Camion.class) { CamionDAO dao = (CamionDAO) getContext().getDAO(Camion.class); tmp = dao.findAllContainsDefautChauffeurs(entity); result.addAll(tmp); } return (List<U>) result; }
tour = tourDAO.findByNaturalId(ibu.getTourDateLivraison(), ibu.getTourNumero(), camion); tour = tourDAO.createByNaturalId(ibu.getTourDateLivraison(), ibu.getTourNumero(), camion);
cachedTopiaid.add(id2); Tour tourToDelete = tourDAO.findByTopiaId(String.valueOf(id2)); tourDAO.delete(tourToDelete);
Tour tour = tourDAO.findByTopiaId(topiaIdTourCurrent); if (log.isDebugEnabled()) { log.debug("Tour is: " + tour); tourDAO.update(tour);
Tour tour = tourDAO.findBySuiviTour(suiviTour);
public Tour getTourWhithId(TopiaContext transaction, String topiaId) throws TopiaException { if (log.isDebugEnabled()) { log.debug("[" + getUserLogin() + "]" + " getTourWhithId topiaId[" + topiaId + "]"); } TourDAO tourDAO = SandraDAOHelper.getTourDAO(transaction); Tour tour = tourDAO.findByTopiaId(topiaId); return tour; }
Tour tour = tourDAO.findByTopiaId(tourTopiaId);
Tour tour = tourDAO.findByTopiaId(tourTopiaId);
Tour tour = tourDAO.findByTopiaId(topiaIdTourCurrent); if (tour == null){ log.info("No tour find with topiaId : " + topiaIdTourCurrent);
Tour tour = tourDAO.findByTopiaId(topiaIdTourCurrent); if (tour == null){ log.info("No tour find with topiaId : " + topiaIdTourCurrent);
Tour tour = tourDAO.findByTopiaId(topiaIdTourCurrent); SuiviTour suiviTour = tour.getSuiviTour();
Tour tour = tourDAO.findByTopiaId(topiaIdTourCurrent); SuiviTour suiviTour = tour.getSuiviTour();