org.springframework.data.mapping.context
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 - the PersistentEntity the context was created forP - the PersistentProperty the PersistentEntity 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:
- Serialized Form
MappingContextEvent
public MappingContextEvent(MappingContext<?,?> source,
E entity)
- Creates a new
MappingContextEvent for the given MappingContext and PersistentEntity.
- Parameters:
source - must not be null.entity - must not be null.
getPersistentEntity
public E getPersistentEntity()
- Returns the
PersistentEntity the event was created for.
- Returns:
wasEmittedBy
public boolean wasEmittedBy(MappingContext<?,?> context)
- Returns whether the
MappingContextEvent was triggered by the given MappingContext.
- Parameters:
context - the MappingContext that potentially created the event.
- Returns:
Copyright © 2013. All Rights Reserved.