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 JenisAset
 * 
 * @author Generator
 */
//@Entity
//@Table(name = "JenisAset_M")
public class JenisAsetVO extends BaseMasterVO {
	@Caption(value = "Jenis Aset")
	private String jenisAset;

	public void setJenisAset(String jenisAset) {
		this.jenisAset = jenisAset;
	}

	@Column(name = "JenisAset", nullable = false, length = 50)
	public String getJenisAset() {
		return this.jenisAset;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectAccountFk")
	@Caption(value = "Object Account")
	private ChartOfAccountVO account;

	public void setAccount(ChartOfAccountVO account) {
		this.account = account;
	}

	@Column(name = "KdAccount", nullable = true)
	public ChartOfAccountVO getAccount() {
		return this.account;
	}

	@Column(name = "ObjectAccountFk", insertable = false, updatable = false)
	private Integer accountId;

	@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 Aset")
	private Byte kdJenisAset;

	public void setKdJenisAset(Byte kdJenisAset) {
		this.kdJenisAset = kdJenisAset;
	}

	@Column(name = "KdJenisAset", nullable = false)
	public Byte getKdJenisAset() {
		return this.kdJenisAset;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectJenisAsetHeadFk")
	@Caption(value = "Object Jenis Aset Head")
	private JenisAsetVO jenisAsetHead;

	public void setJenisAsetHead(JenisAsetVO jenisAsetHead) {
		this.jenisAsetHead = jenisAsetHead;
	}

	@Column(name = "KdJenisAsetHead", nullable = true)
	public JenisAsetVO getJenisAsetHead() {
		return this.jenisAsetHead;
	}

	@Column(name = "ObjectJenisAsetHeadFk", insertable = false, updatable = false)
	private Integer jenisAsetHeadId;

	@Caption(value = "QJenis Aset")
	private Byte qJenisAset;

	public void setqJenisAset(Byte qJenisAset) {
		this.qJenisAset = qJenisAset;
	}

	@Column(name = "QJenisAset", nullable = false)
	public Byte getqJenisAset() {
		return this.qJenisAset;
	}

/*	//
	@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "kdjenisasethead")
	private Set<JenisAset> JenisAsetSet = new HashSet<JenisAset>();

	public Set<JenisAset> getJenisAsetSet() {
		return JenisAsetSet;
	}

	public void setJenisAsetSet(Set<JenisAset> jenisAsetSet) {
		JenisAsetSet = jenisAsetSet;
	}

	//
	@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "kdjenisaset")
	private Set<KelompokAset> KelompokAsetSet = new HashSet<KelompokAset>();

	public Set<KelompokAset> getKelompokAsetSet() {
		return KelompokAsetSet;
	}

	public void setKelompokAsetSet(Set<KelompokAset> kelompokAsetSet) {
		KelompokAsetSet = kelompokAsetSet;
	}*/

}
