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 KategoryDiagnosa
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "KategoryDiagnosa_M")
public class KategoryDiagnosa extends BaseMaster {
	@Caption(value = "Kategory Diagnosa")
	private String kategoryDiagnosa;

	public void setKategoryDiagnosa(String kategoryDiagnosa) {
		this.kategoryDiagnosa = kategoryDiagnosa;
	}

	@NotNull(message = "Kategory Diagnosa tidak boleh kosong")
	@Column(name = "KategoryDiagnosa", nullable = false, length = 150)
	public String getKategoryDiagnosa() {
		return this.kategoryDiagnosa;
	}

	@Caption(value = "Kode Kategory Diagnosa")
	private String kdKategoryDiagnosa;

	public void setKdKategoryDiagnosa(String kdKategoryDiagnosa) {
		this.kdKategoryDiagnosa = kdKategoryDiagnosa;
	}

	@NotNull(message = "Kd Kategory Diagnosa tidak boleh kosong")
	@Column(name = "KdKategoryDiagnosa", nullable = false, length = 10)
	public String getKdKategoryDiagnosa() {
		return this.kdKategoryDiagnosa;
	}

	@Caption(value = "QKategory Diagnosa")
	private Integer qKategoryDiagnosa;

	public void setqKategoryDiagnosa(Integer qKategoryDiagnosa) {
		this.qKategoryDiagnosa = qKategoryDiagnosa;
	}

	@NotNull(message = "QKategory Diagnosa tidak boleh kosong")
	@Column(name = "QKategoryDiagnosa", nullable = false)
	public Integer getqKategoryDiagnosa() {
		return this.qKategoryDiagnosa;
	}

	@Caption(value = "Rincian Kode Diagnosa")
	private String rincianKodeDiagnosa;

	public void setRincianKodeDiagnosa(String rincianKodeDiagnosa) {
		this.rincianKodeDiagnosa = rincianKodeDiagnosa;
	}

	@Column(name = "RincianKodeDiagnosa", nullable = true, length = 150)
	public String getRincianKodeDiagnosa() {
		return this.rincianKodeDiagnosa;
	}
	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy =
	 * "kdkategorydiagnosa") private Set<Diagnosa> DiagnosaSet = new
	 * HashSet<Diagnosa>();
	 * 
	 * public Set<Diagnosa> getDiagnosaSet() { return DiagnosaSet; }
	 * 
	 * public void setDiagnosaSet(Set<Diagnosa> diagnosaSet) { DiagnosaSet =
	 * diagnosaSet; }
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy =
	 * "kdkategorydiagnosa") private Set<DiagnosaTindakan> DiagnosaTindakanSet =
	 * new HashSet<DiagnosaTindakan>();
	 * 
	 * public Set<DiagnosaTindakan> getDiagnosaTindakanSet() { return
	 * DiagnosaTindakanSet; }
	 * 
	 * public void setDiagnosaTindakanSet(Set<DiagnosaTindakan>
	 * diagnosaTindakanSet) { DiagnosaTindakanSet = diagnosaTindakanSet; }
	 */

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

	public Integer getId() {

		return id;
	}

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