package com.jasamedika.medifirst2000.vo;

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.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.entities.DataPapSmear;
import com.jasamedika.medifirst2000.entities.Pegawai;
import com.jasamedika.medifirst2000.helper.Caption;

public class PapSmearVO extends BaseTransactionVO{

	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiFk")
	@NotNull(message="Pegawai tidak boleh kosong")
	@Caption(value="Pegawai")
	private PegawaiVO pegawai;
	
	@Column(name = "ObjectPegawaiFk", insertable=false,updatable=false,nullable=false)
	private Integer pegawaiId;
	
	//
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "papSmearVO")
	@Caption(value = "dataPapSmearSet")
	private Set<DataPapSmearVO> dataPapSmearSet=new HashSet<DataPapSmearVO>();

	public PegawaiVO getPegawai() {
		return pegawai;
	}

	public void setPegawai(PegawaiVO pegawai) {
		this.pegawai = pegawai;
	}

	public Integer getPegawaiId() {
		return pegawaiId;
	}

	public void setPegawaiId(Integer pegawaiId) {
		this.pegawaiId = pegawaiId;
	}

	public Set<DataPapSmearVO> getDataPapSmearSet() {
		return dataPapSmearSet;
	}

	public void setDataPapSmearSet(Set<DataPapSmearVO> dataPapSmearSet) {
		this.dataPapSmearSet = dataPapSmearSet;
	}
	
	
}
