With this code, DbItemTableDescr#hashCode() and DbLogTableDescr#hashCode() can return same results. Don't You have to implement proper hashCode() and equals() for DbItemTableDescr and DbLogTableDescr?