Class BidirectionalSynchronizationEvent
java.lang.Object
io.hypersistence.optimizer.core.event.AbstractEvent
io.hypersistence.optimizer.hibernate.event.mapping.EntityMappingEvent
io.hypersistence.optimizer.hibernate.event.mapping.EntityAttributeMappingEvent
io.hypersistence.optimizer.hibernate.event.mapping.association.BidirectionalSynchronizationEvent
- All Implemented Interfaces:
Event,Serializable
The
BidirectionalSynchronizationEvent indicates that an entity attribute, mapped
as a bidirectional OneToMany or ManyToMany association
does not contain the addEntity(Entity entity) and removeEntity(Entity entity)
synchronization methods- Since:
- 1.3.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
ConstructorsConstructorDescriptionBidirectionalSynchronizationEvent(EntityMetadata entityMetadata, String entityAttribute, Class<?> otherEntityClass, boolean addMethodMissing, boolean removeMethodMissing) Instantiate the event using the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>Get theClassof the other side of the bidirectional association represented by theEntityAttributeMappingEvent.getEntityAttribute()attribute.Get theEvent.Priorityof thisEventbooleanCheck if theaddEntitymethod missing.booleanCheck if theremoveEntitymethod missing.Methods inherited from class io.hypersistence.optimizer.hibernate.event.mapping.EntityAttributeMappingEvent
getEntityAttributeMethods inherited from class io.hypersistence.optimizer.hibernate.event.mapping.EntityMappingEvent
getEntityClass, getEntityNameMethods inherited from class io.hypersistence.optimizer.core.event.AbstractEvent
getInfoUrl
-
Constructor Details
-
BidirectionalSynchronizationEvent
public BidirectionalSynchronizationEvent(EntityMetadata entityMetadata, String entityAttribute, Class<?> otherEntityClass, boolean addMethodMissing, boolean removeMethodMissing) Instantiate the event using the provided parameters.- Parameters:
entityMetadata- entity metadataentityAttribute- entity attributeotherEntityClass- the other end of this bidirectional associationaddMethodMissing- the addEntity method is missingremoveMethodMissing- the removeEntity method is missing
-
-
Method Details
-
getOtherEntityClass
Get theClassof the other side of the bidirectional association represented by theEntityAttributeMappingEvent.getEntityAttribute()attribute.- Returns:
- the
Classof the other side of the bidirectional association
-
isAddMethodMissing
public boolean isAddMethodMissing()Check if theaddEntitymethod missing.- Returns:
- the
addEntitymethod missing status
-
isRemoveMethodMissing
public boolean isRemoveMethodMissing()Check if theremoveEntitymethod missing.- Returns:
- the
removeEntitymethod missing status
-
getPriority
Get theEvent.Priorityof thisEvent- Returns:
- the
Event.Priorityof thisEvent
-
getDescription
-