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
- thePersistentEntity
the context was created forP
- thePersistentProperty
thePersistentEntity
consists 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
-
Method Summary
Modifier and TypeMethodDescriptionReturns thePersistentEntity
the event was created for.boolean
wasEmittedBy
(MappingContext<?, ?> context) Returns whether theMappingContextEvent
was triggered by the givenMappingContext
.Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods 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 thePersistentEntity
the event was created for.- Returns:
-
wasEmittedBy
Returns whether theMappingContextEvent
was triggered by the givenMappingContext
.- Parameters:
context
- theMappingContext
that potentially created the event.- Returns:
-