@Test public void hashCodeForwardsCall() { Assert.assertEquals(user.hashCode(), this.type.hashCode(user)); Assert.assertEquals(0, this.type.hashCode("str")); }
@Override public int hashCode(Object x) throws HibernateException { if (User.class.isInstance(x)) { User reference = (User) x; return reference.hashCode(); } return 0; }
UserType implements org.hibernate.usertype.UserType { @Override public int hashCode(Object x) throws HibernateException { if (User.class.isInstance(x)) { User reference = (User) x; return reference.hashCode(); } return 0; } }
UserType implements org.hibernate.usertype.UserType { @Override public int hashCode(Object x) throws HibernateException { if (User.class.isInstance(x)) { User reference = (User) x; return reference.hashCode(); } return 0; }  }
UserType implements org.hibernate.usertype.UserType { @Override public int hashCode(Object x) throws HibernateException { if (User.class.isInstance(x)) { User reference = (User) x; return reference.hashCode(); } return 0; }  @Override int[] sqlTypes(); @Override Class<?> returnedClass(); @Override boolean equals(Object x, Object y); @Override int hashCode(Object x); @Override Object nullSafeGet(ResultSet rs, String[] names, Object owner); @Override void nullSafeSet(PreparedStatement st, Object value, int index); @Override Object deepCopy(Object value); @Override boolean isMutable(); @Override Serializable disassemble(Object value); @Override Object assemble(Serializable cached, Object owner); @Override Object replace(Object original, Object target, Object owner); }
UserType implements org.hibernate.usertype.UserType { @Override public int hashCode(Object x) throws HibernateException { if (User.class.isInstance(x)) { User reference = (User) x; return reference.hashCode(); } return 0; }  @Override int[] sqlTypes(); @Override Class<?> returnedClass(); @Override boolean equals(Object x, Object y); @Override int hashCode(Object x); @Override Object nullSafeGet(ResultSet rs, String[] names, Object owner); @Override void nullSafeSet(PreparedStatement st, Object value, int index); @Override Object deepCopy(Object value); @Override boolean isMutable(); @Override Serializable disassemble(Object value); @Override Object assemble(Serializable cached, Object owner); @Override Object replace(Object original, Object target, Object owner);  }