75 lines
1.9 KiB
Java
75 lines
1.9 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 = "KeteranganSurvey_M")
|
|
public class KeteranganSurvey extends BaseMaster {
|
|
|
|
@Column(name = "Nomor", nullable = true)
|
|
@Caption(value = "Nomor")
|
|
private Integer nomor;
|
|
|
|
@Column(name = "Keterangan", nullable = true)
|
|
@Caption(value = "Keterangan")
|
|
private String keterangan;
|
|
|
|
@JsonManagedReference
|
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "keteranganSurvey")
|
|
@Caption(value = "mappingSet")
|
|
private Set<MappingPertanyaanToKeterangan> mappingSet = new HashSet<MappingPertanyaanToKeterangan>();
|
|
|
|
public Integer getNomor() {
|
|
return nomor;
|
|
}
|
|
|
|
public void setNomor(Integer nomor) {
|
|
this.nomor = nomor;
|
|
}
|
|
|
|
public String getKeterangan() {
|
|
return keterangan;
|
|
}
|
|
|
|
public void setKeterangan(String keterangan) {
|
|
this.keterangan = keterangan;
|
|
}
|
|
|
|
public Set<MappingPertanyaanToKeterangan> getMappingSet() {
|
|
return mappingSet;
|
|
}
|
|
|
|
public void setMappingSet(Set<MappingPertanyaanToKeterangan> mappingSet) {
|
|
this.mappingSet = mappingSet;
|
|
}
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.keterangansurvey_m_id_seq")
|
|
@javax.persistence.SequenceGenerator(name = "public.keterangansurvey_m_id_seq", sequenceName = "public.keterangansurvey_m_id_seq", allocationSize = 1)
|
|
@Column(name = "id")
|
|
protected Integer id;
|
|
|
|
public Integer getId() {
|
|
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
} |