package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
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;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class MapLoginUserToPengendali
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapPengendaliToJabatan_S")
public class MapPengendaliToJabatan extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "ObjectPengendaliFk")
	@NotNull(message = "Kd Pengendali tidak boleh kosong")
	@Caption(value = "Object pengendali")
	private Pengendali pengendali;

	@Column(name = "ObjectPengendaliFk", insertable = false, updatable = false)
	private Integer pengendaliId;

	@ManyToOne
	@JoinColumn(name = "ObjectJabatanFk")
	@NotNull(message = "Jabatan Tidak Boleh Kosong")
	@Caption(value = "Jabatan")
	private Jabatan jabatan;

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

	public Pengendali getPengendali() {
		return pengendali;
	}

	public void setPengendali(Pengendali pengendali) {
		this.pengendali = pengendali;
	}

	public Integer getPengendaliId() {
		return pengendaliId;
	}

	public void setPengendaliId(Integer pengendaliId) {
		this.pengendaliId = pengendaliId;
	}

	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.mappengendalitojabatan_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.mappengendalitojabatan_m_id_seq", sequenceName = "public.mappengendalitojabatan_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {

		return id;
	}

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