Class MappingContextEvent<E extends PersistentEntity<?,P>,P extends PersistentProperty<P>>
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.data.mapping.context.MappingContextEvent<E,P>
- Type Parameters:
E- thePersistentEntitythe context was created forP- thePersistentPropertythePersistentEntityconsists of
- All Implemented Interfaces:
Serializable
public class MappingContextEvent<E extends PersistentEntity<?,P>,P extends PersistentProperty<P>>
extends ApplicationEvent
Base implementation of an
ApplicationEvent refering to a PersistentEntity.- Author:
- Oliver Gierke, Jon Brisbin
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns thePersistentEntitythe event was created for.booleanwasEmittedBy(MappingContext<?, ?> context) Returns whether theMappingContextEventwas triggered by the givenMappingContext.Methods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
MappingContextEvent
- Parameters:
source- must not be null.entity- must not be null.
-
-
Method Details
-
getPersistentEntity
Returns thePersistentEntitythe event was created for.- Returns:
-
wasEmittedBy
Returns whether theMappingContextEventwas triggered by the givenMappingContext.- Parameters:
context- theMappingContextthat potentially created the event.- Returns:
-