Demo entry 6363089

java

   

Submitted by anonymous on May 12, 2017 at 07:58
Language: Java. Code size: 4.2 kB.

package sy.model.base;
// Generated 2017-4-24 13:36:36 by Hibernate Tools 4.3.5.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * DefAlarm generated by hbm2java
 */
@Entity
@Table(name = "Def_Alarm", uniqueConstraints = @UniqueConstraint(columnNames = "dataName"))
public class DefAlarm implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
	private String dataName;
	private Date exeTm;
	private Integer exeInterval;
	private String timer;
	private Integer type;
	private Integer isRun;
	private String phoneNo;
	private String msg;
	private Set<CfgAlarmData> cfgAlarmDatas = new HashSet<CfgAlarmData>(0);
	private Set<CfgAlarmTimeData> cfgAlarmTimeDatas = new HashSet<CfgAlarmTimeData>(0);

	public DefAlarm() {
	}

	public DefAlarm(String dataName, Integer type, Integer isRun, String msg) {
		this.dataName = dataName;
		this.type = type;
		this.isRun = isRun;
		this.msg = msg;
	}

	public DefAlarm(String dataName, Date exeTm, Integer exeInterval, String timer, Integer type, Integer isRun, String phoneNo, String msg,
			Set<CfgAlarmData> cfgAlarmDatas, Set<CfgAlarmTimeData> cfgAlarmTimeDatas) {
		this.dataName = dataName;
		this.exeTm = exeTm;
		this.exeInterval = exeInterval;
		this.timer = timer;
		this.type = type;
		this.isRun = isRun;
		this.phoneNo = phoneNo;
		this.msg = msg;
		this.cfgAlarmDatas = cfgAlarmDatas;
		this.cfgAlarmTimeDatas = cfgAlarmTimeDatas;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

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

	@Column(name = "dataName", unique = true, nullable = false, length = 50)
	public String getDataName() {
		return this.dataName;
	}

	public void setDataName(String dataName) {
		this.dataName = dataName;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "exeTm", length = 23)
	public Date getExeTm() {
		return this.exeTm;
	}

	public void setExeTm(Date exeTm) {
		this.exeTm = exeTm;
	}

	@Column(name = "exeInterval")
	public Integer getExeInterval() {
		return this.exeInterval;
	}

	public void setExeInterval(Integer exeInterval) {
		this.exeInterval = exeInterval;
	}

	@Column(name = "timer", length = 100)
	public String getTimer() {
		return this.timer;
	}

	public void setTimer(String timer) {
		this.timer = timer;
	}

	@Column(name = "type", nullable = false)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "isRun", nullable = false)
	public Integer getIsRun() {
		return this.isRun;
	}

	public void setIsRun(Integer isRun) {
		this.isRun = isRun;
	}

	@Column(name = "phoneNo", length = 2000)
	public String getPhoneNo() {
		return this.phoneNo;
	}

	public void setPhoneNo(String phoneNo) {
		this.phoneNo = phoneNo;
	}
	
	@Column(name = "msg", length = 200)
	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "defAlarm")
	public Set<CfgAlarmData> getCfgAlarmDatas() {
		return this.cfgAlarmDatas;
	}

	public void setCfgAlarmDatas(Set<CfgAlarmData> cfgAlarmDatas) {
		this.cfgAlarmDatas = cfgAlarmDatas;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "defAlarm")
	public Set<CfgAlarmTimeData> getCfgAlarmTimeDatas() {
		return this.cfgAlarmTimeDatas;
	}

	public void setCfgAlarmTimeDatas(Set<CfgAlarmTimeData> cfgAlarmTimeDatas) {
		this.cfgAlarmTimeDatas = cfgAlarmTimeDatas;
	}

}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).