Interface EntityProcessorContext
- All Known Implementing Classes:
EntityProcessorContextImpl
public interface EntityProcessorContext
Entity processor context providing details about entity processing.
The context contains the EntityProcessorContext.Type which distinguishes between types of context. There are various properties in the
context (accessible by getters) and some of them might be relevant only to specific context types.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe type of the context which describes in which entity processing phase theEntityProcessor.process(EntityProcessorContext)is triggered. -
Method Summary
-
Method Details
-
getType
EntityProcessorContext.Type getType()Get thetypeof this context.- Returns:
- entity processing context type.
-
getEntityClass
Class<?> getEntityClass()Get entity class to be processed. The entity class is available only forEntityProcessorContext.Type.CLASS_WRITERandEntityProcessorContext.Type.CLASS_READERcontext types.- Returns:
- entity class or
nullif the class is not available.
-
getField
Field getField()Get field to be processed. The field is available only forEntityProcessorContext.Type.PROPERTY_WRITERandEntityProcessorContext.Type.PROPERTY_READERcontext types.- Returns:
- field or
nullif the field is not available.
-
getMethod
Method getMethod()Get method to be processed. The method is available forEntityProcessorContext.Type.PROPERTY_WRITER,EntityProcessorContext.Type.PROPERTY_READER,EntityProcessorContext.Type.METHOD_WRITER,EntityProcessorContext.Type.METHOD_READERcontext types.- Returns:
- method or
nullif the method is not available.
-
getEntityGraph
EntityGraph getEntityGraph()Get entity graph to be modified by the processing. The entity graph is available for all context types.- Returns:
- entity graph.
-