# HG changeset patch # User Sascha L. Teichmann # Date 1342189516 0 # Node ID 5ccd51ca11ce511185e1bc13d3b02d5c14316b86 # Parent 81a98f360553205197e90f8dee2111a8c731ac52 SQ relation: Fixed problem with string operation precedence. flys-artifacts/trunk@4997 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 81a98f360553 -r 5ccd51ca11ce flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Fri Jul 13 13:43:26 2012 +0000 +++ b/flys-artifacts/ChangeLog Fri Jul 13 14:25:16 2012 +0000 @@ -1,9 +1,17 @@ +<<<<<<< .mine +2012-07-13 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java: + Fixed problem with string operation precedence. + +======= 2012-07-13 Felix Wolfsteller * doc/conf/meta-data.xml: very basic official lines matching the current artifact (for this it is wrongly placed in previous calc.-part, for now. +>>>>>>> .r4996 2012-07-13 Christian Lins * src/main/java/de/intevation/flys/utils/MapfileGenerator.java: diff -r 81a98f360553 -r 5ccd51ca11ce flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java Fri Jul 13 13:43:26 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java Fri Jul 13 14:25:16 2012 +0000 @@ -40,7 +40,7 @@ }; public static final String SQL_MEASSURE = - "SELECT " + + ("SELECT " + "m.TSAND AS TSAND," + "m.TSCHWEB AS TSCHWEB," + "m.CSCHWEB AS CSCHWEB," + @@ -56,7 +56,7 @@ "g.name = :river_name AND " + "s.km BETWEEN :location - 0.001 AND :location + 0.001 AND " + "m.datum BETWEEN :from AND :to AND " + - "m.Q IS NOT NULL" + "m.Q IS NOT NULL") .replace("%GSIEBSATZ%", projection("gs", GSIEBSATZ)) .replace("%SSIEBUNG%", projection("ss", SSIEBUNG)); @@ -106,6 +106,12 @@ double location, DateRange dateRange ) { + boolean debug = log.isDebugEnabled(); + + if (debug) { + log.debug(SQL_MEASSURE); + } + SQLQuery query = session.createSQLQuery(SQL_MEASSURE) .addScalar("TSAND", StandardBasicTypes.DOUBLE) .addScalar("TSCHWEB", StandardBasicTypes.DOUBLE)