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 enum
The 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 thetype
of 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_WRITER
andEntityProcessorContext.Type.CLASS_READER
context types.- Returns:
- entity class or
null
if the class is not available.
-
getField
Field getField()Get field to be processed. The field is available only forEntityProcessorContext.Type.PROPERTY_WRITER
andEntityProcessorContext.Type.PROPERTY_READER
context types.- Returns:
- field or
null
if 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_READER
context types.- Returns:
- method or
null
if 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.
-