Class ManageableClassGenerator

java.lang.Object
cz.cvut.kbss.jopa.model.metamodel.gen.ManageableClassGenerator
All Implemented Interfaces:
PersistenceContextAwareClassGenerator

public class ManageableClassGenerator extends Object implements PersistenceContextAwareClassGenerator
Generates persistence context-aware classes that implement the Manageable interface.

Such classes have an additional attribute not inherited from the base entity class. This attribute's value is a reference to the persistence context to which an instance is attached. Manageable allows establishing and accessing this connection.

  • Constructor Details

    • ManageableClassGenerator

      public ManageableClassGenerator(Configuration config)
  • Method Details

    • generate

      public <T> Class<? extends T> generate(Class<T> entityClass)
      Description copied from interface: PersistenceContextAwareClassGenerator
      Generates a class extending the specified entityClass but able to be connected to a persistence context.
      Specified by:
      generate in interface PersistenceContextAwareClassGenerator
      Type Parameters:
      T - Entity type
      Parameters:
      entityClass - Entity class for which to generate the subclass
      Returns:
      Entity class subtype