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.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.helper.Caption;

public class DisposisiVO extends BaseTransactionVO{
	
	@Column(name = "NoSurat", nullable = true )
	@Caption(value="noSurat")
	private String noSurat;
	
	@Column(name = "hal", nullable = true )
	@Caption(value="hal")
	private String hal;
	
	@ManyToOne
	@JoinColumn(name = "ObjectJabatanDisampaikanFk")
	@Caption(value="Disampaikan")
	private JabatanVO jabatanDisampaikan;
	
	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiDisampaikanFk")
	@Caption(value="Disampaikan")
	private PegawaiVO pegawaiDisampaikan;
	
	@ManyToOne
	@JoinColumn(name = "ObjectJabatanAsalSuratFk")
	@Caption(value="Asal Surat")
	private JabatanVO jabatanAsalSurat;
	
	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiAsalSuratFk")
	@Caption(value="Pegawai Disampaikan")
	private PegawaiVO pegawaiAsalSurat;
	
	@ManyToOne
	@JoinColumn(name = "ObjectSifatSuratFk")
	@Caption(value="Pegawai Disampaikan")
	private SifatSuratVO sifatSurat;
	
	@Column(name = "IsiSurat", nullable = true)
	@Caption(value="isiSurat")
	private String isiSurat;
	
	@OneToMany
	private Set<DisposisiJabatanVO> disposisiJabatan=new HashSet<DisposisiJabatanVO>();
	
	@OneToMany
	private Set<DisposisiTanggapanVO> disposisiTanggapan=new HashSet<DisposisiTanggapanVO>();
	
	@Column(name = "tanggal", nullable = true )
	@Caption(value="Tanggal")
	private Date tanggal;
	
	@ManyToOne
	@JoinColumn(name = "SuratFk")
	@NotNull(message="Object Dokumen Harus Diisi")
	@Caption(value="Object Dokumen")
	private SuratVO surat;

	public String getNoSurat() {
		return noSurat;
	}

	public void setNoSurat(String noSurat) {
		this.noSurat = noSurat;
	}

	public String getHal() {
		return hal;
	}

	public void setHal(String hal) {
		this.hal = hal;
	}

	public JabatanVO getJabatanDisampaikan() {
		return jabatanDisampaikan;
	}

	public void setJabatanDisampaikan(JabatanVO jabatanDisampaikan) {
		this.jabatanDisampaikan = jabatanDisampaikan;
	}

	public PegawaiVO getPegawaiDisampaikan() {
		return pegawaiDisampaikan;
	}

	public void setPegawaiDisampaikan(PegawaiVO pegawaiDisampaikan) {
		this.pegawaiDisampaikan = pegawaiDisampaikan;
	}

	public JabatanVO getJabatanAsalSurat() {
		return jabatanAsalSurat;
	}

	public void setJabatanAsalSurat(JabatanVO jabatanAsalSurat) {
		this.jabatanAsalSurat = jabatanAsalSurat;
	}

	public PegawaiVO getPegawaiAsalSurat() {
		return pegawaiAsalSurat;
	}

	public void setPegawaiAsalSurat(PegawaiVO pegawaiAsalSurat) {
		this.pegawaiAsalSurat = pegawaiAsalSurat;
	}

	public SifatSuratVO getSifatSurat() {
		return sifatSurat;
	}

	public void setSifatSurat(SifatSuratVO sifatSurat) {
		this.sifatSurat = sifatSurat;
	}

	public String getIsiSurat() {
		return isiSurat;
	}

	public void setIsiSurat(String isiSurat) {
		this.isiSurat = isiSurat;
	}

	public Set<DisposisiJabatanVO> getDisposisiJabatan() {
		return disposisiJabatan;
	}

	public void setDisposisiJabatan(Set<DisposisiJabatanVO> disposisiJabatan) {
		this.disposisiJabatan = disposisiJabatan;
	}

	public Set<DisposisiTanggapanVO> getDisposisiTanggapan() {
		return disposisiTanggapan;
	}

	public void setDisposisiTanggapan(Set<DisposisiTanggapanVO> disposisiTanggapan) {
		this.disposisiTanggapan = disposisiTanggapan;
	}

	public Date getTanggal() {
		return tanggal;
	}

	public void setTanggal(Date tanggal) {
		this.tanggal = tanggal;
	}

	public SuratVO getSurat() {
		return surat;
	}

	public void setSurat(SuratVO surat) {
		this.surat = surat;
	}

	
	
	
}
