comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFactory.java @ 6945:735346b3e438

Let hibernate do the parsing/casting.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 29 Aug 2013 16:37:53 +0200
parents 602dac32a996
children e4606eae8ea5
comparison
equal deleted inserted replaced
6944:602dac32a996 6945:735346b3e438
57 Object[] row = results.get(0); 57 Object[] row = results.get(0);
58 if (row == null || row.length < 6) { 58 if (row == null || row.length < 6) {
59 return null; 59 return null;
60 } 60 }
61 return FlowVelocityMeasurementValue.getUnmapped( 61 return FlowVelocityMeasurementValue.getUnmapped(
62 Double.parseDouble(row[0].toString()), 62 (Double) row[0],
63 Double.parseDouble(row[2].toString()), 63 (Double) row[2],
64 Double.valueOf(row[3].toString()), 64 (Double) row[3],
65 Double.valueOf(row[4].toString()), (Date) row[1], row[5].toString()); 65 (Double) row[4],
66 (Date) row[1],
67 (String) row[5]);
66 } 68 }
67 return null; 69 return null;
68 } 70 }
69 } 71 }
70 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 72 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org