package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * class TitlePasien
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "TitlePasien_M")
public class TitlePasien extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectJenisKelaminFk")

	@Caption(value = "Object Jenis Kelamin")
	private JenisKelamin jenisKelamin;

	public void setJenisKelamin(JenisKelamin jenisKelamin) {
		this.jenisKelamin = jenisKelamin;
	}

	public JenisKelamin getJenisKelamin() {
		return this.jenisKelamin;
	}

	@Column(name = "ObjectJenisKelaminFk", insertable = false, updatable = false)
	private Integer jenisKelaminId;

	@ManyToOne
	@JoinColumn(name = "ObjectStatusPerkawinanFk")

	@Caption(value = "Object Status Perkawinan")
	private StatusPerkawinan statusPerkawinan;

	public void setStatusPerkawinan(StatusPerkawinan statusPerkawinan) {
		this.statusPerkawinan = statusPerkawinan;
	}

	public StatusPerkawinan getStatusPerkawinan() {
		return this.statusPerkawinan;
	}

	@Column(name = "ObjectStatusPerkawinanFk", insertable = false, updatable = false)
	private Integer statusPerkawinanId;
	/*
	 * @ManyToOne
	 * 
	 * @JoinColumn(name = "ObjectTitleFk")
	 * 
	 * @NotNull(message="Kd Title tidak boleh kosong")
	 * 
	 * @Caption(value="Object Title") private TitlePegawai title;
	 * 
	 * public void setitle(TitlePegawai title) { this.title = title; }
	 * 
	 * 
	 * public TitlePegawai getTitle(){ return this.title; }
	 * 
	 * @Column(name = "ObjectTitleFk", insertable=false,updatable=false) private
	 * Integer titleId;
	 */
	@Column(name = "MaxAge", nullable = true)
	@Caption(value = "Max Age")
	private short maxAge;

	public void setMaxAge(short maxAge) {
		this.maxAge = maxAge;
	}

	public short getMaxAge() {
		return this.maxAge;
	}

	@Column(name = "MinAge", nullable = true)
	@Caption(value = "Min Age")
	private short minAge;

	public void setMinAge(short minAge) {
		this.minAge = minAge;
	}

	public short getMinAge() {
		return this.minAge;
	}

	@NotNull(message = "Nama Title tidak boleh kosong")
	@Column(name = "NamaTitle", nullable = false, length = 5)
	@Caption(value = "Nama Title")
	private String namaTitle;

	public void setNamaTitle(String namaTitle) {
		this.namaTitle = namaTitle;
	}

	public String getNamaTitle() {
		return this.namaTitle;
	}

	@NotNull(message = "QTitle tidak boleh kosong")
	@Column(name = "QTitle", nullable = false)
	@Caption(value = "QTitle")
	private Byte qTitle;

	public void setqTitle(Byte qTitle) {
		this.qTitle = qTitle;
	}

	public Byte getqTitle() {
		return this.qTitle;
	}

	public Integer getJenisKelaminId() {
		return jenisKelaminId;
	}

	public void setJenisKelaminId(Integer jenisKelaminId) {
		this.jenisKelaminId = jenisKelaminId;
	}

	public Integer getStatusPerkawinanId() {
		return statusPerkawinanId;
	}

	public void setStatusPerkawinanId(Integer statusPerkawinanId) {
		this.statusPerkawinanId = statusPerkawinanId;
	}
	/*
	 * public Integer getTitleId() { return titleId; }
	 * 
	 * public void setitleId(Integer titleId) { this.titleId = titleId; }
	 */

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

	public Integer getId() {

		return id;
	}

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