Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/model/FlowVelocityMeasurementValue.java @ 4462:ab7cf7789daf
FlowVelocityMeasurementValue: Added 'fast' (db-unmapped) class to access values later.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 09 Nov 2012 10:24:48 +0100 |
parents | 32a4ed054fc7 |
children |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/model/FlowVelocityMeasurementValue.java Fri Nov 09 10:24:07 2012 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/model/FlowVelocityMeasurementValue.java Fri Nov 09 10:24:48 2012 +0100 @@ -17,6 +17,7 @@ import org.apache.log4j.Logger; +/** Measured Flow Velocities. */ @Entity @Table(name = "flow_velocity_measure_values") public class FlowVelocityMeasurementValue @@ -38,6 +39,50 @@ private String description; + /** Non-mapped class holding same values. */ + public static class FastFlowVelocityMeasurementValue { + protected double station; + protected double w; + protected double q; + protected double v; + protected Date datetime; + protected String description; + + public FastFlowVelocityMeasurementValue(double station, + double w, double q, double v, Date datetime, String description) { + this.station = station; + this.w = w; + this.q = q; + this.v = v; + this.datetime = datetime; + this.description = description; + } + + public double getStation() { + return station; + } + + public double getW() { + return w; + } + + public double getQ() { + return q; + } + + public double getV() { + return v; + } + + public Date getDatetime() { + return datetime; + } + + public String getDescription() { + return description; + } + } + public FlowVelocityMeasurementValue() { } @@ -61,6 +106,12 @@ this.description = description; } + public static FastFlowVelocityMeasurementValue getUnmapped( + double station, double w, double q, double v, Date datetime, String description) { + return new FastFlowVelocityMeasurementValue( + station, w, q, v, datetime, description); + } + @Id @SequenceGenerator( name = "SEQUENCE_FV_MEASURE_VALUES_ID_SEQ",