Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportWstColumn.java @ 202:29a408f80a89
Finished import of WSTs.
flys-backend/trunk@1553 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 23 Mar 2011 16:33:36 +0000 |
parents | 3169b559ca3c |
children | 3570e4af8cb2 |
comparison
equal
deleted
inserted
replaced
201:3169b559ca3c | 202:29a408f80a89 |
---|---|
8 import org.hibernate.Query; | 8 import org.hibernate.Query; |
9 | 9 |
10 import java.util.List; | 10 import java.util.List; |
11 import java.util.ArrayList; | 11 import java.util.ArrayList; |
12 | 12 |
13 import java.math.BigDecimal; | |
14 | |
13 public class ImportWstColumn | 15 public class ImportWstColumn |
14 { | 16 { |
15 protected ImportWst wst; | 17 protected ImportWst wst; |
16 protected String name; | 18 protected String name; |
17 protected String description; | 19 protected String description; |
18 | 20 |
19 protected List<ImportWstColumnQRange> columnQRanges; | 21 protected List<ImportWstColumnQRange> columnQRanges; |
22 protected List<ImportWstColumnValue> columnValues; | |
20 | 23 |
21 protected WstColumn peer; | 24 protected WstColumn peer; |
22 | 25 |
23 public ImportWstColumn() { | 26 public ImportWstColumn() { |
24 columnQRanges = new ArrayList<ImportWstColumnQRange>(); | 27 columnQRanges = new ArrayList<ImportWstColumnQRange>(); |
28 columnValues = new ArrayList<ImportWstColumnValue>(); | |
25 } | 29 } |
26 | 30 |
27 public ImportWstColumn( | 31 public ImportWstColumn( |
28 ImportWst wst, | 32 ImportWst wst, |
29 String name, | 33 String name, |
57 | 61 |
58 public void setDescription(String description) { | 62 public void setDescription(String description) { |
59 this.description = description; | 63 this.description = description; |
60 } | 64 } |
61 | 65 |
66 public void addColumnValue(BigDecimal position, BigDecimal w) { | |
67 columnValues.add( | |
68 new ImportWstColumnValue(this, position, w)); | |
69 } | |
70 | |
62 public void addColumnQRange(ImportWstQRange columnQRange) { | 71 public void addColumnQRange(ImportWstQRange columnQRange) { |
63 columnQRanges.add( | 72 columnQRanges.add( |
64 new ImportWstColumnQRange(this, columnQRange)); | 73 new ImportWstColumnQRange(this, columnQRange)); |
65 } | 74 } |
66 | 75 |
67 public void storeDependencies(River river) { | 76 public void storeDependencies(River river) { |
68 WstColumn column = getPeer(river); | 77 WstColumn column = getPeer(river); |
69 for (ImportWstColumnQRange columnQRange: columnQRanges) { | 78 for (ImportWstColumnQRange columnQRange: columnQRanges) { |
70 columnQRange.getPeer(river); | 79 columnQRange.getPeer(river); |
71 } | 80 } |
72 // TODO: Implement me! | 81 for (ImportWstColumnValue columnValue: columnValues) { |
82 columnValue.getPeer(river); | |
83 } | |
73 } | 84 } |
74 | 85 |
75 public WstColumn getPeer(River river) { | 86 public WstColumn getPeer(River river) { |
76 if (peer == null) { | 87 if (peer == null) { |
77 Wst w = wst.getPeer(river); | 88 Wst w = wst.getPeer(river); |