Skip to content

HyperJAXB3 Generating equals and hashCode methods

Laurent Schoelens edited this page May 17, 2024 · 2 revisions

Generating equals(...) and hashCode() methods

Although this is not directly required by the JPA specification, it is still recommended to have correct implementations of equals(...) and hashCode() methods in entity classes. JAXB uses the equals and hashCode plugins from JAXB2 Basics plugin package to generate these methods.

These plugins generate equals(...) and hashCode() methods. With Hyperjaxb3 you can configure, which equals and hash code strategies will be used TODO (default implementations are org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy and org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy).

Alternatively you can turn equals(...) and hashCode() generation off TODO.

Clone this wiki locally