changeset 9201:491e1a434457

Renamed getValues... to fetch...
author mschaefer
date Sun, 01 Jul 2018 15:29:40 +0200
parents 6393e05a9610
children b4402594213b
files backend/src/main/java/org/dive4elements/river/model/DischargeTable.java backend/src/main/java/org/dive4elements/river/model/MainValue.java
diffstat 2 files changed, 2 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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());
--- 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

http://dive4elements.wald.intevation.org