Mercurial > dive4elements > river
diff backend/src/main/java/org/dive4elements/river/model/sinfo/DepthEvolutionValue.java @ 8971:50416a0df385
Importer for the Schifffahrt (S-INFO) and Oekologie (U-INFO) files
author | mschaefer |
---|---|
date | Tue, 03 Apr 2018 10:18:30 +0200 |
parents | |
children | 1f63e9d3b0ec |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/backend/src/main/java/org/dive4elements/river/model/sinfo/DepthEvolutionValue.java Tue Apr 03 10:18:30 2018 +0200 @@ -0,0 +1,121 @@ +/* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde + * Software engineering by + * Björnsen Beratende Ingenieure GmbH + * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt + * + * This file is Free Software under the GNU AGPL (>=v3) + * and comes with ABSOLUTELY NO WARRANTY! Check out the + * documentation coming with Dive4Elements River for details. + */ + +package org.dive4elements.river.model.sinfo; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + + +/** + * Hibernate binding for the DB table depth_evolution_values + * + * @author Matthias Schäfer + * + */ +@Entity +@Table(name = "depth_evolution_values") +public class DepthEvolutionValue implements Serializable { + + /***** FIELDS *****/ + + private static final long serialVersionUID = 3164888119107103560L; + + private Integer id; + + private DepthEvolution depth_evolution; + + private Double station; + + private Double total_change; + + private Double change_per_year; + + + /***** CONSTRUCTORS *****/ + + public DepthEvolutionValue() { + } + + public DepthEvolutionValue(final DepthEvolution depth_evolution, final Double station, final Double total_change, final Double change_per_year) { + this.depth_evolution = depth_evolution; + this.station = station; + this.total_change = total_change; + this.change_per_year = change_per_year; + } + + /** + * Parameter constructor with primitive parameter types + */ + public DepthEvolutionValue(final DepthEvolution depth_evolution, final double km, final double total_change, final double change_per_year) { + this(depth_evolution, Double.valueOf(km), Double.valueOf(total_change), Double.valueOf(change_per_year)); + } + + + /***** METHODS *****/ + + @Id + @SequenceGenerator(name = "SEQUENCE_DEPTH_EVOLUTION_VALUE_ID_SEQ", sequenceName = "DEPTH_EVOLUTION_VALUES_ID_SEQ", allocationSize = 1) + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_DEPTH_EVOLUTION_VALUE_ID_SEQ") + @Column(name = "id") + public Integer getId() { + return this.id; + } + + public void setId(final Integer id) { + this.id = id; + } + + @OneToOne + @JoinColumn(name = "depth_evolution_id") + public DepthEvolution getDepthEvolution() { + return this.depth_evolution; + } + + public void setDepthEvolution(final DepthEvolution depth_evolution) { + this.depth_evolution = depth_evolution; + } + + @Column(name = "station") + public Double getStation() { + return this.station; + } + + public void setStation(final Double station) { + this.station = station; + } + + @Column(name = "total_change") + public Double getTotal_change() { + return this.total_change; + } + + public void setTotal_change(final Double total_change) { + this.total_change = total_change; + } + + @Column(name = "change_per_year") + public Double getChange_per_year() { + return this.change_per_year; + } + + public void setChange_per_year(final Double change_per_year) { + this.change_per_year = change_per_year; + } +}