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.apache.cayenne.jpa.instrument
Class InstrumentingUnit

    java.lang.Object
      org.apache.cayenne.jpa.JpaUnit
          org.apache.cayenne.jpa.instrument.InstrumentingUnit

All Implemented Interfaces:
  javax.persistence.spi.PersistenceUnitInfo

    public class InstrumentingUnit

extends JpaUnit

A unit that loads all transformers into a shared Instrumentation instance.

Author:
  Andrus Adamchik

Field Summary
`protected org.apache.commons.logging.Log` | `logger`

Fields inherited from class org.apache.cayenne.jpa.JpaUnit
`classLoader, description, excludeUnlistedClasses, jarFileUrls, managedClassNames, mappingFileNames, persistenceUnitName, persistenceUnitRootUrl, properties`

Constructor Summary
`InstrumentingUnit()`

Method Summary
`void` | `addTransformer(javax.persistence.spi.ClassTransformer transformer)` Adds a `ClassTransformer` to the persistence unit.
`protected org.apache.commons.logging.Log` | `getLogger()`

Methods inherited from class org.apache.cayenne.jpa.JpaUnit
`addJarFileUrl, addManagedClassName, addMappingFileName, addProperties, excludeUnlistedClasses, getClassLoader, getDescription, getJarFileUrls, getJtaDataSource, getManagedClassNames, getMappingFileNames, getNewTempClassLoader, getNonJtaDataSource, getPersistenceProviderClassName, getPersistenceUnitName, getPersistenceUnitRootUrl, getProperties, getTransactionType, putProperty, setClassLoader, setDefaultClassLoader, setDescription, setExcludeUnlistedClasses, setPersistenceUnitName, setPersistenceUnitRootUrl`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    protected org.apache.commons.logging.Log logger

Constructor Detail

### InstrumentingUnit

    public InstrumentingUnit()

Method Detail

### addTransformer

    public void addTransformer(javax.persistence.spi.ClassTransformer transformer)

  Description copied from class: `JpaUnit`
  Adds a `ClassTransformer` to the persistence unit.

  ### JPA Specification, 7.1.4:

  Add a transformer supplied by the provider that will be called for every new class definition or class redefinition that gets loaded by the loader returned by the PersistenceInfo.getClassLoader method. The transformer has no effect on the result returned by the PersistenceInfo.getTempClassLoader method. Classes are only transformed once within the same classloading scope, regardless of how many persistence units they may be a part of.

  Specified by:
    `addTransformer` in interface `javax.persistence.spi.PersistenceUnitInfo`
  Specified by:
    `addTransformer` in class `JpaUnit`
  Parameters:
    `transformer` - A provider-supplied transformer that the Container invokes at class-(re)definition time

### getLogger

    protected org.apache.commons.logging.Log getLogger()

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-2008 Apache Cayenne. All Rights Reserved.