package com.jasamedika.medifirst2000.vo;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
import com.jasamedika.medifirst2000.helper.Caption;

public class KajianEvaluasiVO extends BaseMasterVO{
	
	@ManyToOne
	@JoinColumn(name = "ObjectUserFk")
	@NotNull(message="User tidak boleh kosong")
	@Caption(value="Kajian Evaluasi")
	private PegawaiVO user;
	
	@Column(name = "ObjectUserFk", insertable=false,updatable=false,nullable=false)
	private Integer userId;
	
	@Column(name="noUsulan")
	@Caption(value="Nomor Usulan")
	private String noUsulan;
	
	@Column(name="tglUsulan")
	@Caption(value="Tanggal Usulan")
	private Date tglUsulan;
	
	@Column(name="kajian")
	@Caption(value="Kajian")
	private String kajian;
	
	@Column(name="usulan")
	@Caption(value="Usulan")
	private String usulan;
	
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "kajianId")
	@Caption(value = "detailKajianSet")
	private Set<DetailKajianEvaluasiVO> detailKajianSet = new HashSet<DetailKajianEvaluasiVO>();

	public PegawaiVO getUser() {
		return user;
	}

	public void setUser(PegawaiVO user) {
		this.user = user;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getNoUsulan() {
		return noUsulan;
	}

	public void setNoUsulan(String noUsulan) {
		this.noUsulan = noUsulan;
	}

	public Date getTglUsulan() {
		return tglUsulan;
	}

	public void setTglUsulan(Date tglUsulan) {
		this.tglUsulan = tglUsulan;
	}

	public String getKajian() {
		return kajian;
	}

	public void setKajian(String kajian) {
		this.kajian = kajian;
	}

	public String getUsulan() {
		return usulan;
	}

	public void setUsulan(String usulan) {
		this.usulan = usulan;
	}

	public Set<DetailKajianEvaluasiVO> getDetailKajianSet() {
		return detailKajianSet;
	}

	public void setDetailKajianSet(Set<DetailKajianEvaluasiVO> detailKajianSet) {
		this.detailKajianSet = detailKajianSet;
	}
}
