org.hibernate.tuple.entity
Class NonPojoInstrumentationMetadata

java.lang.Object
  extended by org.hibernate.tuple.entity.NonPojoInstrumentationMetadata
All Implemented Interfaces:
EntityInstrumentationMetadata

public class NonPojoInstrumentationMetadata
extends Object
implements EntityInstrumentationMetadata


Constructor Summary
NonPojoInstrumentationMetadata(String entityName)
           
 
Method Summary
 FieldInterceptor extractInterceptor(Object entity)
          Extract the field interceptor instance from the instrumented entity.
 String getEntityName()
          The name of the entity to which this metadata applies.
 FieldInterceptor injectInterceptor(Object entity, String entityName, Set uninitializedFieldNames, SessionImplementor session)
          Build and inject a field interceptor instance into the instrumented entity.
 boolean isInstrumented()
          Has the entity class been bytecode instrumented?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonPojoInstrumentationMetadata

public NonPojoInstrumentationMetadata(String entityName)
Method Detail

getEntityName

public String getEntityName()
Description copied from interface: EntityInstrumentationMetadata
The name of the entity to which this metadata applies.

Specified by:
getEntityName in interface EntityInstrumentationMetadata
Returns:
The entity name

isInstrumented

public boolean isInstrumented()
Description copied from interface: EntityInstrumentationMetadata
Has the entity class been bytecode instrumented?

Specified by:
isInstrumented in interface EntityInstrumentationMetadata
Returns:
true indicates the entity class is instrumented for Hibernate use; false indicates it is not

extractInterceptor

public FieldInterceptor extractInterceptor(Object entity)
                                    throws NotInstrumentedException
Description copied from interface: EntityInstrumentationMetadata
Extract the field interceptor instance from the instrumented entity.

Specified by:
extractInterceptor in interface EntityInstrumentationMetadata
Parameters:
entity - The entity from which to extract the interceptor
Returns:
The extracted interceptor
Throws:
NotInstrumentedException - Thrown if EntityInstrumentationMetadata.isInstrumented() returns false

injectInterceptor

public FieldInterceptor injectInterceptor(Object entity,
                                          String entityName,
                                          Set uninitializedFieldNames,
                                          SessionImplementor session)
                                   throws NotInstrumentedException
Description copied from interface: EntityInstrumentationMetadata
Build and inject a field interceptor instance into the instrumented entity.

Specified by:
injectInterceptor in interface EntityInstrumentationMetadata
Parameters:
entity - The entity into which built interceptor should be injected
entityName - The name of the entity
uninitializedFieldNames - The name of fields marked as lazy
session - The session to which the entity instance belongs.
Returns:
The built and injected interceptor
Throws:
NotInstrumentedException - Thrown if EntityInstrumentationMetadata.isInstrumented() returns false


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.