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.Table;
import javax.validation.constraints.NotNull;

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

/**
 * class JenisJabatan
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "JenisJabatan_M")
public class JenisJabatan extends BaseMaster {
	@NotNull(message = "Jenis Jabatan tidak boleh kosong")
	@Column(name = "JenisJabatan", nullable = false, length = 30)
	@Caption(value = "Jenis Jabatan")
	private String jenisJabatan;

	public void setJenisJabatan(String jenisJabatan) {
		this.jenisJabatan = jenisJabatan;
	}

	public String getJenisJabatan() {
		return this.jenisJabatan;
	}

	@NotNull(message = "Kd Jenis Jabatan tidak boleh kosong")
	@Column(name = "KdJenisJabatan", nullable = false, length = 1)
	@Caption(value = "Kode Jenis Jabatan")
	private String kdJenisJabatan;

	public void setKdJenisJabatan(String kdJenisJabatan) {
		this.kdJenisJabatan = kdJenisJabatan;
	}

	public String getKdJenisJabatan() {
		return this.kdJenisJabatan;
	}

	@NotNull(message = "QJenis Jabatan tidak boleh kosong")
	@Column(name = "QJenisJabatan", nullable = false)
	@Caption(value = "QJenis Jabatan")
	private Byte qJenisJabatan;

	public void setqJenisJabatan(Byte qJenisJabatan) {
		this.qJenisJabatan = qJenisJabatan;
	}

	public Byte getqJenisJabatan() {
		return this.qJenisJabatan;
	}

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdjenisjabatan") private Set<Jabatan> JabatanSet = new
	 * HashSet<Jabatan>();
	 * 
	 * public Set<Jabatan> getJabatanSet() { return JabatanSet; }
	 * 
	 * public void setJabatanSet(Set<Jabatan> jabatanSet) { JabatanSet =
	 * jabatanSet; }
	 */

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

	public Integer getId() {

		return id;
	}

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