comparison src/main/java/de/intevation/lada/importer/laf/OrtCreator.java @ 1028:1c41c7b8f7c2 schema-update

Updated server application to new database model. THIS IS STILL WIP!!!
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 08 Jul 2016 15:32:36 +0200
parents 092e673cbb8d
children 6f9983f68248
comparison
equal deleted inserted replaced
1027:9971471d562c 1028:1c41c7b8f7c2
14 import javax.inject.Inject; 14 import javax.inject.Inject;
15 15
16 import org.apache.log4j.Logger; 16 import org.apache.log4j.Logger;
17 17
18 import de.intevation.lada.importer.ReportItem; 18 import de.intevation.lada.importer.ReportItem;
19 import de.intevation.lada.model.land.LOrtszuordnung; 19 import de.intevation.lada.model.land.Ortszuordnung;
20 import de.intevation.lada.model.stamm.Ort; 20 import de.intevation.lada.model.stammdaten.Ort;
21 import de.intevation.lada.model.stamm.Staat; 21 import de.intevation.lada.model.stammdaten.Staat;
22 import de.intevation.lada.model.stamm.Verwaltungseinheit; 22 import de.intevation.lada.model.stammdaten.Verwaltungseinheit;
23 import de.intevation.lada.util.annotation.RepositoryConfig; 23 import de.intevation.lada.util.annotation.RepositoryConfig;
24 import de.intevation.lada.util.data.QueryBuilder; 24 import de.intevation.lada.util.data.QueryBuilder;
25 import de.intevation.lada.util.data.Repository; 25 import de.intevation.lada.util.data.Repository;
26 import de.intevation.lada.util.data.RepositoryType; 26 import de.intevation.lada.util.data.RepositoryType;
27 27
683 else { 683 else {
684 y = tmp; 684 y = tmp;
685 } 685 }
686 ort.setKoordXExtern(x); 686 ort.setKoordXExtern(x);
687 ort.setKoordYExtern(y); 687 ort.setKoordYExtern(y);
688 ort.setKdaId(Integer.valueOf(art)); 688 ort.setKoordinatenArtId(Integer.valueOf(art));
689 return ort; 689 return ort;
690 } 690 }
691 691
692 /** 692 /**
693 * Parse the coordinates and the the attributes to the new ort object. 693 * Parse the coordinates and the the attributes to the new ort object.
728 } 728 }
729 ort.setKoordXExtern(x); 729 ort.setKoordXExtern(x);
730 ort.setLongitude(Double.valueOf(x)); 730 ort.setLongitude(Double.valueOf(x));
731 ort.setKoordYExtern(y); 731 ort.setKoordYExtern(y);
732 ort.setLatitude(Double.valueOf(y)); 732 ort.setLatitude(Double.valueOf(y));
733 ort.setKdaId(Integer.valueOf(art)); 733 ort.setKoordinatenArtId(Integer.valueOf(art));
734 return ort; 734 return ort;
735 } 735 }
736 736
737 /** 737 /**
738 * Create the new LOrt object from the given attributes. 738 * Create the new LOrt object from the given attributes.
739 * 739 *
740 * @return The new LOrt object. 740 * @return The new LOrt object.
741 */ 741 */
742 public LOrtszuordnung toLOrt() { 742 public Ortszuordnung toOrtszuordnung() {
743 if (this.ortId == null && 743 if (this.ortId == null &&
744 (this.ortCode == null || this.ortCode.length() == 0) 744 (this.ortCode == null || this.ortCode.length() == 0)
745 ) { 745 ) {
746 return null; 746 return null;
747 } 747 }
758 "stamm").getData(); 758 "stamm").getData();
759 if (orte != null && !orte.isEmpty()) { 759 if (orte != null && !orte.isEmpty()) {
760 this.ortId = orte.get(0).getId(); 760 this.ortId = orte.get(0).getId();
761 } 761 }
762 } 762 }
763 LOrtszuordnung ort = new LOrtszuordnung(); 763 Ortszuordnung ort = new Ortszuordnung();
764 ort.setOrtId(Long.valueOf(this.ortId)); 764 ort.setOrtId(Long.valueOf(this.ortId));
765 ort.setProbeId(this.probeId); 765 ort.setProbeId(this.probeId);
766 ort.setOrtszuordnungTyp(this.ortTyp); 766 ort.setOrtszuordnungTyp(this.ortTyp);
767 ort.setOrtszusatztext(this.zusatztext); 767 ort.setOrtszusatztext(this.zusatztext);
768 return ort; 768 return ort;
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)