Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportMorphWidth.java @ 2821:0a536eb5d668
Added parser for parsing morphological widths.
flys-backend/trunk@4238 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 13 Apr 2012 13:22:54 +0000 |
parents | 0c2567626754 |
children | a5b003595d6c |
comparison
equal
deleted
inserted
replaced
2820:7dffd28271d0 | 2821:0a536eb5d668 |
---|---|
1 package de.intevation.flys.importer; | 1 package de.intevation.flys.importer; |
2 | |
3 import java.sql.SQLException; | |
2 | 4 |
3 import java.util.ArrayList; | 5 import java.util.ArrayList; |
4 import java.util.List; | 6 import java.util.List; |
5 | 7 |
6 import org.apache.log4j.Logger; | 8 import org.apache.log4j.Logger; |
7 | 9 |
8 import org.hibernate.Session; | 10 import org.hibernate.Session; |
9 import org.hibernate.Query; | 11 import org.hibernate.Query; |
12 import org.hibernate.exception.ConstraintViolationException; | |
10 | 13 |
11 import de.intevation.flys.model.MorphologicalWidth; | 14 import de.intevation.flys.model.MorphologicalWidth; |
12 import de.intevation.flys.model.River; | 15 import de.intevation.flys.model.River; |
13 | 16 |
14 | 17 |
22 protected ImportUnit unit; | 25 protected ImportUnit unit; |
23 | 26 |
24 protected List<ImportMorphWidthValue> values; | 27 protected List<ImportMorphWidthValue> values; |
25 | 28 |
26 | 29 |
27 public ImportMorphWidth(ImportUnit unit) { | 30 public ImportMorphWidth() { |
28 this.unit = unit; | |
29 this.values = new ArrayList<ImportMorphWidthValue>(); | 31 this.values = new ArrayList<ImportMorphWidthValue>(); |
30 } | 32 } |
31 | 33 |
32 | 34 |
33 public void addValue(ImportMorphWidthValue value) { | 35 public void addValue(ImportMorphWidthValue value) { |
34 this.values.add(value); | 36 this.values.add(value); |
35 } | 37 } |
36 | 38 |
37 | 39 |
38 public void storeDependencies(River river) { | 40 public void setUnit(ImportUnit unit) { |
41 this.unit = unit; | |
42 } | |
43 | |
44 | |
45 public void storeDependencies(River river) | |
46 throws SQLException, ConstraintViolationException | |
47 { | |
39 log.info("store dependencies"); | 48 log.info("store dependencies"); |
40 | 49 |
41 MorphologicalWidth peer = getPeer(river); | 50 MorphologicalWidth peer = getPeer(river); |
42 | 51 |
43 log.info("store morphological width values"); | 52 log.info("store morphological width values"); |