package com.jasamedika.medifirst2000.vo;

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

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

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

public class KegiatanAnggaranVO extends BaseTransactionVO{
	
	@ManyToOne(fetch = FetchType.LAZY)
	@Caption(value="Head Anggaran")
	private HeadAnggaranVO headAnggaran;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@Caption(value = "Object Output")
	@NotNull(message="Output Diisi")
	private OutputVO output;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@Caption(value = "Kegiatan Detail")
	private KegiatanDetailVO kegiatanDetail;
	
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "kegiatanAnggaran")
	private Set<DetailAnggaranVO> detailAnggaran = new HashSet<DetailAnggaranVO>();
	
	@ManyToOne(fetch = FetchType.LAZY)
	@Caption(value="Kegiatan")
	private KegiatanVO kegiatan;

	public HeadAnggaranVO getHeadAnggaran() {
		return headAnggaran;
	}

	public void setHeadAnggaran(HeadAnggaranVO headAnggaran) {
		this.headAnggaran = headAnggaran;
	}

	public OutputVO getOutput() {
		return output;
	}

	public void setOutput(OutputVO output) {
		this.output = output;
	}

	public KegiatanDetailVO getKegiatanDetail() {
		return kegiatanDetail;
	}

	public void setKegiatanDetail(KegiatanDetailVO kegiatanDetail) {
		this.kegiatanDetail = kegiatanDetail;
	}

	public Set<DetailAnggaranVO> getDetailAnggaran() {
		return detailAnggaran;
	}

	public void setDetailAnggaran(Set<DetailAnggaranVO> detailAnggaran) {
		this.detailAnggaran = detailAnggaran;
	}

	public KegiatanVO getKegiatan() {
		return kegiatan;
	}

	public void setKegiatan(KegiatanVO kegiatan) {
		this.kegiatan = kegiatan;
	}

}
