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

	@ManyToOne
	@NotNull(message = "Jenis Indikator tidak boleh kosong")
	@JoinColumn(name = "ObjectJenisIndikatorFK")
	@Caption(value = "Jenis Indikator")
	private JenisIndikator jenisIndikator;

	@Column(name = "ObjectJenisIndikatorFK", insertable = false, updatable = false, nullable = false)
	private Integer jenisIndikatorId;

	@Column(name = "perspektif", nullable = false)
	@Caption("Perspektif")
	private String perspektif;

	@Column(name = "KdPerspektif", nullable = false)
	@Caption("Kode Perspektif")
	private String kdPerspektif;

	public String getPerspektif() {
		return perspektif;
	}

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

	public JenisIndikator getJenisIndikator() {
		return jenisIndikator;
	}

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

	public Integer getJenisIndikatorId() {
		return jenisIndikatorId;
	}

	public void setJenisIndikatorId(Integer jenisIndikatorId) {
		this.jenisIndikatorId = jenisIndikatorId;
	}

	public String getKdPerspektif() {
		return kdPerspektif;
	}

	public void setKdPerspektif(String kdPerspektif) {
		this.kdPerspektif = kdPerspektif;
	}

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

	public Integer getId() {

		return id;
	}

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