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;

@Entity
@Table(name = "sdm_indikatorkinerja_m")
public class IndikatorKinerja extends BaseMaster {

	@Column(name = "namaindikator", nullable = false)
	@Caption(value = "Nama Indikator")
	private String namaIndikator;

	@ManyToOne
	@NotNull(message = "Satuan indikator tidak boleh kosong")
	@JoinColumn(name = "objectsatuanindikatorfk")
	@Caption(value = "Satuan Indikator")
	private SatuanIndikator satuanIndikator;

	@Column(name = "objectsatuanindikatorfk", insertable = false, updatable = false, nullable = true)
	private Integer satuanIndikatorId;

	@Column(name = "statusverifikasi", nullable = false)
	@Caption(value = "Status Verifikasi")
	private Boolean statusVerifikasi;

	/**
	 * jenisIndikator = 1: Kuantitas, 2: Kualitas, 3: Perilaku
	 */
	@Column(name = "jenisIndikator", nullable = false)
	@Caption(value = "Jenis Indikator")
	private Integer jenisIndikator;

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

	public String getNamaIndikator() {
		return namaIndikator;
	}

	public void setNamaIndikator(String namaIndikator) {
		this.namaIndikator = namaIndikator;
	}

	public SatuanIndikator getSatuanIndikator() {
		return satuanIndikator;
	}

	public void setSatuanIndikator(SatuanIndikator satuanIndikator) {
		this.satuanIndikator = satuanIndikator;
	}

	public Integer getSatuanIndikatorId() {
		return satuanIndikatorId;
	}

	public void setSatuanIndikatorId(Integer satuanIndikatorId) {
		this.satuanIndikatorId = satuanIndikatorId;
	}

	public Boolean getStatusVerifikasi() {
		return statusVerifikasi;
	}

	public void setStatusVerifikasi(Boolean statusVerifikasi) {
		this.statusVerifikasi = statusVerifikasi;
	}

	public Integer getJenisIndikator() {
		return jenisIndikator;
	}

	public void setJenisIndikator(Integer jenisIndikator) {
		this.jenisIndikator = jenisIndikator;
	}

	public Integer getId() {
		return id;
	}

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

}
