Class EqualsHashCodeEvent
java.lang.Object
io.hypersistence.optimizer.core.event.AbstractEvent
io.hypersistence.optimizer.hibernate.event.mapping.EntityMappingEvent
io.hypersistence.optimizer.hibernate.event.mapping.equality.EqualsHashCodeEvent
- All Implemented Interfaces:
Event,Serializable
The
EqualsHashCodeEvent indicates that an entity does not define
proper Object.equals(Object) and Object.hashCode() methods
that provide the equivalence relation properties:
- Reflexivity
- Symmetry
- Transitivity
- Consistency
equals and hashCode yield the same result no matter the
JPA entity state change (New, Managed, Detached, Removed).- Since:
- 2.5.0
- Author:
- Vlad Mihalcea
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.hypersistence.optimizer.core.event.Event
Event.Priority -
Constructor Summary
ConstructorsConstructorDescriptionEqualsHashCodeEvent(EntityMetadata entityMetadata, String entityStateTransitionMethodName) Instantiate the event using the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionThe entity state transition method name that was called when the entity was found to be already managed.Get theEvent.Priorityof thisEventMethods inherited from class io.hypersistence.optimizer.hibernate.event.mapping.EntityMappingEvent
getEntityClass, getEntityNameMethods inherited from class io.hypersistence.optimizer.core.event.AbstractEvent
getInfoUrl
-
Constructor Details
-
EqualsHashCodeEvent
Instantiate the event using the provided parameters.- Parameters:
entityMetadata- entity metadataentityStateTransitionMethodName- the entity state transition method name
-
-
Method Details
-
getEntityStateTransitionMethodName
The entity state transition method name that was called when the entity was found to be already managed.- Returns:
- entity state transition method name that was called
-
getPriority
Get theEvent.Priorityof thisEvent- Returns:
- the
Event.Priorityof thisEvent
-
getDescription
-