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_indikatorkinerjadetail_m")
public class IndikatorKinerjaDetail extends BaseMaster {

	@Column(name = "detailindikator", nullable = false)
	@Caption(value = "Detail Indikator")
	private String detailIndikator;

	@ManyToOne
	@NotNull(message = "Indikator kinerja tidak boleh kosong")
	@JoinColumn(name = "objectindikatorkinerjafk")
	@Caption(value = "Indikator Kinerja")
	private IndikatorKinerja indikatorKinerja;

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

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

	public String getDetailIndikator() {
		return detailIndikator;
	}

	public void setDetailIndikator(String detailIndikator) {
		this.detailIndikator = detailIndikator;
	}

	public IndikatorKinerja getIndikatorKinerja() {
		return indikatorKinerja;
	}

	public void setIndikatorKinerja(IndikatorKinerja indikatorKinerja) {
		this.indikatorKinerja = indikatorKinerja;
	}

	public Integer getIndikatorKinerjaId() {
		return indikatorKinerjaId;
	}

	public void setIndikatorKinerjaId(Integer indikatorKinerjaId) {
		this.indikatorKinerjaId = indikatorKinerjaId;
	}

	public Integer getId() {
		return id;
	}

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

}
