Mercurial > dive4elements > river
view backend/src/main/java/org/dive4elements/river/model/uinfo/VegetationZone.java @ 9014:201817aa7b1c
Added the missing vegetation import classes
author | mschaefer |
---|---|
date | Wed, 18 Apr 2018 12:11:39 +0200 |
parents | |
children | 361de818f76e |
line wrap: on
line source
/* 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.uinfo; 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 vegetation_zone * * @author Matthias Schäfer * */ @Entity @Table(name = "vegetation_zone") public class VegetationZone implements Serializable { /***** FIELDS *****/ private static final long serialVersionUID = -6579828019873800147L; private Integer id; private Vegetation vegetation; private VegetationType vegetationType; private Integer min_overflow_days; private Integer max_overflow_days; /***** CONSTRUCTORS *****/ public VegetationZone() { } public VegetationZone(final Vegetation vegetation, final VegetationType vegetationType, final Integer min_overflow_days, final Integer max_overflow_days) { this.vegetation = vegetation; this.vegetationType = vegetationType; this.min_overflow_days = min_overflow_days; this.max_overflow_days = max_overflow_days; } /***** METHODS *****/ @Id @SequenceGenerator(name = "SEQUENCE_VEGETATION_ZONE_ID_SEQ", sequenceName = "VEGETATION_ZONE_ID_SEQ", allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_VEGETATION_ZONE_ID_SEQ") @Column(name = "id") public Integer getId() { return this.id; } public void setId(final Integer id) { this.id = id; } @OneToOne @JoinColumn(name = "vegetation_id") public Vegetation getVegetation() { return this.vegetation; } public void setVegetation(final Vegetation vegetation) { this.vegetation = vegetation; } @OneToOne @JoinColumn(name = "vegetation_type_id") public VegetationType getVegetationType() { return this.vegetationType; } public void setVegetationType(final VegetationType vegetationType) { this.vegetationType = vegetationType; } @Column(name = "min_overflow_days") public Integer getMin_overflow_days() { return this.min_overflow_days; } public void setMin_overflow_days(final Integer min_overflow_days) { this.min_overflow_days = min_overflow_days; } @Column(name = "max_overflow_days") public Integer getMax_overflow_days() { return this.max_overflow_days; } public void setMax_overflow_days(final Integer max_overflow_days) { this.max_overflow_days = max_overflow_days; } }