Interface PojoRuntimeIntrospector
-
public interface PojoRuntimeIntrospector
A Pojo introspector used at runtime.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> PojoRawTypeIdentifier<? extends T>
detectEntityType(T entity)
Detect the type of a given entity instance.boolean
isIgnorableDataAccessThrowable(Throwable throwable)
static PojoRuntimeIntrospector
simple()
Object
unproxy(Object value)
-
-
-
Method Detail
-
detectEntityType
<T> PojoRawTypeIdentifier<? extends T> detectEntityType(T entity)
Detect the type of a given entity instance.- Type Parameters:
T
- The type of the entity.- Parameters:
entity
- An instance or proxy of T.- Returns:
- The identifier of the instance's type, or of its delegate object's type if the instance is a proxy.
May be
null
if the entity type is not known from this mapper, because it's neither indexed nor contained in an indexed type.
-
unproxy
Object unproxy(Object value)
- Parameters:
value
- the object to unproxy- Returns:
- if value is a proxy, unwraps it, otherwise works as a pass-through function.
-
isIgnorableDataAccessThrowable
boolean isIgnorableDataAccessThrowable(Throwable throwable)
- Parameters:
throwable
- AThrowable
thrown while accessing data on an entity: calling a getter, accessing a field, accessing the elements of a container, etc.- Returns:
true
if this exception should be ignored and the data should be assumed empty (null
, empty container, ...).false
if this exception should be propagated. Note this is currently only taken into account while performing reindexing resolution.
-
simple
static PojoRuntimeIntrospector simple()
- Returns:
- A simple
PojoRuntimeIntrospector
that relies on the object's class to return entity types, and assumes objects are not proxyfied.
-
-