package com.jasamedika.medifirst2000.entities;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

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 com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "PenilaianKinerjaSatpam_T")
public class PenilaianKinerjaSatpam extends BaseTransaction {

	private static final long serialVersionUID = -158325643089440159L;

	@Caption(value = "Nama Satpam")
	@Column(name = "namaSatpam", nullable = true)
	private String namaSatpam;

	@Caption(value = "Tgl Penilaian")
	@Column(name = "TglPenilaian", nullable = true)
	private Date tglPenilaian;

	@Caption(value = "Tgl Periode Awal")
	@Column(name = "TglPeriodeAwal", nullable = true)
	private Date tglPeriodeAwal;

	@Caption(value = "Tgl Periode Akhir")
	@Column(name = "TglPeriodeAkhir", nullable = true)
	private Date tglPeriodeAkhir;

	@ManyToOne
	@JoinColumn(name = "ObjectPemberiNilaiFk")
	private Pegawai pemberiNilai;

	@Column(name = "ObjectPemberiNilaiFk", insertable = false, updatable = false, nullable = true)
	private Integer pemberiNilaiId;

	@Caption(value = "Grand Total Nilai")
	@Column(name = "GrandTotal", nullable = true)
	private Integer grandTotal;

	@Column(name = "TotalNilaiUraianTugas", nullable = true)
	private Integer totalNilaiUraianTugas;

	@Column(name = "TotalNilaiKualitas", nullable = true)
	private Integer totalNilaiKualitas;

	@Column(name = "TotalNilaiSikapPerilaku", nullable = true)
	private Integer totalNilaiSikapPerilaku;

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "penilaianKinerjaSatpam")
	@Caption(value = "mapUraianTugas")
	private List<MappingUraianTugas> mapUraianTugas = new ArrayList<MappingUraianTugas>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "penilaianKinerjaSatpam")
	@Caption(value = "mapKualitas")
	private List<MappingKualitas> mapKualitas = new ArrayList<MappingKualitas>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "penilaianKinerjaSatpam")
	@Caption(value = "mapSikapPerilaku")
	private List<MappingSikapPerilaku> mapSikapPerilaku = new ArrayList<MappingSikapPerilaku>();

	public Integer getTotalNilaiUraianTugas() {
		return totalNilaiUraianTugas;
	}

	public void setTotalNilaiUraianTugas(Integer totalNilaiUraianTugas) {
		this.totalNilaiUraianTugas = totalNilaiUraianTugas;
	}

	public Integer getTotalNilaiKualitas() {
		return totalNilaiKualitas;
	}

	public void setTotalNilaiKualitas(Integer totalNilaiKualitas) {
		this.totalNilaiKualitas = totalNilaiKualitas;
	}

	public Integer getTotalNilaiSikapPerilaku() {
		return totalNilaiSikapPerilaku;
	}

	public void setTotalNilaiSikapPerilaku(Integer totalNilaiSikapPerilaku) {
		this.totalNilaiSikapPerilaku = totalNilaiSikapPerilaku;
	}

	public Date getTglPenilaian() {
		return tglPenilaian;
	}

	public void setTglPenilaian(Date tglPenilaian) {
		this.tglPenilaian = tglPenilaian;
	}

	public Pegawai getPemberiNilai() {
		return pemberiNilai;
	}

	public void setPemberiNilai(Pegawai pemberiNilai) {
		this.pemberiNilai = pemberiNilai;
	}

	public Integer getGrandTotal() {
		return grandTotal;
	}

	public void setGrandTotal(Integer grandTotal) {
		this.grandTotal = grandTotal;
	}

	public List<MappingUraianTugas> getMapUraianTugas() {
		return mapUraianTugas;
	}

	public void setMapUraianTugas(List<MappingUraianTugas> mapUraianTugas) {
		this.mapUraianTugas = mapUraianTugas;
	}

	public List<MappingKualitas> getMapKualitas() {
		return mapKualitas;
	}

	public void setMapKualitas(List<MappingKualitas> mapKualitas) {
		this.mapKualitas = mapKualitas;
	}

	public List<MappingSikapPerilaku> getMapSikapPerilaku() {
		return mapSikapPerilaku;
	}

	public void setMapSikapPerilaku(List<MappingSikapPerilaku> mapSikapPerilaku) {
		this.mapSikapPerilaku = mapSikapPerilaku;
	}

	public String getNamaSatpam() {
		return namaSatpam;
	}

	public void setNamaSatpam(String namaSatpam) {
		this.namaSatpam = namaSatpam;
	}

	public Date getTglPeriodeAwal() {
		return tglPeriodeAwal;
	}

	public void setTglPeriodeAwal(Date tglPeriodeAwal) {
		this.tglPeriodeAwal = tglPeriodeAwal;
	}

	public Date getTglPeriodeAkhir() {
		return tglPeriodeAkhir;
	}

	public void setTglPeriodeAkhir(Date tglPeriodeAkhir) {
		this.tglPeriodeAkhir = tglPeriodeAkhir;
	}

}
