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.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class HubunganPesertaAsuransi
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "HubunganPesertaAsuransi_M")
public class HubunganPesertaAsuransi extends BaseMaster {
	@NotNull(message = "Hubungan Peserta tidak boleh kosong")
	@Column(name = "HubunganPeserta", nullable = false, length = 20)
	@Caption(value = "Hubungan Peserta")
	private String hubunganPeserta;

	public void setHubunganPeserta(String hubunganPeserta) {
		this.hubunganPeserta = hubunganPeserta;
	}

	public String getHubunganPeserta() {
		return this.hubunganPeserta;
	}

	@NotNull(message = "Kd Hubungan Peserta tidak boleh kosong")
	@Column(name = "KdHubunganPeserta", nullable = false)
	@Caption(value = "Kode Hubungan Peserta")
	private Byte kdHubunganPeserta;

	public void setKdHubunganPeserta(Byte kdHubunganPeserta) {
		this.kdHubunganPeserta = kdHubunganPeserta;
	}

	public Byte getKdHubunganPeserta() {
		return this.kdHubunganPeserta;
	}

	@NotNull(message = "QHubungan Peserta tidak boleh kosong")
	@Column(name = "QHubunganPeserta", nullable = false)
	@Caption(value = "QHubungan Peserta")
	private Byte qHubunganPeserta;

	public void setqHubunganPeserta(Byte qHubunganPeserta) {
		this.qHubunganPeserta = qHubunganPeserta;
	}

	public Byte getqHubunganPeserta() {
		return this.qHubunganPeserta;
	}

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdhubunganpeserta") 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="kdhubunganpeserta") private Set<AsuransiPasienBerlaku>
	 * AsuransiPasienBerlakuSet = new HashSet<AsuransiPasienBerlaku>();
	 * 
	 * public Set<AsuransiPasienBerlaku> getAsuransiPasienBerlakuSet() { return
	 * AsuransiPasienBerlakuSet; }
	 * 
	 * public void setAsuransiPasienBerlakuSet(Set<AsuransiPasienBerlaku>
	 * asuransiPasienBerlakuSet) { AsuransiPasienBerlakuSet =
	 * asuransiPasienBerlakuSet; }
	 * 
	 * 
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdhubunganpeserta") private Set<HargaPaketPenjamin>
	 * HargaPaketPenjaminSet = new HashSet<HargaPaketPenjamin>();
	 * 
	 * public Set<HargaPaketPenjamin> getHargaPaketPenjaminSet() { return
	 * HargaPaketPenjaminSet; }
	 * 
	 * public void setHargaPaketPenjaminSet(Set<HargaPaketPenjamin>
	 * hargaPaketPenjaminSet) { HargaPaketPenjaminSet = hargaPaketPenjaminSet; }
	 */

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

	public Integer getId() {

		return id;
	}

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