package alctail.entity; import java.io.Serializable; import javax.persistence.*; /** * The primary key class for the datadetail database table. * */ @Embeddable public class DatadetailPK implements Serializable { //default serial version id, required for serializable classes. private static final long serialVersionUID = 1L; private String id; private String sub; public DatadetailPK() { } public String getId() { return this.id; } public void setId(String id) { this.id = id; } public String getSub() { return this.sub; } public void setSub(String sub) { this.sub = sub; } public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof DatadetailPK)) { return false; } DatadetailPK castOther = (DatadetailPK)other; return this.id.equals(castOther.id) && this.sub.equals(castOther.sub); } public int hashCode() { final int prime = 31; int hash = 17; hash = hash * prime + this.id.hashCode(); hash = hash * prime + this.sub.hashCode(); return hash; } }