2021-01-07 11:34:56 +07:00

75 lines
2.0 KiB
Java

package com.jasamedika.medifirst2000.entities;
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.OneToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
@Table(name = "PertanyaanSurvey_M")
public class PertanyaanSurvey extends BaseMaster {
@Column(name = "CounterNomer", nullable = true)
@Caption(value = "Counter Nomer")
private Integer counterNomer;
@Column(name = "Pertanyaan", nullable = true)
@Caption(value = "Pertanyaan")
private String pertanyaan;
@JsonManagedReference
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "pertanyaanSurvey")
@Caption(value = "mappingSet")
private Set<MappingPertanyaanToKeterangan> mappingSet = new HashSet<MappingPertanyaanToKeterangan>();
public Integer getCounterNomer() {
return counterNomer;
}
public void setCounterNomer(Integer counterNomer) {
this.counterNomer = counterNomer;
}
public String getPertanyaan() {
return pertanyaan;
}
public void setPertanyaan(String pertanyaan) {
this.pertanyaan = pertanyaan;
}
public Set<MappingPertanyaanToKeterangan> getMappingSet() {
return mappingSet;
}
public void setMappingSet(Set<MappingPertanyaanToKeterangan> mappingSet) {
this.mappingSet = mappingSet;
}
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.pertanyaansurvey_m_id_seq")
@javax.persistence.SequenceGenerator(name = "public.pertanyaansurvey_m_id_seq", sequenceName = "public.pertanyaansurvey_m_id_seq", allocationSize = 1)
@Column(name = "id")
protected Integer id;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}