changeset 6477:d1502b8dd091

'start' is a reserved word in Oracle
author Tom Gottfried <tom@intevation.de>
date Thu, 27 Jun 2013 16:24:55 +0200
parents d30ae7275e5a
children 6e54f72b4caf
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java	Thu Jun 27 14:51:04 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java	Thu Jun 27 16:24:55 2013 +0200
@@ -55,7 +55,7 @@
     public static final String SQL_SELECT_EPOCHS =
         "SELECT DISTINCT " +
         "       sy.description AS description, " +
-        "       ti.start_time AS start, " +
+        "       ti.start_time AS startYear, " +
         "       ti.stop_time AS end, " +
         "       u.name AS unit" +
         "   FROM     sediment_yield sy " +
@@ -90,7 +90,7 @@
     public static final String SQL_SELECT_UNKNOWN_DATA =
         "SELECT" +
         "       sy.description AS description, " +
-        "       ti.start_time AS start, " +
+        "       ti.start_time AS startYear, " +
         "       ti.stop_time AS end, " +
         "       syv.value AS load, " +
         "       syv.station AS km, " +
@@ -109,7 +109,7 @@
     public static final String SQL_SELECT_UNKNOWN =
         "SELECT DISTINCT " +
         "    sy.description AS description, " +
-        "    ti.start_time AS start, " +
+        "    ti.start_time AS startYear, " +
         "    ti.stop_time AS end " +
         "FROM sediment_yield sy " +
         "    JOIN rivers r ON sy.river_id = r.id " +
@@ -268,7 +268,7 @@
         else if (type.equals("epoch")) {
             sqlQuery = session.createSQLQuery(SQL_SELECT_EPOCHS)
                 .addScalar("description", StandardBasicTypes.STRING)
-                .addScalar("start", StandardBasicTypes.DATE)
+                .addScalar("startYear", StandardBasicTypes.DATE)
                 .addScalar("end", StandardBasicTypes.DATE);
             sqlQuery.setString("name", river);
             sqlQuery.setDouble("startKm", startKm);
@@ -520,7 +520,7 @@
 
         sqlQuery = session.createSQLQuery(SQL_SELECT_UNKNOWN_DATA)
             .addScalar("description", StandardBasicTypes.STRING)
-            .addScalar("start", StandardBasicTypes.DATE)
+            .addScalar("startYear", StandardBasicTypes.DATE)
             .addScalar("end", StandardBasicTypes.DATE)
             .addScalar("load", StandardBasicTypes.DOUBLE)
             .addScalar("km", StandardBasicTypes.DOUBLE)
@@ -553,7 +553,7 @@
         Session session = SessionHolder.HOLDER.get();
         SQLQuery sqlQuery = session.createSQLQuery(SQL_SELECT_UNKNOWN)
             .addScalar("description", StandardBasicTypes.STRING)
-            .addScalar("start", StandardBasicTypes.DATE)
+            .addScalar("startYear", StandardBasicTypes.DATE)
             .addScalar("end", StandardBasicTypes.DATE);
         sqlQuery.setString("river", river);
         List<Object[]> results = sqlQuery.list();

http://dive4elements.wald.intevation.org