package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
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.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * class KomponenEvaluasi
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "KomponenEvaluasi_M")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class KomponenEvaluasi extends BaseMaster {
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "jabatanFK")
	@Caption(value = "jabatan")
	private Jabatan jabatan;
	
	@Column(name = "jabatanFK", insertable = false, updatable = false,nullable = true)
	private Integer jabatanId;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "kelompokEvaluasiFK")
	@Caption(value = "kelompokEvaluasi")
	private KelompokEvaluasi kelompokEvaluasi;
	
	@Column(name = "kelompokEvaluasiFK", insertable = false, updatable = false,nullable = true)
	private Integer kdKelompokEvaluasiId;
	
	@Caption(value = "nilaiMin")
	@Column(name = "nilaiMin", nullable = true)
	private Double nilaiMin;
	
	@Caption(value = "nilaiMax")
	@Column(name = "nilaiMax", nullable = true)
	private Double nilaiMax;
	
	@Caption(value = "nilaiStandar")
	@Column(name = "nilaiStandar", nullable = true)
	private String nilaiStandar;
	
	@Caption(value = "deskripsiKompetensi")
	@Column(name = "deskripsiKompetensi", nullable = true, length = 9000)
	private String deskripsiKompetensi;	
	
	@Caption(value = "factorRate")
	@Column(name = "factorRate", nullable = false)
	private Double factorRate;
	
	@Caption(value = "operatorFactorRate")
	@Column(name = "operatorFactorRate", nullable = true)
	private String operatorFactorRate;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@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 Komponen Evaluasi tidak boleh kosong")
	@Column(name = "KdKomponenEvaluasi", nullable = false)
	@Caption(value = "Kode Komponen Evaluasi")
	private Integer kdKomponenEvaluasi;

	public void setKdKomponenEvaluasi(Integer kdKomponenEvaluasi) {
		this.kdKomponenEvaluasi = kdKomponenEvaluasi;
	}

	public Integer getKdKomponenEvaluasi() {
		return this.kdKomponenEvaluasi;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectKomponenEvaluasiHeadFk")
	@Caption(value = "Object Komponen Evaluasi Head")
	private KomponenEvaluasi komponenEvaluasiHead;

	public void setKomponenEvaluasiHead(KomponenEvaluasi komponenEvaluasiHead) {
		this.komponenEvaluasiHead = komponenEvaluasiHead;
	}

	public KomponenEvaluasi getKomponenEvaluasiHead() {
		return this.komponenEvaluasiHead;
	}

	@Column(name = "ObjectKomponenEvaluasiHeadFk", insertable = false, updatable = false, nullable = false)
	private Integer komponenEvaluasiHeadId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectSatuanHasilFk")
	@Caption(value = "Object Satuan Hasil")
	private SatuanHasil satuanHasil;

	public void setSatuanHasil(SatuanHasil satuanHasil) {
		this.satuanHasil = satuanHasil;
	}

	public SatuanHasil getSatuanHasil() {
		return this.satuanHasil;
	}

	@Column(name = "ObjectSatuanHasilFk", insertable = false, updatable = false)
	private Integer satuanHasilId;

	@NotNull(message = "Komponen Evaluasi tidak boleh kosong")
	@Column(name = "KomponenEvaluasi", nullable = false, length = 75)
	@Caption(value = "Komponen Evaluasi")
	private String komponenEvaluasi;

	public void setKomponenEvaluasi(String komponenEvaluasi) {
		this.komponenEvaluasi = komponenEvaluasi;
	}

	public String getKomponenEvaluasi() {
		return this.komponenEvaluasi;
	}

	@Column(name = "NilaiNormal", nullable = true, length = 150)
	@Caption(value = "Nilai Normal")
	private String nilaiNormal;

	public void setNilaiNormal(String nilaiNormal) {
		this.nilaiNormal = nilaiNormal;
	}

	public String getNilaiNormal() {
		return this.nilaiNormal;
	}

	@NotNull(message = "No Urut tidak boleh kosong")
	@Column(name = "NoUrut", nullable = false)
	@Caption(value = "No Urut")
	private Integer noUrut;

	public void setNoUrut(Integer noUrut) {
		this.noUrut = noUrut;
	}

	public Integer getNoUrut() {
		return this.noUrut;
	}

	@NotNull(message = "QKomponen Evaluasi tidak boleh kosong")
	@Column(name = "QKomponenEvaluasi", nullable = false)
	@Caption(value = "QKomponen Evaluasi")
	private Integer qKomponenEvaluasi;

	public void setqKomponenEvaluasi(Integer qKomponenEvaluasi) {
		this.qKomponenEvaluasi = qKomponenEvaluasi;
	}

	public Integer getqKomponenEvaluasi() {
		return this.qKomponenEvaluasi;
	}

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

	public Integer getId() {

		return id;
	}

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

	public KelompokEvaluasi getKelompokEvaluasi() {
		return kelompokEvaluasi;
	}

	public void setKelompokEvaluasi(KelompokEvaluasi kelompokEvaluasi) {
		this.kelompokEvaluasi = kelompokEvaluasi;
	}

	public Integer getKdKelompokEvaluasiId() {
		return kdKelompokEvaluasiId;
	}

	public void setKdKelompokEvaluasiId(Integer kdKelompokEvaluasiId) {
		this.kdKelompokEvaluasiId = kdKelompokEvaluasiId;
	}

	public Double getNilaiMin() {
		return nilaiMin;
	}

	public void setNilaiMin(Double nilaiMin) {
		this.nilaiMin = nilaiMin;
	}

	public Double getNilaiMax() {
		return nilaiMax;
	}

	public void setNilaiMax(Double nilaiMax) {
		this.nilaiMax = nilaiMax;
	}

	public String getNilaiStandar() {
		return nilaiStandar;
	}

	public void setNilaiStandar(String nilaiStandar) {
		this.nilaiStandar = nilaiStandar;
	}

	public Double getFactorRate() {
		return factorRate;
	}

	public void setFactorRate(Double factorRate) {
		this.factorRate = factorRate;
	}

	public String getOperatorFactorRate() {
		return operatorFactorRate;
	}

	public void setOperatorFactorRate(String operatorFactorRate) {
		this.operatorFactorRate = operatorFactorRate;
	}

	public Integer getDepartemenId() {
		return departemenId;
	}

	public void setDepartemenId(Integer departemenId) {
		this.departemenId = departemenId;
	}

	public Integer getKomponenEvaluasiHeadId() {
		return komponenEvaluasiHeadId;
	}

	public void setKomponenEvaluasiHeadId(Integer komponenEvaluasiHeadId) {
		this.komponenEvaluasiHeadId = komponenEvaluasiHeadId;
	}

	public Integer getSatuanHasilId() {
		return satuanHasilId;
	}

	public void setSatuanHasilId(Integer satuanHasilId) {
		this.satuanHasilId = satuanHasilId;
	}

	public Jabatan getJabatan() {
		return jabatan;
	}

	public void setJabatan(Jabatan jabatan) {
		this.jabatan = jabatan;
	}

	public Integer getJabatanId() {
		return jabatanId;
	}

	public void setJabatanId(Integer jabatanId) {
		this.jabatanId = jabatanId;
	}

	public String getDeskripsiKompetensi() {
		return deskripsiKompetensi;
	}

	public void setDeskripsiKompetensi(String deskripsiKompetensi) {
		this.deskripsiKompetensi = deskripsiKompetensi;
	}
	
}