Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportCrossSection.java @ 1205:5f1506fc7636
Made import of cross sections work.
flys-backend/trunk@2313 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 08 Jul 2011 09:45:48 +0000 |
parents | 22858e7cca79 |
children | 3199dbc20e22 |
comparison
equal
deleted
inserted
replaced
1204:22858e7cca79 | 1205:5f1506fc7636 |
---|---|
7 import org.hibernate.Session; | 7 import org.hibernate.Session; |
8 import org.hibernate.Query; | 8 import org.hibernate.Query; |
9 | 9 |
10 import java.util.List; | 10 import java.util.List; |
11 | 11 |
12 import org.apache.log4j.Logger; | |
13 | |
12 public class ImportCrossSection | 14 public class ImportCrossSection |
13 { | 15 { |
16 private static Logger log = Logger.getLogger(ImportRiver.class); | |
17 | |
14 protected ImportRiver river; | 18 protected ImportRiver river; |
15 protected String description; | 19 protected String description; |
16 protected ImportTimeInterval timeInterval; | 20 protected ImportTimeInterval timeInterval; |
17 protected List<ImportCrossSectionLine> lines; | 21 protected List<ImportCrossSectionLine> lines; |
18 | 22 |
64 this.timeInterval = timeInterval; | 68 this.timeInterval = timeInterval; |
65 } | 69 } |
66 | 70 |
67 public void storeDependencies() { | 71 public void storeDependencies() { |
68 | 72 |
73 log.info("store cross section '" + description + "'"); | |
74 | |
69 getPeer(); | 75 getPeer(); |
76 | |
77 int i = 1, N = lines.size(); | |
70 | 78 |
71 for (ImportCrossSectionLine line: lines) { | 79 for (ImportCrossSectionLine line: lines) { |
72 line.storeDependencies(); | 80 line.storeDependencies(); |
81 log.info(" stored " + i + " lines. remaining: " + (N-i)); | |
82 ++i; | |
73 } | 83 } |
74 } | 84 } |
75 | 85 |
76 public CrossSection getPeer() { | 86 public CrossSection getPeer() { |
77 | 87 |