# HG changeset patch # User Raimund Renkert # Date 1364385773 -3600 # Node ID e667c127b60085a93732e05ffa6599316a30d580 # Parent 1b676aefaf3ae1b9d2e40b7d528e68381739fcbd Removed column 'fraction' from sq relation parser and model. diff -r 1b676aefaf3a -r e667c127b600 flys-backend/src/main/java/de/intevation/flys/importer/ImportSQRelationValue.java --- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportSQRelationValue.java Wed Mar 27 13:01:53 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportSQRelationValue.java Wed Mar 27 13:02:53 2013 +0100 @@ -23,7 +23,6 @@ private SQRelationValue peer; private String parameter; - private String fraction; private Double km; private Double a; @@ -38,7 +37,6 @@ public ImportSQRelationValue( String parameter, - String fraction, Double km, Double a, Double b, @@ -50,7 +48,6 @@ Double cDuan ) { this.parameter = parameter; - this.fraction = fraction; this.km = km; this.a = a; this.b = b; @@ -91,7 +88,6 @@ "from SQRelationValue " + " where sqRelation=:owner " + " and parameter=:parameter" + - " and fraction=:fraction" + " and measurementStation=:measurementStation" + " and a=:a" + " and b=:b" + @@ -102,7 +98,6 @@ query2.setParameter("owner", owner); query2.setString("parameter", parameter); - query2.setString("fraction", fraction); query2.setParameter("measurementStation", result.get(0)); query2.setBigDecimal("a", toBigDecimal(a)); query2.setBigDecimal("b", toBigDecimal(b)); @@ -117,7 +112,6 @@ peer = new SQRelationValue( owner, parameter, - fraction, result.get(0), a, b, diff -r 1b676aefaf3a -r e667c127b600 flys-backend/src/main/java/de/intevation/flys/importer/parsers/SQRelationParser.java --- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SQRelationParser.java Wed Mar 27 13:01:53 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SQRelationParser.java Wed Mar 27 13:02:53 2013 +0100 @@ -119,14 +119,13 @@ Integer nOutlier = parseInteger(cols[11], line); Double cFer = parseDouble(cols[12], line); Double cDuan = parseDouble(cols[13], line); - if (km == null || a == null || b == null) { - log.error("Incomplete SQ-relation row (missing km, a or b): " + if (km == null || a == null || b == null || cols[1].length() == 0) { + log.error("Incomplete SQ-relation row (missing km, a, b or parameter): " + line); return; } current.addValue(new ImportSQRelationValue( cols[1], - cols[2], km, a, b, diff -r 1b676aefaf3a -r e667c127b600 flys-backend/src/main/java/de/intevation/flys/model/SQRelationValue.java --- a/flys-backend/src/main/java/de/intevation/flys/model/SQRelationValue.java Wed Mar 27 13:01:53 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/model/SQRelationValue.java Wed Mar 27 13:02:53 2013 +0100 @@ -22,7 +22,6 @@ private SQRelation sqRelation; private String parameter; - private String fraction; private MeasurementStation measurementStation; @@ -43,7 +42,6 @@ public SQRelationValue( SQRelation sqRelation, String parameter, - String fraction, MeasurementStation measurementStation, Double a, Double b, @@ -56,7 +54,6 @@ ) { this.sqRelation = sqRelation; this.parameter = parameter; - this.fraction = fraction; this.measurementStation = measurementStation; this.a = a; this.b = b; @@ -107,17 +104,6 @@ this.parameter = parameter; } - - @Column(name = "fraction") - public String getFraction() { - return fraction; - } - - public void setFraction(String fraction) { - this.fraction = fraction; - } - - @OneToOne @JoinColumn(name = "measurement_station_id") public MeasurementStation getMeasurementStation() {