diff -r be6383d38a3a -r fd29fd5a8e29 java/HrisniciSpameri/src/java/cz/frantovo/hrisniciSpameri/dto/Cil.java --- a/java/HrisniciSpameri/src/java/cz/frantovo/hrisniciSpameri/dto/Cil.java Sun Mar 01 01:08:24 2009 +0100 +++ b/java/HrisniciSpameri/src/java/cz/frantovo/hrisniciSpameri/dto/Cil.java Sun Mar 01 13:04:10 2009 +0100 @@ -65,4 +65,25 @@ public Cil() { } + + @Override + public boolean equals(Object obj) { + if (obj instanceof Cil) { + Cil c = (Cil) obj; + return c.getId() == getId(); + } else { + return false; + } + } + + @Override + public int hashCode() { + int hash = 5; + hash = 67 * hash + this.id; + hash = 67 * hash + (this.nazev != null ? this.nazev.hashCode() : 0); + hash = 67 * hash + (this.url != null ? this.url.hashCode() : 0); + hash = 67 * hash + (this.selekt != null ? this.selekt.hashCode() : 0); + hash = 67 * hash + (this.databaze != null ? this.databaze.hashCode() : 0); + return hash; + } }