Transporteur transporteur2; TransporteurDAO dao = SandraDAOHelper.getTransporteurDAO(transaction); String code = transporteur.getCode(); String topiaId = transporteur.getTopiaId(); Societe societe = getSociete(transaction, transporteur.getSociete().getTopiaId()); transporteur.setSociete(societe); if (topiaId == null || "".equals(topiaId)) { transporteur2 = dao.createByNaturalId(code, transporteur.getSociete()); if (log.isDebugEnabled()) { log.debug("has created transporteur " + transporteur2.getTopiaId()); if (!transporteur2.getCode().equals(code) && dao.findByCode(code) != null) { throw new LogicException("error.service.transporteur.already.exists"); log.debug("update transporteur " + transporteur2.getTopiaId()); transporteur2.setName(transporteur.getName());
Transporteur transporteur2; TransporteurDAO dao = SandraDAOHelper.getTransporteurDAO(transaction); String code = transporteur.getCode(); String topiaId = transporteur.getTopiaId(); if (topiaId == null || "".equals(topiaId)) { log.debug("has created transporteur " + transporteur2.getTopiaId()); if (!transporteur2.getCode().equals(code) && dao.findByCode(code) != null) { throw new LogicException("error.service.transporteur.already.exists"); log.debug("update transporteur " + transporteur2.getTopiaId()); transporteur2.setName(transporteur.getName());
public void inject(ManagerInjector manager, IbuTransporteur ibuTransporteur) throws TopiaException { TransporteurDAO transporteurDAO = SandraDAOHelper.getTransporteurDAO(manager.getTransaction()); // Recherche transporteur = transporteurDAO.findByNaturalId(ibuTransporteur.getCode()); // dont create transporteur any more : #352 // Création // if (transporteur == null) { // transporteur = transporteurDAO.createByNaturalId(ibuTransporteur.getCode(), manager.getSociete()); // } if (transporteur != null) { // Mise à jour transporteur.setName(ibuTransporteur.getName()); } }
if (entity.equals(item.getSociete())) { item.setSociete(null);
camion.setSociete(societe); Transporteur transporteur = getTransporteur(transaction, camion.getTransporteur().getTopiaId()); camion.setTransporteur(transporteur); if (StringUtils.isEmpty(topiaId)) {
public void inject(ManagerInjector manager, IbuTransporteur ibuTransporteur) throws TopiaException { TransporteurDAO transporteurDAO = SandraDAOHelper.getTransporteurDAO(manager.getTransaction()); // Recherche transporteur = transporteurDAO.findByNaturalId(ibuTransporteur.getCode(), manager.getSociete()); // dont create transporteur any more : #352 // Création // if (transporteur == null) { // transporteur = transporteurDAO.createByNaturalId(ibuTransporteur.getCode(), manager.getSociete()); // } if (transporteur != null) { // Mise à jour transporteur.setName(ibuTransporteur.getName()); } }
camion.setSociete(societe); Transporteur transporteur = getTransporteur(transaction, camion.getTransporteur().getTopiaId()); camion.setTransporteur(transporteur); if (StringUtils.isEmpty(topiaId)) {