133 lines
3.5 KiB
Java
133 lines
3.5 KiB
Java
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.JsonIgnoreProperties;
|
|
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;
|
|
|
|
@Entity
|
|
@Table(name = "Kecamatan_M")
|
|
public class Kecamatan extends BaseMaster {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.kecamatan_m_id_seq")
|
|
@javax.persistence.SequenceGenerator(name = "public.kecamatan_m_id_seq", sequenceName = "public.kecamatan_m_id_seq", allocationSize = 1)
|
|
@Column(name = "id")
|
|
protected Integer id;
|
|
|
|
@NotNull(message = "Kd Kecamatan tidak boleh kosong")
|
|
@Column(name = "KdKecamatan", nullable = false)
|
|
@Caption(value = "Kode Kecamatan")
|
|
private Integer kdKecamatan;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "ObjectKotaKabupatenFk")
|
|
@NotNull(message = "Kd Kota Kabupaten tidak boleh kosong")
|
|
@Caption(value = "Object Kota Kabupaten")
|
|
private KotaKabupaten kotaKabupaten;
|
|
|
|
@Column(name = "ObjectKotaKabupatenFk", insertable = false, updatable = false)
|
|
private Integer kotaKabupatenId;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "ObjectPropinsiFk")
|
|
@NotNull(message = "Kd Propinsi tidak boleh kosong")
|
|
@Caption(value = "Object Propinsi")
|
|
private Propinsi propinsi;
|
|
|
|
@Column(name = "ObjectPropinsiFk", insertable = false, updatable = false, nullable = false)
|
|
private Integer propinsiId;
|
|
|
|
@NotNull(message = "Nama Kecamatan tidak boleh kosong")
|
|
@Column(name = "NamaKecamatan", nullable = false, length = 50)
|
|
@Caption(value = "Nama Kecamatan")
|
|
private String namaKecamatan;
|
|
|
|
@NotNull(message = "QKecamatan tidak boleh kosong")
|
|
@Column(name = "QKecamatan", nullable = false)
|
|
@Caption(value = "QKecamatan")
|
|
private Integer qKecamatan;
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public Integer getKdKecamatan() {
|
|
return kdKecamatan;
|
|
}
|
|
|
|
public void setKdKecamatan(Integer kdKecamatan) {
|
|
this.kdKecamatan = kdKecamatan;
|
|
}
|
|
|
|
public KotaKabupaten getKotaKabupaten() {
|
|
return kotaKabupaten;
|
|
}
|
|
|
|
public void setKotaKabupaten(KotaKabupaten kotaKabupaten) {
|
|
this.kotaKabupaten = kotaKabupaten;
|
|
}
|
|
|
|
public Integer getKotaKabupatenId() {
|
|
return kotaKabupatenId;
|
|
}
|
|
|
|
public void setKotaKabupatenId(Integer kotaKabupatenId) {
|
|
this.kotaKabupatenId = kotaKabupatenId;
|
|
}
|
|
|
|
public Propinsi getPropinsi() {
|
|
return propinsi;
|
|
}
|
|
|
|
public void setPropinsi(Propinsi propinsi) {
|
|
this.propinsi = propinsi;
|
|
}
|
|
|
|
public Integer getPropinsiId() {
|
|
return propinsiId;
|
|
}
|
|
|
|
public void setPropinsiId(Integer propinsiId) {
|
|
this.propinsiId = propinsiId;
|
|
}
|
|
|
|
public String getNamaKecamatan() {
|
|
return namaKecamatan;
|
|
}
|
|
|
|
public void setNamaKecamatan(String namaKecamatan) {
|
|
this.namaKecamatan = namaKecamatan;
|
|
}
|
|
|
|
public Integer getqKecamatan() {
|
|
return qKecamatan;
|
|
}
|
|
|
|
public void setqKecamatan(Integer qKecamatan) {
|
|
this.qKecamatan = qKecamatan;
|
|
}
|
|
|
|
} |