probably not terribly important, but I guess you meant

 return 31 * getClass().getName().hashCode() + repository.hashCode(

But worse is that you don't have an equals. Defining hashCode
without equals make little sense to me.