package com.jasamedika.medifirst2000.vo;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;
import java.util.Date;
import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
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.vo.BaseMasterVO;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 *  class JenisDokumen
 * 
 * @author Generator
 */
//@Entity
//@Table(name = "JenisDokumen_M")
public class JenisDokumenVO extends BaseMasterVO {
	@Caption(value="Jenis Dokumen")
	private String jenisDokumen;

	public void setJenisDokumen(String jenisDokumen) {
		this.jenisDokumen = jenisDokumen;
	}

	@Column(name = "JenisDokumen", nullable = false , length = 50)
	public String getJenisDokumen(){
		return this.jenisDokumen;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectDepartemenFk")
	@NotNull(message="Object DepartemenVO Harus Diisi")
	@Caption(value="Object Departemen")
	private DepartemenVO departemen;

	public void setDepartemen(DepartemenVO departemen) {
		this.departemen = departemen;
	}

	@Column(name = "KdDepartemen", nullable = false , length = 1)
	public DepartemenVO getDepartemen(){
		return this.departemen;
	}

	@Column(name = "ObjectDepartemenFk", insertable=false,updatable=false)
	private Integer departemenId;

	@Caption(value="Kode Jenis Dokumen")
	private short kdJenisDokumen;

	public void setKdJenisDokumen(short kdJenisDokumen) {
		this.kdJenisDokumen = kdJenisDokumen;
	}

	@Column(name = "KdJenisDokumen", nullable = false )
	public short getKdJenisDokumen(){
		return this.kdJenisDokumen;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectJenisDokumenHeadFk")
	@Caption(value="Object Jenis DokumenVO Head")
	private JenisDokumenVO jenisDokumenHead;

	public void setJenisDokumenHead(JenisDokumenVO jenisDokumenHead) {
		this.jenisDokumenHead = jenisDokumenHead;
	}

	@Column(name = "KdJenisDokumenHead", nullable = true )
	public JenisDokumenVO getJenisDokumenHead(){
		return this.jenisDokumenHead;
	}

	@Column(name = "ObjectJenisDokumenHeadFk", insertable=false,updatable=false)
	private Integer jenisDokumenHeadId;

	@Caption(value="QJenis Dokumen")
	private short qJenisDokumen;

	public void setqJenisDokumen(short qJenisDokumen) {
		this.qJenisDokumen = qJenisDokumen;
	}

	@Column(name = "QJenisDokumen", nullable = false )
	public short getqJenisDokumen(){
		return this.qJenisDokumen;
	}
/*	//
	@OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="kdjenisdokumen")
	private Set<Dokumen> DokumenSet = new HashSet<Dokumen>();

	public Set<Dokumen> getDokumenSet() {
		return DokumenSet;
	}

	public void setDokumenSet(Set<Dokumen> dokumenSet) {
		DokumenSet = dokumenSet;
	}

	//
	@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "kdjenisdokumenhead")
	private Set<JenisDokumen> JenisDokumenSet = new HashSet<JenisDokumen>();

	
	public Set<JenisDokumen> getJenisDokumenSet() {
		return JenisDokumenSet;
	}

	public void setJenisDokumenSet(Set<JenisDokumen> jenisDokumenSet) {
		JenisDokumenSet = jenisDokumenSet;
	}*/

}

