package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
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;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Table(name = "SasaranStrategis_M")
public class SasaranStrategis extends BaseMaster {

	@ManyToOne
	@NotNull(message = "Perspektif tidak boleh kosong")
	@JoinColumn(name = "ObjectPerspektifFK")
	@Caption(value = "Perspektif")
	private Perspektif perspektif;

	@Column(name = "ObjectPerspektifFK", insertable = false, updatable = false)
	private Integer perspektifId;

	@NotNull(message = "Nama Sasaran Strategis tidak boleh kosong")
	@Column(name = "SasaranStrategis", nullable = false, length = 500)
	@Caption(value = "Sasaran Strategis")
	private String sasaranStrategis;

	@Column(name = "kdSasaranStrategis", nullable = false)
	@Caption("Kode Sasaran Strategis")
	private String kdSasaranStrategis;

	@Column(name = "awalPeriode", nullable = false)
	@Caption("Awal Periode")
	private Integer awalPeriode;

	@Column(name = "akhirPeriode", nullable = false)
	@Caption("Akhir Periode")
	private Integer akhirPeriode;

	public String getSasaranStrategis() {
		return sasaranStrategis;
	}

	public void setSasaranStrategis(String sasaranStrategis) {
		this.sasaranStrategis = sasaranStrategis;
	}

	public Integer getAwalPeriode() {
		return awalPeriode;
	}

	public void setAwalPeriode(Integer awalPeriode) {
		this.awalPeriode = awalPeriode;
	}

	public Integer getAkhirPeriode() {
		return akhirPeriode;
	}

	public void setAkhirPeriode(Integer akhirPeriode) {
		this.akhirPeriode = akhirPeriode;
	}

	public Perspektif getPerspektif() {
		return perspektif;
	}

	public void setPerspektif(Perspektif perspektif) {
		this.perspektif = perspektif;
	}

	public Integer getPerspektifId() {
		return perspektifId;
	}

	public void setPerspektifId(Integer perspektifId) {
		this.perspektifId = perspektifId;
	}

	public String getKdSasaranStrategis() {
		return kdSasaranStrategis;
	}

	public void setKdSasaranStrategis(String kdSasaranStrategis) {
		this.kdSasaranStrategis = kdSasaranStrategis;
	}

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

	public Integer getId() {

		return id;
	}

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