Newer
Older
sink / src / main / java / org / flume / alarm / domain / AlarmRule.java
zhout on 2 Mar 2022 1 KB first commit
package org.flume.alarm.domain;

import javax.persistence.*;

/**
 * AlarmAlarmRule entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ALARM_ALARM_RULE")
@SequenceGenerator(name = "SEQ_ALARM_RULE_ID", sequenceName = "SEQ_ALARM_RULE_ID",initialValue = 1,allocationSize = 1)
public class AlarmRule implements java.io.Serializable 
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long id;
	private Device device;
	private double highValue;
	private double lowValue;
	private double saltation;
	private double overTime;
	private SensorType sensorType;
	
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_ALARM_RULE_ID")
	@Column(name = "DBID")
	public long getId()
	{
		return id;
	}
	public void setId(long id)
	{
		this.id = id;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DEVICE_ID")
	public Device getDevice()
	{
		return device;
	}
	public void setDevice(Device device)
	{
		this.device = device;
	}
	
	@Column(name = "HIGHVALUE")
	public double getHighValue()
	{
		return highValue;
	}
	public void setHighValue(double highValue)
	{
		this.highValue = highValue;
	}
	
	@Column(name = "LOWVALUE")
	public double getLowValue()
	{
		return lowValue;
	}
	public void setLowValue(double lowValue)
	{
		this.lowValue = lowValue;
	}
	
	@Column(name = "SALTATION")
	public double getSaltation()
	{
		return saltation;
	}
	public void setSaltation(double saltation)
	{
		this.saltation = saltation;
	}
	
	@Column(name = "OVERTIME")
	public double getOverTime()
	{
		return overTime;
	}
	public void setOverTime(double overTime)
	{
		this.overTime = overTime;
	}
	

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SENSORCODE")

    public SensorType getSensorType() {
        return sensorType;
    }

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

}