[PATCH 1 of 2] Renamed getValues... to fetch

Wald Commits scm-commit at wald.intevation.org
Mon Jul 2 07:34:41 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1530451780 -7200
# Node ID 491e1a4344572794fd9883926e115e68a30d6d2f
# Parent  6393e05a96103fd2ffaf0920bb7acd53c1a08f7c
Renamed getValues... to fetch...

diff -r 6393e05a9610 -r 491e1a434457 backend/src/main/java/org/dive4elements/river/model/DischargeTable.java
--- a/backend/src/main/java/org/dive4elements/river/model/DischargeTable.java	Fri Jun 29 16:29:23 2018 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/DischargeTable.java	Sun Jul 01 15:29:40 2018 +0200
@@ -223,20 +223,9 @@
     }
 
     /**
-     * Selects from the database the main discharge table of a gauge
-     */
-    public static DischargeTable getGaugeMainDischargeTable(final Gauge gauge) {
-        final Session session = SessionHolder.HOLDER.get();
-        final Query query = session.createQuery("FROM DischargeTable WHERE gauge_id=:gaugeid AND kind=0");
-        query.setParameter("gaugeid", gauge.getId());
-        final List<DischargeTable> list = query.list();
-        return list.isEmpty() ? null : list.get(0);
-    }
-
-    /**
      * Selects from the database the values of a discharge table sorted by W
      */
-    public static List<DischargeTableValue> getValuesSortedByW(final DischargeTable dischargeTable) {
+    public static List<DischargeTableValue> fetchValuesSortedByW(final DischargeTable dischargeTable) {
         final Session session = SessionHolder.HOLDER.get();
         final Query query = session.createQuery("FROM DischargeTableValue WHERE table_id=:parentid ORDER BY w");
         query.setParameter("parentid", dischargeTable.getId());
diff -r 6393e05a9610 -r 491e1a434457 backend/src/main/java/org/dive4elements/river/model/MainValue.java
--- a/backend/src/main/java/org/dive4elements/river/model/MainValue.java	Fri Jun 29 16:29:23 2018 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/MainValue.java	Sun Jul 01 15:29:40 2018 +0200
@@ -28,7 +28,7 @@
 import org.hibernate.Session;
 
 
-/** A Main or Extreme value of a rivers gauge. */
+/** A Main or Extreme value of a river's gauge. */
 @Entity
 @Table(name = "main_values")
 public class MainValue


More information about the Dive4Elements-commits mailing list