public class FieldInterceptionHelper extends Object
EntityInstrumentationMetadata
should be used instead to query the
instrumentation state. EntityInstrumentationMetadata is accessed from the
EntityPersister
via the
EntityPersister.getInstrumentationMetadata()
method.Modifier and Type | Method and Description |
---|---|
static FieldInterceptor |
extractFieldInterceptor(Object object)
Assuming the given object is an enhanced entity, extract and return its interceptor.
|
static FieldInterceptor |
injectFieldInterceptor(Object entity,
String entityName,
Set uninitializedFieldNames,
SessionImplementor session)
Assuming the given object is an enhanced entity, inject a field interceptor.
|
static boolean |
isInstrumented(Class entityClass)
Utility to check to see if a given entity class is instrumented.
|
static boolean |
isInstrumented(Object object)
Utility to check to see if a given object is an instance of an instrumented class.
|
public static boolean isInstrumented(Class entityClass)
entityClass
- The entity class to checktrue
if it has been instrumented; false
otherwisepublic static boolean isInstrumented(Object object)
null
, the check returns false
object
- The object to checktrue
if it has been instrumented; false
otherwisepublic static FieldInterceptor extractFieldInterceptor(Object object)
null
if object is null
, or if the object was deemed to not be
instrumentedobject
- The object from which to extract the interceptornull
public static FieldInterceptor injectFieldInterceptor(Object entity, String entityName, Set uninitializedFieldNames, SessionImplementor session)
entity
- The entity instanceentityName
- The entity nameuninitializedFieldNames
- The names of any uninitialized fieldssession
- The sessionCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.