package com.jasamedika.medifirst2000.vo;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
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.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.entities.DetailUraianTugasTransaksi;
import com.jasamedika.medifirst2000.entities.Pegawai;
import com.jasamedika.medifirst2000.entities.RincianKegiatan;
import com.jasamedika.medifirst2000.entities.UraianTugasM;
import com.jasamedika.medifirst2000.helper.Caption;

public class UraianTugasTransaksiVO extends BaseTransactionVO{	
	
	@ManyToOne
	@JoinColumn(name = "ObjectRincianTugasFk")
	@Caption(value = "Object Rincian Tugas")
	private RincianKegiatanVO rincianKegiatan;
	
	@Column(name = "ObjectRincianTugasFk", insertable = false, updatable = false, nullable = true)
	private Integer rincianKegiatanId;
	
	@Caption(value = "Total")
	@Column(name = "total", nullable = true)
	private Double total;	
	
	@Caption(value = "Nilai")
	@Column(name = "nilai", nullable = true)
	private Double nilai;
	
	@Caption(value = "Hasil")
	@Column(name = "hasil", nullable = true)
	private Double hasil;
	
	@Caption(value = "periode")
	@Column(name = "periode", nullable = true)
	private String periode;	
	
	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiFk")
	@Caption(value = "Object Pegawai")
	private PegawaiVO pegawai;
	
	@Column(name = "ObjectPegawaiFk", insertable = false, updatable = false, nullable = true)
	private Integer pegawaiId;
	
	@Caption(value = "Target")
	@Column(name = "target", nullable = false)
	private Double target;
	
	@Caption(value = "Bobot")
	@Column(name = "bobot", nullable = false)
	private Double bobot;		
	
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "uraianTugasTransaksi")
	private Set<DetailUraianTugasTransaksiVO> detailUraianTugas = new HashSet<DetailUraianTugasTransaksiVO>();	

	public RincianKegiatanVO getRincianKegiatan() {
		return rincianKegiatan;
	}

	public void setRincianKegiatan(RincianKegiatanVO rincianKegiatan) {
		this.rincianKegiatan = rincianKegiatan;
	}

	public Integer getRincianKegiatanId() {
		return rincianKegiatanId;
	}

	public void setRincianKegiatanId(Integer rincianKegiatanId) {
		this.rincianKegiatanId = rincianKegiatanId;
	}

	public Double getTotal() {
		return total;
	}

	public void setTotal(Double total) {
		this.total = total;
	}

	public Double getNilai() {
		return nilai;
	}

	public void setNilai(Double nilai) {
		this.nilai = nilai;
	}

	public Double getHasil() {
		return hasil;
	}

	public void setHasil(Double hasil) {
		this.hasil = hasil;
	}

	public String getPeriode() {
		return periode;
	}

	public void setPeriode(String periode) {
		this.periode = periode;
	}

	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<DetailUraianTugasTransaksiVO> getDetailUraianTugas() {
		return detailUraianTugas;
	}

	public void setDetailUraianTugas(Set<DetailUraianTugasTransaksiVO> detailUraianTugas) {
		this.detailUraianTugas = detailUraianTugas;
	}	
	public Double getTarget() {
		return target;
	}

	public void setTarget(Double target) {
		this.target = target;
	}

	public Double getBobot() {
		return bobot;
	}

	public void setBobot(Double bobot) {
		this.bobot = bobot;
	}

}
