package com.fp.armas.portal.model; import java.io.Serializable; import javax.persistence.*; /** * The primary key class for the TGENECITY database table. * */ @Embeddable public class TgenecityPK implements Serializable { //default serial version id, required for serializable classes. private static final long serialVersionUID = 1L; @Column(insertable=false, updatable=false) private String countrycode; @Column(insertable=false, updatable=false) private String provincecode; @Column(insertable=false, updatable=false) private String cantoncode; private String citycode; public TgenecityPK() { } public String getCountrycode() { return this.countrycode; } public void setCountrycode(String countrycode) { this.countrycode = countrycode; } public String getProvincecode() { return this.provincecode; } public void setProvincecode(String provincecode) { this.provincecode = provincecode; } public String getCantoncode() { return this.cantoncode; } public void setCantoncode(String cantoncode) { this.cantoncode = cantoncode; } public String getCitycode() { return this.citycode; } public void setCitycode(String citycode) { this.citycode = citycode; } public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TgenecityPK)) { return false; } TgenecityPK castOther = (TgenecityPK)other; return this.countrycode.equals(castOther.countrycode) && this.provincecode.equals(castOther.provincecode) && this.cantoncode.equals(castOther.cantoncode) && this.citycode.equals(castOther.citycode); } public int hashCode() { final int prime = 31; int hash = 17; hash = hash * prime + this.countrycode.hashCode(); hash = hash * prime + this.provincecode.hashCode(); hash = hash * prime + this.cantoncode.hashCode(); hash = hash * prime + this.citycode.hashCode(); return hash; } }