Class HibernateOrmRuntimeIntrospector
- java.lang.Object
-
- org.hibernate.search.mapper.orm.model.impl.HibernateOrmRuntimeIntrospector
-
- All Implemented Interfaces:
PojoRuntimeIntrospector
public class HibernateOrmRuntimeIntrospector extends Object implements PojoRuntimeIntrospector
- Author:
- Sanne Grinovero (C) 2011 Red Hat Inc.
-
-
Constructor Summary
Constructors Constructor Description HibernateOrmRuntimeIntrospector(HibernateOrmRuntimeIntrospectorTypeContextProvider typeContextProvider, org.hibernate.engine.spi.SharedSessionContractImplementor sessionImplementor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> PojoRawTypeIdentifier<? extends T>detectEntityType(T entity)Detect the type of a given entity instance.booleanisIgnorableDataAccessThrowable(Throwable throwable)Objectunproxy(Object value)
-
-
-
Constructor Detail
-
HibernateOrmRuntimeIntrospector
public HibernateOrmRuntimeIntrospector(HibernateOrmRuntimeIntrospectorTypeContextProvider typeContextProvider, org.hibernate.engine.spi.SharedSessionContractImplementor sessionImplementor)
-
-
Method Detail
-
detectEntityType
public <T> PojoRawTypeIdentifier<? extends T> detectEntityType(T entity)
Description copied from interface:PojoRuntimeIntrospectorDetect the type of a given entity instance.- Specified by:
detectEntityTypein interfacePojoRuntimeIntrospector- 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
nullif the entity type is not known from this mapper, because it's neither indexed nor contained in an indexed type.
-
unproxy
public Object unproxy(Object value)
- Specified by:
unproxyin interfacePojoRuntimeIntrospector- Parameters:
value- the object to unproxy- Returns:
- if value is a proxy, unwraps it, otherwise works as a pass-through function.
-
isIgnorableDataAccessThrowable
public boolean isIgnorableDataAccessThrowable(Throwable throwable)
- Specified by:
isIgnorableDataAccessThrowablein interfacePojoRuntimeIntrospector- Parameters:
throwable- AThrowablethrown while accessing data on an entity: calling a getter, accessing a field, accessing the elements of a container, etc.- Returns:
trueif this exception should be ignored and the data should be assumed empty (null, empty container, ...).falseif this exception should be propagated. Note this is currently only taken into account while performing reindexing resolution.
-
-