package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
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 AsKepKajian
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "AsKepKajian_M")
public class AsKepKajian extends BaseMaster {
	@Column(name = "DeskripsiKajian", nullable = true, length = 150)
	@Caption(value = "Deskripsi Kajian")
	private String deskripsiKajian;

	public void setDeskripsiKajian(String deskripsiKajian) {
		this.deskripsiKajian = deskripsiKajian;
	}

	public String getDeskripsiKajian() {
		return this.deskripsiKajian;
	}

	@Column(name = "Kajian", nullable = true, length = 150)
	@Caption(value = "Kajian")
	private String kajian;

	public void setKajian(String kajian) {
		this.kajian = kajian;
	}

	public String getKajian() {
		return this.kajian;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectJenisKajianFk")
	@NotNull(message = "Kd Jenis Kajian tidak boleh kosong")

	@Caption(value = "Object Jenis Kajian")
	private AsKepJenisKajian jenisKajian;

	public void setJenisKajian(AsKepJenisKajian jenisKajian) {
		this.jenisKajian = jenisKajian;
	}

	public AsKepJenisKajian getJenisKajian() {
		return this.jenisKajian;
	}

	@Column(name = "ObjectJenisKajianFk", insertable = false, updatable = false)
	private Integer jenisKajianId;

	public Integer getJenisKajianId() {
		return jenisKajianId;
	}

	public void setJenisKajianId(Integer jenisKajianId) {
		this.jenisKajianId = jenisKajianId;
	}

	@Caption(value = "Kode Kajian")
	private Integer kdKajian;

	@NotNull(message = "Kd Kajian tidak boleh kosong")
	@Column(name = "KdKajian", nullable = false)
	public Integer getKdKajian() {
		return kdKajian;
	}

	public void setKdKajian(Integer kdKajian) {
		this.kdKajian = kdKajian;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectKategoryKajianFk")
	@NotNull(message = "Kd Kategory Kajian tidak boleh kosong")

	@Caption(value = "Object Kategory Kajian")
	private AsKepKategoryKajian kategoryKajian;

	public void setKategoryKajian(AsKepKategoryKajian kategoryKajian) {
		this.kategoryKajian = kategoryKajian;
	}

	public AsKepKategoryKajian getKategoryKajian() {
		return this.kategoryKajian;
	}

	@Column(name = "ObjectKategoryKajianFk", insertable = false, updatable = false, nullable = false)
	private Integer kategoryKajianId;

	public Integer getKategoryKajianId() {
		return kategoryKajianId;
	}

	public void setKategoryKajianId(Integer kategoryKajianId) {
		this.kategoryKajianId = kategoryKajianId;
	}

	@NotNull(message = "Nilai Normal tidak boleh kosong")
	@Column(name = "NilaiNormal", nullable = false, length = 50)
	@Caption(value = "Nilai Normal")
	private String nilaiNormal;

	public void setNilaiNormal(String nilaiNormal) {
		this.nilaiNormal = nilaiNormal;
	}

	public String getNilaiNormal() {
		return this.nilaiNormal;
	}

	@Caption(value = "QKajian")
	private Integer qKajian;

	@NotNull(message = "QKajian tidak boleh kosong")
	@Column(name = "QKajian", nullable = false)
	public Integer getqKajian() {
		return qKajian;
	}

	public void setqKajian(Integer qKajian) {
		this.qKajian = qKajian;
	}

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

	public Integer getId() {

		return id;
	}

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