EntityInstrumentationMetadata (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.bytecode.spi
Interface EntityInstrumentationMetadata

All Known Implementing Classes:
  NonPojoInstrumentationMetadata

    public interface EntityInstrumentationMetadata

Encapsulates bytecode instrumentation information about a particular entity.

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?

Method Detail

### getEntityName

    String getEntityName()

  The name of the entity to which this metadata applies.

  Returns:
    The entity name

### isInstrumented

    boolean isInstrumented()

  Has the entity class been bytecode instrumented?

  Returns:
    `true` indicates the entity class is instrumented for Hibernate use; `false` indicates it is not

### injectInterceptor

    FieldInterceptor injectInterceptor(Object entity,
                                       String entityName,
                                       Set uninitializedFieldNames,
                                       SessionImplementor session)
                                       throws NotInstrumentedException

  Build and inject a field interceptor instance into the instrumented entity.

  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 `isInstrumented()` returns `false`

### extractInterceptor

    FieldInterceptor extractInterceptor(Object entity)
                                        throws NotInstrumentedException

  Extract the field interceptor instance from the instrumented entity.

  Parameters:
    `entity` - The entity from which to extract the interceptor
  Returns:
    The extracted interceptor
  Throws:
    `NotInstrumentedException` - Thrown if `isInstrumented()` returns `false`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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