Guest User

Untitled

a guest
Dec 15th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.35 KB | None | 0 0
  1. @Override
  2.     public void execute(GDSModel model) throws GDSCommandExecutionException {
  3.         se.apendo.hls.dto.gds.ObjectFactory objFac = new se.apendo.hls.dto.gds.ObjectFactory();
  4.         if (getInnehavsanteckning() == null) {
  5.             throw new GDSCommandExecutionException("Command CreateInteckning not configured correctly.");
  6.         }
  7.         setup();
  8.  
  9.         ForandringType f = new ForandringType();
  10.  
  11.         GDSInnehavsanteckning inneInteck = model.getInnehavsinteckningByUuid(this.innehavsanteckningUuid);
  12.         model.getInnehavsanteckningar().remove(inneInteck);
  13.  
  14.         InnehavsanteckningType innehavToDelete = inneInteck.getGdsInnehavsanteckning();
  15.         getBerorList().add(innehavToDelete.getAktnummer());
  16.  
  17.         InskrivningsatgardType atgard = GDSUtils.getNewInskrivningsatgardType(model, InskrivningsatgardstypType.INTECKNING);
  18.  
  19.         f.setId("ID_" + UUID.randomUUID().toString());
  20.         f.setVerksamhetsatgard(objFac.createInskrivningsatgard(atgard));
  21.  
  22.         UtbytesobjektPropertyType upRad = new UtbytesobjektPropertyType();
  23.         f.setRaderat(upRad);
  24.  
  25.         atgard.getUtbytesobjektsreferens().add(GDSUtils.getNewUtbytesobjektReferens(innehavToDelete));
  26.         upRad.getUtbytesobjekt().add(objFac.createInnehavsanteckning(GDSUtils.cloneUtbytesobjekt((innehavToDelete))));
  27.  
  28.         getFastighetList().addAll(model.getFastighetByInteckningUuid(inteckning.getGdsInteckning().getObjektidentitet()));
  29.  
  30.         getForandringar().add(f);
  31.  
  32.     }
Add Comment
Please, Sign In to add comment