package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import java.util.HashSet;
import java.util.Set;

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 AsKepKategoryKajian
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "AsKepKategoryKajian_M")
public class AsKepKategoryKajian extends BaseMaster {
	@NotNull(message = "Kategory Kajian tidak boleh kosong")
	@Column(name = "KategoryKajian", nullable = false, length = 50)
	@Caption(value = "Kategory Kajian")
	private String kategoryKajian;

	public void setKategoryKajian(String kategoryKajian) {
		this.kategoryKajian = kategoryKajian;
	}

	public String getKategoryKajian() {
		return this.kategoryKajian;
	}

	@Caption(value = "Kode Kategory Kajian")
	private Byte kdKategoryKajian;

	@NotNull(message = "Kd Kategory Kajian tidak boleh kosong")
	@Column(name = "KdKategoryKajian", nullable = false)
	public Byte getKdKategoryKajian() {
		return kdKategoryKajian;
	}

	public void setKdKategoryKajian(Byte kdKategoryKajian) {
		this.kdKategoryKajian = kdKategoryKajian;
	}

	@Caption(value = "QKategory Kajian")
	private Byte qKategoryKajian;

	public Byte getqKategoryKajian() {
		return qKategoryKajian;
	}

	public void setqKategoryKajian(Byte qKategoryKajian) {
		this.qKategoryKajian = qKategoryKajian;
	}

	/*
	 * @JsonManagedReference
	 * 
	 * @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
	 * mappedBy="kdkategorykajian") private Set<AsKepKajian> AsKepKajianSet =
	 * new HashSet<AsKepKajian>();
	 * 
	 * public Set<AsKepKajian> getAsKepKajianSet() { return AsKepKajianSet; }
	 * 
	 * public void setAsKepKajianSet(Set<AsKepKajian> asKepKajianSet) {
	 * AsKepKajianSet = asKepKajianSet; }
	 */

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

	public Integer getId() {

		return id;
	}

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