@Test public void testGraphsWithDifferentTypesNotEqual() { final NamedEntityGraph graph1 = new NamedEntityGraph(EntityGraphType.LOAD, "graph"); final NamedEntityGraph graph2 = new NamedEntityGraph(EntityGraphType.FETCH, "graph"); assertNotEquals(graph1, graph2); assertNotEquals(graph1.hashCode(), graph2.hashCode()); }
@Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); }
NamedEntityGraph extends AbstractEntityGraph { @Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); } }
NamedEntityGraph extends AbstractEntityGraph { @Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); } NamedEntityGraph(EntityGraphType type, boolean optional, String name);  NamedEntityGraph(EntityGraphType type, String name);  NamedEntityGraph(String name); }
NamedEntityGraph extends AbstractEntityGraph { @Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); } NamedEntityGraph(EntityGraphType type, boolean optional, String name);  NamedEntityGraph(EntityGraphType type, String name);  NamedEntityGraph(String name); @Override String getEntityGraphName(); @Override final List<String> getEntityGraphAttributePaths(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
NamedEntityGraph extends AbstractEntityGraph { @Override public int hashCode() { return Objects.hash(name, getEntityGraphType(), isOptional()); } NamedEntityGraph(EntityGraphType type, boolean optional, String name);  NamedEntityGraph(EntityGraphType type, String name);  NamedEntityGraph(String name); @Override String getEntityGraphName(); @Override final List<String> getEntityGraphAttributePaths(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }