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 = "MappingJenisRisikoSasaranStrategis_M")
public class MappingJenisRisikoSasaranStrategis extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "sasaranStrategisFk")
	@NotNull(message = "Sasaran Strategis Harus Diisi")
	@Caption(value = "Sasaran Strategis")
	private SasaranStrategis sasaranStrategis;

	@Column(name = "sasaranStrategisFk", insertable = false, updatable = false)
	private Integer sasaranStrategisId;

	@ManyToOne
	@JoinColumn(name = "risikoFk")
	@NotNull(message = "Risiko Harus Diisi")
	@Caption(value = "Risiko")
	private Risiko risiko;

	@Column(name = "risikoFk", insertable = false, updatable = false)
	private Integer risikoId;

	public SasaranStrategis getSasaranStrategis() {
		return sasaranStrategis;
	}

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

	public Integer getSasaranStrategisId() {
		return sasaranStrategisId;
	}

	public void setSasaranStrategisId(Integer sasaranStrategisId) {
		this.sasaranStrategisId = sasaranStrategisId;
	}

	public Risiko getRisiko() {
		return risiko;
	}

	public void setRisiko(Risiko risiko) {
		this.risiko = risiko;
	}

	public Integer getRisikoId() {
		return risikoId;
	}

	public void setRisikoId(Integer risikoId) {
		this.risikoId = risikoId;
	}

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

	public Integer getId() {

		return id;
	}

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