changeset 6740:68c7b5811c4f

Cosmetics, docs, in range of issue1393.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 01 Aug 2013 11:58:25 +0200
parents be8a5e1911ed
children 35f2d32b921d
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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,
--- 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,

http://dive4elements.wald.intevation.org