maia_modificado/registro/.svn/pristine/14/1428a2b87309a49d50c2ffb2461...

67 lines
1.6 KiB
Plaintext
Executable File

package com.fp.armas.portal.model;
import java.io.Serializable;
import javax.persistence.*;
/**
* The primary key class for the TGENECANTON database table.
*
*/
@Embeddable
public class TgenecantonPK 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;
private String cantoncode;
public TgenecantonPK() {
}
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 boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof TgenecantonPK)) {
return false;
}
TgenecantonPK castOther = (TgenecantonPK)other;
return
this.countrycode.equals(castOther.countrycode)
&& this.provincecode.equals(castOther.provincecode)
&& this.cantoncode.equals(castOther.cantoncode);
}
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();
return hash;
}
}