comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportFlowVelocityModelValue.java @ 2828:ac13e466a55e

Added a parser for flow velocity model data and adjusted the db relation schema (missing q column). flys-backend/trunk@4245 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 17 Apr 2012 09:37:52 +0000
parents 85b25e74594f
children ac5bd90697c1
comparison
equal deleted inserted replaced
2827:85b25e74594f 2828:ac13e466a55e
13 13
14 14
15 public class ImportFlowVelocityModelValue { 15 public class ImportFlowVelocityModelValue {
16 16
17 private BigDecimal station; 17 private BigDecimal station;
18 private BigDecimal q;
18 private BigDecimal totalChannel; 19 private BigDecimal totalChannel;
19 private BigDecimal mainChannel; 20 private BigDecimal mainChannel;
20 private BigDecimal shearStress; 21 private BigDecimal shearStress;
21 22
22 private FlowVelocityModelValue peer; 23 private FlowVelocityModelValue peer;
23 24
24 25
25 public ImportFlowVelocityModelValue( 26 public ImportFlowVelocityModelValue(
26 BigDecimal station, 27 BigDecimal station,
28 BigDecimal q,
27 BigDecimal totalChannel, 29 BigDecimal totalChannel,
28 BigDecimal mainChannel, 30 BigDecimal mainChannel,
29 BigDecimal shearStress 31 BigDecimal shearStress
30 ) { 32 ) {
31 this.station = station; 33 this.station = station;
34 this.q = q;
32 this.totalChannel = totalChannel; 35 this.totalChannel = totalChannel;
33 this.mainChannel = mainChannel; 36 this.mainChannel = mainChannel;
34 this.shearStress = shearStress; 37 this.shearStress = shearStress;
35 } 38 }
36 39
57 60
58 List<FlowVelocityModelValue> values = query.list(); 61 List<FlowVelocityModelValue> values = query.list();
59 62
60 if (values.isEmpty()) { 63 if (values.isEmpty()) {
61 peer = new FlowVelocityModelValue( 64 peer = new FlowVelocityModelValue(
62 model, station, totalChannel, mainChannel, shearStress); 65 model, station, q, totalChannel, mainChannel, shearStress);
63 66
64 session.save(peer); 67 session.save(peer);
65 } 68 }
66 else { 69 else {
67 peer = values.get(0); 70 peer = values.get(0);

http://dive4elements.wald.intevation.org