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 JenisInfeksiNosokomial
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "JenisInfeksiNosokomial_M")
public class JenisInfeksiNosokomial extends BaseMaster {
	@NotNull(message = "Jenis Infeksi Nosokomial tidak boleh kosong")
	@Column(name = "JenisInfeksiNosokomial", nullable = false, length = 30)
	@Caption(value = "Jenis Infeksi Nosokomial")
	private String jenisInfeksiNosokomial;

	public void setJenisInfeksiNosokomial(String jenisInfeksiNosokomial) {
		this.jenisInfeksiNosokomial = jenisInfeksiNosokomial;
	}

	public String getJenisInfeksiNosokomial() {
		return this.jenisInfeksiNosokomial;
	}

	@NotNull(message = "Kd Jenis Infeksi Nosokomial tidak boleh kosong")
	@Column(name = "KdJenisInfeksiNosokomial", nullable = false, length = 1)
	@Caption(value = "Kode Jenis Infeksi Nosokomial")
	private String kdJenisInfeksiNosokomial;

	public void setKdJenisInfeksiNosokomial(String kdJenisInfeksiNosokomial) {
		this.kdJenisInfeksiNosokomial = kdJenisInfeksiNosokomial;
	}

	public String getKdJenisInfeksiNosokomial() {
		return this.kdJenisInfeksiNosokomial;
	}

	@NotNull(message = "QJenis Infeksi Nosokomial tidak boleh kosong")
	@Column(name = "QJenisInfeksiNosokomial", nullable = false)
	@Caption(value = "QJenis Infeksi Nosokomial")
	private Byte qJenisInfeksiNosokomial;

	public void setqJenisInfeksiNosokomial(Byte qJenisInfeksiNosokomial) {
		this.qJenisInfeksiNosokomial = qJenisInfeksiNosokomial;
	}

	public Byte getqJenisInfeksiNosokomial() {
		return this.qJenisInfeksiNosokomial;
	}

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdjenisinfeksinosokomial") private Set<InfeksiNosokomial>
	 * InfeksiNosokomialSet = new HashSet<InfeksiNosokomial>();
	 * 
	 * public Set<InfeksiNosokomial> getInfeksiNosokomialSet() { return
	 * InfeksiNosokomialSet; }
	 * 
	 * public void setInfeksiNosokomialSet(Set<InfeksiNosokomial>
	 * infeksiNosokomialSet) { InfeksiNosokomialSet = infeksiNosokomialSet; }
	 */

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.jenisinfeksinosokomial_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.jenisinfeksinosokomial_m_id_seq", sequenceName = "public.jenisinfeksinosokomial_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {

		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}