package org.well.well.domain;

import javax.persistence.*;

/**
 * AlarmAlarmRule entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "alarm_rule")
public class AlarmRule implements java.io.Serializable
{

	private static final long serialVersionUID = 1L;
	private long id;
	private String devCode;
	private Float highValue;
	private Float lowValue;
	private Float saltation;
	private Float overTime;
	private SensorType sensorType;
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID")
	public long getId()
	{
		return id;
	}
	public void setId(long id)
	{
		this.id = id;
	}

	@Column(name = "DEVCODE")
	public String getDevCode() {
		return devCode;
	}

	public void setDevCode(String devCode) {
		this.devCode = devCode;
	}

	@Column(name = "HIGHVALUE")
	public Float getHighValue() {
		return highValue;
	}

	public void setHighValue(Float highValue) {
		this.highValue = highValue;
	}




	@Column(name = "LOWVALUE")
	public Float getLowValue()
	{
		return lowValue;
	}
	public void setLowValue(Float lowValue)
	{
		this.lowValue = lowValue;
	}
	
	@Column(name = "SALTATION")
	public Float getSaltation()
	{
		return saltation;
	}
	public void setSaltation(Float saltation)
	{
		this.saltation = saltation;
	}
	
	@Column(name = "OVERTIME")
	public Float getOverTime()
	{
		return overTime;
	}
	public void setOverTime(Float overTime)
	{
		this.overTime = overTime;
	}
	

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SENSORCODE")
	public SensorType getSensorType() {
        return sensorType;
    }

    public void setSensorType(SensorType sensorType) {
        this.sensorType = sensorType;
    }

}