view flys-backend/src/main/java/de/intevation/flys/model/MeasurementStation.java @ 5690:b85df73edef0

merge
author Tom Gottfried <tom.gottfried@intevation.de>
date Fri, 12 Apr 2013 19:52:15 +0200
parents de3c77d35fef
children
line wrap: on
line source
package de.intevation.flys.model;

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;


@Entity
@Table(name = "measurement_station")
public class MeasurementStation {

    private Integer id;

    private String name;
    private String measurementType;
    private String riverside;
    private String operator;
    private String description;

    private Double station;
    private Range range;

    private River river;

    private Gauge gauge;
    private String gaugeName;

    private TimeInterval observationTimerange;

    public MeasurementStation() {
    }

    public MeasurementStation(River river, String name, String measurementType,
        String riverside, Double station, Range range, Gauge gauge,
        String gaugeName, TimeInterval observationTimerange, String operator,
        String description
    ) {
        this.river = river;
        this.name = name;
        this.measurementType = measurementType;
        this.riverside = riverside;
        this.station = station;
        this.range = range;
        this.gauge = gauge;
        this.gaugeName = gaugeName;
        this.observationTimerange = observationTimerange;
        this.operator = operator;
        this.description = description;
    }

    @Id
    @SequenceGenerator(name = "SEQ_MEASUREMENT_STATION_ID_SEQ", sequenceName = "MEASUREMENT_STATION_ID_SEQ", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_MEASUREMENT_STATION_ID_SEQ")
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "measurement_type")
    public String getMeasurementType() {
        return measurementType;
    }

    public void setMeasurementType(String measurementType) {
        this.measurementType = measurementType;
    }

    @Column(name = "riverside")
    public String getRiverside() {
        return riverside;
    }

    public void setRiverside(String riverside) {
        this.riverside = riverside;
    }

    @OneToOne
    @JoinColumn(name = "river_id")
    public River getRiver() {
        return river;
    }

    public void setRiver(River river) {
        this.river = river;
    }

    @OneToOne
    @JoinColumn(name = "reference_gauge_id")
    public Gauge getGauge() {
        return gauge;
    }

    public void setGauge(Gauge gauge) {
        this.gauge = gauge;
    }

    @Column(name = "reference_gauge_name")
    public String getGaugeName() {
        return gaugeName;
    }

    public void setGaugeName(String gaugeName) {
        this.gaugeName = gaugeName;
    }

    @Column(name = "station")
    public Double getStation() {
        return station;
    }

    public void setStation(Double station) {
        this.station = station;
    }

    @OneToOne
    @JoinColumn(name = "range_id")
    public Range getRange() {
        return range;
    }

    public void setRange(Range range) {
        this.range = range;
    }

    @OneToOne
    @JoinColumn(name = "observation_timerange_id")
    public TimeInterval getObservationTimerange() {
        return observationTimerange;
    }

    public void setObservationTimerange(TimeInterval observationTimerange) {
        this.observationTimerange = observationTimerange;
    }

    @Column(name = "operator")
    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    @Column(name = "description")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}

http://dive4elements.wald.intevation.org