All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
sk.iway.iwcm.components.inquiry.jpa.InquiryEntity Maven / Gradle / Ivy
package sk.iway.iwcm.components.inquiry.jpa;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import sk.iway.iwcm.database.ActiveRecordRepository;
import sk.iway.iwcm.system.adminlog.EntityListenersType;
import sk.iway.iwcm.system.datatable.DataTableColumnType;
import sk.iway.iwcm.system.datatable.annotations.DataTableColumn;
import sk.iway.iwcm.system.datatable.annotations.DataTableColumnEditor;
import sk.iway.iwcm.system.datatable.annotations.DataTableColumnEditorAttr;
import sk.iway.iwcm.system.datatable.annotations.DataTableColumnNested;
import sk.iway.iwcm.system.jpa.AllowSafeHtmlAttributeConverter;
@Entity
@Table(name = "inquiry")
@EntityListeners(sk.iway.iwcm.system.adminlog.AuditEntityListener.class)
@EntityListenersType(sk.iway.iwcm.Adminlog.TYPE_INQUIRY)
public class InquiryEntity extends ActiveRecordRepository implements Serializable {
@Id
@Column(name = "question_id")
@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "S_inquiry")
@DataTableColumn(inputType = DataTableColumnType.ID, title = "ID")
private Long id;
@Column(name = "question_text")
@DataTableColumn(inputType = DataTableColumnType.QUILL, className = "dt-row-edit", renderFormatLinkTemplate = "javascript:;", title = "inquiry.question2", tab = "basic")
@NotEmpty
@Size(max = 255)
@javax.persistence.Convert(converter = AllowSafeHtmlAttributeConverter.class)
private String questionText;
@Column(name = "question_active")
@DataTableColumn(inputType = DataTableColumnType.BOOLEAN, title = "components.inquirysimple.active", hidden = true, tab = "basic")
private Boolean questionActive;
@Column(name = "multiple")
@DataTableColumn(inputType = DataTableColumnType.BOOLEAN, title = "inquiry.answer.multiple", hidden = true, tab = "basic")
private Boolean multiple;
@Column(name = "question_group")
@DataTableColumn(inputType = DataTableColumnType.TEXT, title = "inquiry.group", tab = "advanced", editor = {@DataTableColumnEditor(attr = {@DataTableColumnEditorAttr(key = "data-ac-url", value = "/admin/rest/inquiry/autocomplete"), @DataTableColumnEditorAttr(key = "data-ac-select", value = "true")})})
@Size(max = 255)
private String questionGroup;
@Column(name = "answer_text_ok")
@DataTableColumn(inputType = DataTableColumnType.TEXTAREA, title = "inquiry.answer_text_ok", hidden = true, tab = "advanced")
private String answerTextOk;
@Column(name = "answer_text_fail")
@DataTableColumn(inputType = DataTableColumnType.TEXTAREA, title = "inquiry.answer_text_fail", hidden = true, tab = "advanced")
private String answerTextFail;
@Column(name = "hours")
@DataTableColumn(inputType = DataTableColumnType.NUMBER, title = "inquiry.hours_number", hidden = true, tab = "advanced")
private Integer hours;
@Column(name = "date_from")
@DataTableColumn(inputType = DataTableColumnType.DATE, title = "inquiry.valid_since", tab = "advanced")
private Date dateFrom;
@Column(name = "date_to")
@DataTableColumn(inputType = DataTableColumnType.DATE, title = "inquiry.valid_till", tab = "advanced")
private Date dateTo;
@Column(name = "total_clicks")
@DataTableColumn(inputType = DataTableColumnType.NUMBER, title = "inquiry.click_number", className = "hideOnCreate disabled")
private Integer totalClicks;
@Column(name = "domain_id")
private Integer domainId;
//Bind editor fields
@Transient
@DataTableColumnNested
private transient InquiryEditorFields editorFields = null;
public Long getId() {
return this.id;
}
public String getQuestionText() {
return this.questionText;
}
public Boolean getQuestionActive() {
return this.questionActive;
}
public Boolean getMultiple() {
return this.multiple;
}
public String getQuestionGroup() {
return this.questionGroup;
}
public String getAnswerTextOk() {
return this.answerTextOk;
}
public String getAnswerTextFail() {
return this.answerTextFail;
}
public Integer getHours() {
return this.hours;
}
public Date getDateFrom() {
return this.dateFrom;
}
public Date getDateTo() {
return this.dateTo;
}
public Integer getTotalClicks() {
return this.totalClicks;
}
public Integer getDomainId() {
return this.domainId;
}
public InquiryEditorFields getEditorFields() {
return this.editorFields;
}
public void setId(final Long id) {
this.id = id;
}
public void setQuestionText(final String questionText) {
this.questionText = questionText;
}
public void setQuestionActive(final Boolean questionActive) {
this.questionActive = questionActive;
}
public void setMultiple(final Boolean multiple) {
this.multiple = multiple;
}
public void setQuestionGroup(final String questionGroup) {
this.questionGroup = questionGroup;
}
public void setAnswerTextOk(final String answerTextOk) {
this.answerTextOk = answerTextOk;
}
public void setAnswerTextFail(final String answerTextFail) {
this.answerTextFail = answerTextFail;
}
public void setHours(final Integer hours) {
this.hours = hours;
}
public void setDateFrom(final Date dateFrom) {
this.dateFrom = dateFrom;
}
public void setDateTo(final Date dateTo) {
this.dateTo = dateTo;
}
public void setTotalClicks(final Integer totalClicks) {
this.totalClicks = totalClicks;
}
public void setDomainId(final Integer domainId) {
this.domainId = domainId;
}
public void setEditorFields(final InquiryEditorFields editorFields) {
this.editorFields = editorFields;
}
}