[PATCH 1 of 2] Cosmetics, docs, in range of issue1393

Wald Commits scm-commit at wald.intevation.org
Thu Aug 1 11:58:56 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1375351105 -7200
# Node ID 68c7b5811c4fed94854bd06a2cde6975df09af72
# Parent  be8a5e1911ed10b16638a9c0b0c9f2769b78e013
Cosmetics, docs, in range of issue1393.

diff -r be8a5e1911ed -r 68c7b5811c4f artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java	Thu Aug 01 10:15:00 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java	Thu Aug 01 11:58:25 2013 +0200
@@ -36,6 +36,7 @@
     protected double kmUp;
     protected double kmLow;
     protected int[] period;
+    /** Years of chosen epochs. */
     protected int[][] epoch;
     protected String unit;
 
@@ -234,6 +235,7 @@
         return result;
     }
 
+    /** Calculate/Fetch values at off. epochs. */
     private SedimentLoadResult calculateOffEpoch(int i) {
         SedimentLoad load = SedimentLoadFactory.getLoadWithData(
             this.river,
diff -r be8a5e1911ed -r 68c7b5811c4f artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java	Thu Aug 01 10:15:00 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java	Thu Aug 01 11:58:25 2013 +0200
@@ -29,6 +29,7 @@
 import org.hibernate.Session;
 import org.hibernate.type.StandardBasicTypes;
 
+
 /** Pull Sediment Loads out of db. */
 public class SedimentLoadFactory
 {
@@ -201,6 +202,10 @@
         return values;
     }
 
+    /**
+     * Get a sedimentLoad filled with data from db (or cache).
+     * @param type "epoch","off_epoch" or "single"
+     */
     public static SedimentLoad getLoadWithData(
         String river,
         String type,
@@ -338,7 +343,7 @@
     /**
      * Get sediment loads from db.
      * @param river the river
-     * @param type the sediment load type (year or epoch)
+     * @param type the sediment load type (year, epoch or off_epoch)
      * @return according sediment loads.
      */
     public static SedimentLoad getSedimentLoadWithDataUncached(
@@ -464,7 +469,8 @@
      * load.
      * @param fraction value to set 'grain' parameter in query to.
      * @param query query in which to set 'grain' parameter and run.
-     * @param load[out] SedimentLoad which to populate with values.
+     * @param load[out] SedimentLoad which to populate with values. if null
+     *                  and values are found, return a new load.
      */
     protected static void getValues (
         String fraction,


More information about the Dive4elements-commits mailing list