package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * class KelompokTindakanMedis
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "KelompokTindakanMedis_M")
public class KelompokTindakanMedis extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectDepartemenFk")
	@NotNull(message = "Kd Departemen tidak boleh kosong")

	@Caption(value = "Object Departemen")
	private Departemen departemen;

	public void setDepartemen(Departemen departemen) {
		this.departemen = departemen;
	}

	public Departemen getDepartemen() {
		return this.departemen;
	}

	@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
	private Integer departemenId;

	@NotNull(message = "Kd Kelompok T M tidak boleh kosong")
	@Column(name = "KdKelompokTM", nullable = false)
	@Caption(value = "Kode Kelompok T M")
	private Byte kdKelompokTM;

	public void setKdKelompokTM(Byte kdKelompokTM) {
		this.kdKelompokTM = kdKelompokTM;
	}

	public Byte getKdKelompokTM() {
		return this.kdKelompokTM;
	}

	@NotNull(message = "Kelompok T M tidak boleh kosong")
	@Column(name = "KelompokTM", nullable = false, length = 30)
	@Caption(value = "Kelompok T M")
	private String kelompokTM;

	public void setKelompokTM(String kelompokTM) {
		this.kelompokTM = kelompokTM;
	}

	public String getKelompokTM() {
		return this.kelompokTM;
	}

	@NotNull(message = "QKelompok T M tidak boleh kosong")
	@Column(name = "QKelompokTM", nullable = false)
	@Caption(value = "QKelompok T M")
	private Byte qKelompokTM;

	public void setqKelompokTM(Byte qKelompokTM) {
		this.qKelompokTM = qKelompokTM;
	}

	public Byte getqKelompokTM() {
		return this.qKelompokTM;
	}

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkelompoktm") private Set<JenisTindakanMedis>
	 * JenisTindakanMedisSet = new HashSet<JenisTindakanMedis>();
	 * 
	 * public Set<JenisTindakanMedis> getJenisTindakanMedisSet() { return
	 * JenisTindakanMedisSet; }
	 * 
	 * public void setJenisTindakanMedisSet(Set<JenisTindakanMedis>
	 * jenisTindakanMedisSet) { JenisTindakanMedisSet = jenisTindakanMedisSet; }
	 */

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

	public Integer getId() {

		return id;
	}

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