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 KomponenScore
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "KomponenScore_M")
public class KomponenScore extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectKomponenKlinisFk")

	@Caption(value = "Object Komponen Klinis")
	private KomponenKlinis komponenKlinis;

	public void setKomponenKlinis(KomponenKlinis komponenKlinis) {
		this.komponenKlinis = komponenKlinis;
	}

	public KomponenKlinis getKomponenKlinis() {
		return this.komponenKlinis;
	}

	@Column(name = "ObjectKomponenKlinisFk", insertable = false, updatable = false)
	private Integer komponenKlinisId;

	@NotNull(message = "Kd Komponen Score tidak boleh kosong")
	@Column(name = "KdKomponenScore", nullable = false)
	@Caption(value = "Kode Komponen Score")
	private short kdKomponenScore;

	public void setKdKomponenScore(short kdKomponenScore) {
		this.kdKomponenScore = kdKomponenScore;
	}

	public short getKdKomponenScore() {
		return this.kdKomponenScore;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectSatuanHasilFk")

	@Caption(value = "Object Satuan Hasil")
	private SatuanHasil satuanHasil;

	public void setSatuanHasil(SatuanHasil satuanHasil) {
		this.satuanHasil = satuanHasil;
	}

	public SatuanHasil getSatuanHasil() {
		return this.satuanHasil;
	}

	@Column(name = "ObjectSatuanHasilFk", insertable = false, updatable = false)
	private Integer satuanHasilId;

	@NotNull(message = "Komponen Score tidak boleh kosong")
	@Column(name = "KomponenScore", nullable = false, length = 30)
	@Caption(value = "Komponen Score")
	private String komponenScore;

	public void setKomponenScore(String komponenScore) {
		this.komponenScore = komponenScore;
	}

	public String getKomponenScore() {
		return this.komponenScore;
	}

	@NotNull(message = "No Urut tidak boleh kosong")
	@Column(name = "NoUrut", nullable = false)
	@Caption(value = "No Urut")
	private Byte noUrut;

	public void setNoUrut(Byte noUrut) {
		this.noUrut = noUrut;
	}

	public Byte getNoUrut() {
		return this.noUrut;
	}

	@NotNull(message = "QKomponen Score tidak boleh kosong")
	@Column(name = "QKomponenScore", nullable = false)
	@Caption(value = "QKomponen Score")
	private short qKomponenScore;

	public void setqKomponenScore(short qKomponenScore) {
		this.qKomponenScore = qKomponenScore;
	}

	public short getqKomponenScore() {
		return this.qKomponenScore;
	}

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

	public Integer getId() {

		return id;
	}

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