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 KomponenScoreNilaiNormal
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "KomponenScoreNilaiNormal_M")
public class KomponenScoreNilaiNormal extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectKomponenScoreFk")
	@NotNull(message = "Kd Komponen Score tidak boleh kosong")

	@Caption(value = "Object Komponen Score")
	private KomponenScore komponenScore;

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

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

	@Column(name = "ObjectKomponenScoreFk", insertable = false, updatable = false)
	private Integer komponenScoreId;

	/*
	 * @ManyToOne
	 * 
	 * @JoinColumn(name = "ObjectRangeNilaiFk")
	 * 
	 * @NotNull(message="Kd Range Nilai tidak boleh kosong")
	 * 
	 * @Caption(value="Object Range Nilai") private Range rangeNilai;
	 * 
	 * public void setRangeNilai(Range rangeNilai) { this.rangeNilai =
	 * rangeNilai; }
	 * 
	 * 
	 * public Range getRangeNilai(){ return this.rangeNilai; }
	 * 
	 * @Column(name = "ObjectRangeNilaiFk",
	 * insertable=false,updatable=false,nullable=false) private Integer
	 * rangeNilaiId;
	 */
	@NotNull(message = "Nilai Maksimum tidak boleh kosong")
	@Column(name = "NilaiMaksimum", nullable = false)
	@Caption(value = "Nilai Maksimum")
	private Double nilaiMaksimum;

	public void setNilaiMaksimum(Double nilaiMaksimum) {
		this.nilaiMaksimum = nilaiMaksimum;
	}

	public Double getNilaiMaksimum() {
		return this.nilaiMaksimum;
	}

	@NotNull(message = "Nilai Minimum tidak boleh kosong")
	@Column(name = "NilaiMinimum", nullable = false)
	@Caption(value = "Nilai Minimum")
	private Double nilaiMinimum;

	public void setNilaiMinimum(Double nilaiMinimum) {
		this.nilaiMinimum = nilaiMinimum;
	}

	public Double getNilaiMinimum() {
		return this.nilaiMinimum;
	}

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

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

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

	@NotNull(message = "QRange Nilai tidak boleh kosong")
	@Column(name = "QRangeNilai", nullable = false)
	@Caption(value = "QRange Nilai")
	private short qRangeNilai;

	public void setqRangeNilai(short qRangeNilai) {
		this.qRangeNilai = qRangeNilai;
	}

	public short getqRangeNilai() {
		return this.qRangeNilai;
	}

	@NotNull(message = "Range Nilai tidak boleh kosong")
	@Column(name = "RangeNilai", nullable = false, length = 50)
	@Caption(value = "Range Nilai")
	private String rangeNilai;

	public void setrangeNilai(String rangeNilai) {
		this.rangeNilai = rangeNilai;
	}

	public String getrangeNilai() {
		return this.rangeNilai;
	}

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

	public Integer getId() {

		return id;
	}

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