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

100 lines
3.0 KiB
Java

package com.jasamedika.medifirst2000.entities;
import java.io.Serializable;
import org.hibernate.envers.Audited;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import org.hibernate.validator.constraints.NotEmpty;
import com.jasamedika.medifirst2000.base.BaseMaster;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
/**
* class KuantitasLahirBayi
*
* @author Generator
*/
@Entity // @Audited
@Table(name = "KuantitasLahirBayi_M")
public class KuantitasLahirBayi extends BaseMaster {
@Caption(value = "Kode Kuantitas Lahir Bayi")
private String kdKuantitasLahirBayi;
public void setKdKuantitasLahirBayi(String kdKuantitasLahirBayi) {
this.kdKuantitasLahirBayi = kdKuantitasLahirBayi;
}
@NotNull(message = "Kd Kuantitas Lahir Bayi tidak boleh kosong")
@Column(name = "KdKuantitasLahirBayi", nullable = false, length = 1)
public String getKdKuantitasLahirBayi() {
return this.kdKuantitasLahirBayi;
}
@Caption(value = "Kuantitas Lahir Bayi")
private String kuantitasLahirBayi;
public void setKuantitasLahirBayi(String kuantitasLahirBayi) {
this.kuantitasLahirBayi = kuantitasLahirBayi;
}
@NotNull(message = "Kuantitas Lahir Bayi tidak boleh kosong")
@Column(name = "KuantitasLahirBayi", nullable = false, length = 15)
public String getKuantitasLahirBayi() {
return this.kuantitasLahirBayi;
}
@Caption(value = "QKuantitas Lahir Bayi")
private Byte qKuantitasLahirBayi;
public void setqKuantitasLahirBayi(Byte qKuantitasLahirBayi) {
this.qKuantitasLahirBayi = qKuantitasLahirBayi;
}
@NotNull(message = "QKuantitas Lahir Bayi tidak boleh kosong")
@Column(name = "QKuantitasLahirBayi", nullable = false)
public Byte getqKuantitasLahirBayi() {
return this.qKuantitasLahirBayi;
}
/*
* @JsonManagedReference
*
* @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy =
* "kdkuantitaslahirbayi") private Set<KeadaanLahirBayi> KeadaanLahirBayiSet
* = new HashSet<KeadaanLahirBayi>();
*
* public Set<KeadaanLahirBayi> getKeadaanLahirBayiSet() { return
* KeadaanLahirBayiSet; }
*
* public void setKeadaanLahirBayiSet(Set<KeadaanLahirBayi>
* keadaanLahirBayiSet) { KeadaanLahirBayiSet = keadaanLahirBayiSet; }
*/
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.kuantitaslahirbayi_m_id_seq")
@javax.persistence.SequenceGenerator(name = "public.kuantitaslahirbayi_m_id_seq", sequenceName = "public.kuantitaslahirbayi_m_id_seq", allocationSize = 1)
@Column(name = "id")
protected Integer id;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}