package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
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;

@Entity
@Table(name = "KomponenIndex_M")
public class KomponenIndex extends BaseMaster {

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectJenisKomponenIndexFk")
	@NotNull(message = "Kd Jenis Komponen Index tidak boleh kosong")
	@Caption(value = "Object Jenis Komponen Index")
	private JenisKomponenIndex jenisKomponenIndex;

	@Column(name = "ObjectJenisKomponenIndexFk", insertable = false, updatable = false)
	private Integer jenisKomponenIndexId;

	@NotNull(message = "Kd Komponen Index tidak boleh kosong")
	@Column(name = "KdKomponenIndex", nullable = false, length = 2)
	@Caption(value = "Kode Komponen Index")
	private String kdKomponenIndex;

	@NotNull(message = "Komponen Index tidak boleh kosong")
	@Column(name = "KomponenIndex", nullable = false, length = 50)
	@Caption(value = "Komponen Index")
	private String komponenIndex;

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

	@NotNull(message = "QKomponen Index tidak boleh kosong")
	@Column(name = "QKomponenIndex", nullable = false)
	@Caption(value = "QKomponen Index")
	private Byte qKomponenIndex;

	@Column(name = "NilaiStandar", nullable = true)
	@Caption(value = "Nilai Standar")
	private Integer nilaiStandar;

	@Column(name = "FactorRate")
	@Caption(value = "Factor Rate")
	private Float factorRate;

	@Column(name = "OperatorFactorRate")
	@Caption(value = "Operator Factor Rate")
	private String operatorFactorRate;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectPendidikanFk")
	@Caption(value = "Kd Pendidikan")
	private Pendidikan pendidikan;

	@Column(name = "ObjectPendidikanFk", insertable = false, updatable = false, nullable = true)
	private Integer pendidikanId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectJabatanFk")
	@Caption(value = "Jabatan")
	private Jabatan jabatan;

	@Column(name = "ObjectJabatanFk", insertable = false, updatable = false, nullable = true)
	private Integer jabatanId;

	public JenisKomponenIndex getJenisKomponenIndex() {
		return jenisKomponenIndex;
	}

	public void setJenisKomponenIndex(JenisKomponenIndex jenisKomponenIndex) {
		this.jenisKomponenIndex = jenisKomponenIndex;
	}

	public Integer getJenisKomponenIndexId() {
		return jenisKomponenIndexId;
	}

	public void setJenisKomponenIndexId(Integer jenisKomponenIndexId) {
		this.jenisKomponenIndexId = jenisKomponenIndexId;
	}

	public String getKdKomponenIndex() {
		return kdKomponenIndex;
	}

	public void setKdKomponenIndex(String kdKomponenIndex) {
		this.kdKomponenIndex = kdKomponenIndex;
	}

	public String getKomponenIndex() {
		return komponenIndex;
	}

	public void setKomponenIndex(String komponenIndex) {
		this.komponenIndex = komponenIndex;
	}

	public Byte getNoUrut() {
		return noUrut;
	}

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

	public Byte getqKomponenIndex() {
		return qKomponenIndex;
	}

	public void setqKomponenIndex(Byte qKomponenIndex) {
		this.qKomponenIndex = qKomponenIndex;
	}

	public Integer getNilaiStandar() {
		return nilaiStandar;
	}

	public void setNilaiStandar(Integer nilaiStandar) {
		this.nilaiStandar = nilaiStandar;
	}

	public Float getFactorRate() {
		return factorRate;
	}

	public void setFactorRate(Float factorRate) {
		this.factorRate = factorRate;
	}

	public String getOperatorFactorRate() {
		return operatorFactorRate;
	}

	public void setOperatorFactorRate(String operatorFactorRate) {
		this.operatorFactorRate = operatorFactorRate;
	}

	public Pendidikan getPendidikan() {
		return pendidikan;
	}

	public void setPendidikan(Pendidikan pendidikan) {
		this.pendidikan = pendidikan;
	}

	public Integer getPendidikanId() {
		return pendidikanId;
	}

	public void setPendidikanId(Integer pendidikanId) {
		this.pendidikanId = pendidikanId;
	}

	public Jabatan getJabatan() {
		return jabatan;
	}

	public void setJabatan(Jabatan jabatan) {
		this.jabatan = jabatan;
	}

	public Integer getJabatanId() {
		return jabatanId;
	}

	public void setJabatanId(Integer jabatanId) {
		this.jabatanId = jabatanId;
	}

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

	public Integer getId() {
		return id;
	}

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

}
