// default package
// Generated Nov 24, 2014 4:55:08 PM by Hibernate Tools 4.0.0
/**
* Implements the entity corresponding to the custom_ui_template table in the aidr_predict DB
*
* @author Koushik
*/
package qa.qcri.aidr.dbmanager.entities.misc;
import static javax.persistence.GenerationType.IDENTITY;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/*
* CustomUiTemplate generated by hbm2java
*/
@Entity
@Table(name = "custom_ui_template", catalog = "aidr_predict")
public class CustomUiTemplate implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = 4549440030648604692L;
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "customUITemplateID", unique = true, nullable = false)
private Long customUitemplateId;
@Column(name = "crisisID", nullable = false)
private Long crisisID;
@Column(name = "nominalAttributeID")
private Long nominalAttributeID;
@Column(name = "templateType", nullable = false)
private Integer templateType;
@Column(name = "templateValue", nullable = false, length = 65535, columnDefinition="Text")
private String templateValue;
@Column(name = "status")
private Integer status;
@Column(name = "isActive", nullable = false)
private Boolean isActive;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "updated", nullable = false, length = 19)
private Date updated;
@PreUpdate
protected void onUpdate() {
updated = new Date();
}
@PrePersist
protected void onCreate() {
updated = new Date();
}
public CustomUiTemplate() {
}
public CustomUiTemplate(Long crisisId, Integer templateType,
String templateValue, Boolean isActive, Date updated) {
this.crisisID = crisisId;
this.templateType = templateType;
this.templateValue = templateValue;
this.isActive = isActive;
this.updated = updated;
}
public CustomUiTemplate(Long crisisId, Long nominalAttributeId,
Integer templateType, String templateValue, Integer status,
Boolean isActive, Date updated) {
this.crisisID = crisisId;
this.nominalAttributeID = nominalAttributeId;
this.templateType = templateType;
this.templateValue = templateValue;
this.status = status;
this.isActive = isActive;
this.updated = updated;
}
public Long getCustomUitemplateId() {
return this.customUitemplateId;
}
public void setCustomUitemplateId(Long customUitemplateId) {
this.customUitemplateId = customUitemplateId;
}
public Long getCrisisID() {
return this.crisisID;
}
public void setCrisisID(long crisisId) {
this.crisisID = crisisId;
}
public Long getNominalAttributeID() {
return this.nominalAttributeID;
}
public void setNominalAttributeID(Long nominalAttributeId) {
this.nominalAttributeID = nominalAttributeId;
}
public Integer getTemplateType() {
return this.templateType;
}
public void setTemplateType(int templateType) {
this.templateType = templateType;
}
public String getTemplateValue() {
return this.templateValue;
}
public void setTemplateValue(String templateValue) {
this.templateValue = templateValue;
}
public Integer getStatus() {
return this.status;
}
public void setStatus(Integer status) {
this.status = status;
}
@Column(name = "isActive", nullable = false)
public Boolean isIsActive() {
return this.isActive;
}
public void setIsActive(Boolean isActive) {
this.isActive = isActive;
}
public Date getUpdated() {
return this.updated;
}
public void setUpdated(Date updated) {
this.updated = updated;
}
}