Spring Data Commons

org.springframework.data.mapping.event
Class MappingContextEvent<E extends PersistentEntity<?,P>,P extends PersistentProperty<P>>

java.lang.Object
  extended by java.util.EventObject
      extended by org.springframework.context.ApplicationEvent
          extended by org.springframework.data.mapping.event.MappingContextEvent<E,P>
Type Parameters:
E - the PersistentEntity the context was created for
P - 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

Constructor Summary
MappingContextEvent(E source)
          Creates a new MappingContextEvent for the given PersistentEntity.
MappingContextEvent(E source, TypeInformation<?> typeInformation)
          Deprecated. use MappingContextEvent(PersistentEntity) instead. Will be removed for 1.3.GA.
 
Method Summary
 E getPersistentEntity()
          Returns the PersistentEntity the event was created for.
 TypeInformation<?> getTypeInformation()
          Deprecated. use the TypeInformation available from getPersistentEntity() instead. Will be removed for 1.3.GA.
 
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappingContextEvent

public MappingContextEvent(E source)
Creates a new MappingContextEvent for the given PersistentEntity.

Parameters:
source - must not be null.

MappingContextEvent

@Deprecated
public MappingContextEvent(E source,
                                      TypeInformation<?> typeInformation)
Deprecated. use MappingContextEvent(PersistentEntity) instead. Will be removed for 1.3.GA.

Creates a new MappingContextEvent for the given PersistentEntity and TypeInformation.

Parameters:
source - must not be null.
typeInformation - must not be null.
Method Detail

getTypeInformation

@Deprecated
public TypeInformation<?> getTypeInformation()
Deprecated. use the TypeInformation available from getPersistentEntity() instead. Will be removed for 1.3.GA.

The TypeInformation the event was created for (usually the one derived from the underlying PersistentEntity).

Returns:

getPersistentEntity

public E getPersistentEntity()
Returns the PersistentEntity the event was created for.

Returns:

Spring Data Commons

Copyright © 2012. All Rights Reserved.