73 lines
1.4 KiB
Java
73 lines
1.4 KiB
Java
package com.jasamedika.medifirst2000.entities;
|
|
|
|
// Generated Apr 27, 2016 3:58:51 PM by Hibernate Tools 3.4.0.CR1
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Embeddable;
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
|
@Embeddable
|
|
public class AgamaMId implements java.io.Serializable {
|
|
|
|
private short kdProfile;
|
|
private byte kdAgama;
|
|
|
|
public AgamaMId() {
|
|
}
|
|
|
|
public AgamaMId(short kdProfile, byte kdAgama) {
|
|
this.kdProfile = kdProfile;
|
|
this.kdAgama = kdAgama;
|
|
}
|
|
|
|
@NotNull(message="Kd Profile tidak boleh kosong")
|
|
@Column(name = "KdProfile", nullable = false)
|
|
public short getKdProfile() {
|
|
return this.kdProfile;
|
|
}
|
|
|
|
public void setKdProfile(short kdProfile) {
|
|
this.kdProfile = kdProfile;
|
|
}
|
|
|
|
@NotNull(message="Kd Agama tidak boleh kosong")
|
|
@Column(name = "KdAgama", nullable = false)
|
|
public byte getKdAgama() {
|
|
return this.kdAgama;
|
|
}
|
|
|
|
public void setKdAgama(byte kdAgama) {
|
|
this.kdAgama = kdAgama;
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
if (this == obj)
|
|
return true;
|
|
if (obj == null)
|
|
return false;
|
|
if (getClass() != obj.getClass())
|
|
return false;
|
|
AgamaMId other = (AgamaMId) obj;
|
|
if (kdAgama != other.kdAgama)
|
|
return false;
|
|
if (kdProfile != other.kdProfile)
|
|
return false;
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
final int prime = 31;
|
|
int result = 1;
|
|
result = prime * result + kdAgama;
|
|
result = prime * result + kdProfile;
|
|
return result;
|
|
}
|
|
|
|
|
|
}
|