package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;

import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.BaseMaster;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class DetailKamar
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "DetailKamar_M")
public class DetailKamar extends BaseMaster {
	@NotNull(message = "Fasilitas tidak boleh kosong")
	@Column(name = "Fasilitas", nullable = false, length = 255)
	@Caption(value = "Fasilitas")
	private String fasilitas;

	public void setFasilitas(String fasilitas) {
		this.fasilitas = fasilitas;
	}

	public String getFasilitas() {
		return this.fasilitas;
	}

	@Column(name = "Gambar", nullable = true, length = 255)
	@Caption(value = "Gambar")
	private String gambar;

	public void setGambar(String gambar) {
		this.gambar = gambar;
	}

	public String getGambar() {
		return this.gambar;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectKelasFk")
	@NotNull(message = "Kd Kelas tidak boleh kosong")

	@Caption(value = "Object Kelas")
	private Kelas kelas;

	public void setKelas(Kelas kelas) {
		this.kelas = kelas;
	}

	public Kelas getKelas() {
		return this.kelas;
	}

	@Column(name = "ObjectKelasFk", insertable = false, updatable = false)
	private Integer kelasId;

	@NotNull(message = "Qty Kamar tidak boleh kosong")
	@Column(name = "QtyKamar", nullable = false)
	@Caption(value = "Qty Kamar")
	private short qtyKamar;

	public void setqtyKamar(short qtyKamar) {
		this.qtyKamar = qtyKamar;
	}

	public short getqtyKamar() {
		return this.qtyKamar;
	}

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkelasdijamin") private Set<AsuransiPasien> AsuransiPasienSet
	 * = new HashSet<AsuransiPasien>();
	 * 
	 * public Set<AsuransiPasien> getAsuransiPasienSet() { return
	 * AsuransiPasienSet; }
	 * 
	 * public void setAsuransiPasienSet(Set<AsuransiPasien> asuransiPasienSet) {
	 * AsuransiPasienSet = asuransiPasienSet; }
	 * 
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkelas") private Set<HargaNettoProdukByKelas>
	 * HargaNettoDiscPasienPulangSet = new HashSet<HargaNettoProdukByKelas>();
	 * 
	 * public Set<HargaNettoProdukByKelas> getHargaNettoDiscPasienPulangSet() {
	 * return HargaNettoDiscPasienPulangSet; }
	 * 
	 * public void setHargaNettoDiscPasienPulangSet(Set<HargaNettoProdukByKelas>
	 * hargaNettoDiscPasienPulangSet) { HargaNettoDiscPasienPulangSet =
	 * hargaNettoDiscPasienPulangSet; }
	 * 
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkelas") private Set<HargaNettoProdukByKelas>
	 * HargaNettoProdukByKelasSet = new HashSet<HargaNettoProdukByKelas>();
	 * 
	 * public Set<HargaNettoProdukByKelas> getHargaNettoProdukByKelasSet() {
	 * return HargaNettoProdukByKelasSet; }
	 * 
	 * public void setHargaNettoProdukByKelasSet(Set<HargaNettoProdukByKelas>
	 * hargaNettoProdukByKelasSet) { HargaNettoProdukByKelasSet =
	 * hargaNettoProdukByKelasSet; }
	 * 
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkelas") private Set<HargaNettoProdukByKelasD>
	 * HargaNettoProdukByKelasDSet = new HashSet<HargaNettoProdukByKelasD>();
	 * 
	 * public Set<HargaNettoProdukByKelasD> getHargaNettoProdukByKelasDSet() {
	 * return HargaNettoProdukByKelasDSet; }
	 * 
	 * public void setHargaNettoProdukByKelasDSet(Set<HargaNettoProdukByKelasD>
	 * hargaNettoProdukByKelasDSet) { HargaNettoProdukByKelasDSet =
	 * hargaNettoProdukByKelasDSet; }
	 * 
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkelas") private Set<HargaPaketPenjamin> HargaPaketPenjaminSet
	 * = new HashSet<HargaPaketPenjamin>();
	 * 
	 * public Set<HargaPaketPenjamin> getHargaPaketPenjaminSet() { return
	 * HargaPaketPenjaminSet; }
	 * 
	 * public void setHargaPaketPenjaminSet(Set<HargaPaketPenjamin>
	 * hargaPaketPenjaminSet) { HargaPaketPenjaminSet = hargaPaketPenjaminSet; }
	 * 
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkelas") private Set<HargaPaketPenjaminLuarPaket>
	 * HargaPaketPenjaminLuarPaketSet = new
	 * HashSet<HargaPaketPenjaminLuarPaket>();
	 * 
	 * public Set<HargaPaketPenjaminLuarPaket>
	 * getHargaPaketPenjaminLuarPaketSet() { return
	 * HargaPaketPenjaminLuarPaketSet; }
	 * 
	 * public void
	 * setHargaPaketPenjaminLuarPaketSet(Set<HargaPaketPenjaminLuarPaket>
	 * hargaPaketPenjaminLuarPaketSet) { HargaPaketPenjaminLuarPaketSet =
	 * hargaPaketPenjaminLuarPaketSet; }
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkelasdefault") private Set<JenisTransaksi> JenisTransaksiSet
	 * = new HashSet<JenisTransaksi>();
	 * 
	 * public Set<JenisTransaksi> getJenisTransaksiSet() { return
	 * JenisTransaksiSet; }
	 * 
	 * public void setJenisTransaksiSet(Set<JenisTransaksi> jenisTransaksiSet) {
	 * JenisTransaksiSet = jenisTransaksiSet; }
	 * 
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkelas") private Set<Kamar> KamarSet = new HashSet<Kamar>();
	 * 
	 * public Set<Kamar> getKamarSet() { return KamarSet; }
	 * 
	 * public void setKamarSet(Set<Kamar> kamarSet) { KamarSet = kamarSet; }
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy =
	 * "kdkelas") private Set<Kelas> KelasSet = new HashSet<Kelas>();
	 * 
	 * public Set<Kelas> getKelasSet() { return KelasSet; }
	 * 
	 * public void setKelasSet(Set<Kelas> kelasSet) { KelasSet = kelasSet; }
	 */

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.detailkamar_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.detailkamar_m_id_seq", sequenceName = "public.detailkamar_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {

		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}