package be.redtree.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity(name = "webform_field_result")
@Table(name = "webform_field_result")
public class FieldResult {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(unique = true, nullable = false)
private Long id;
@Column
private Long fieldId;
@Column
private String type;
@Column
private Boolean enabled;
@Column(columnDefinition = "TEXT")
private String content;
@ManyToOne(cascade = {}, fetch = FetchType.EAGER)
private FormResult result;
public FieldResult() {
}
public FieldResult(Long fieldId, String type, Boolean enabled, String content, FormResult result) {
this.fieldId = fieldId;
this.type = type;
this.enabled = enabled;
this.content = content;
this.result = result;
}
public FormResult getResult() {
return result;
}
public void setResult(FormResult result) {
this.result = result;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getFieldId() {
return fieldId;
}
public void setFieldId(Long fieldId) {
this.fieldId = fieldId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Boolean getEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}