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.tapestry5.internal.jpa
Class EntityManagerSourceImpl

    java.lang.Object
      org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl

All Implemented Interfaces:
  EntityManagerSource

    public class EntityManagerSourceImpl

extends java.lang.Object
implements EntityManagerSource

Constructor Summary
`EntityManagerSourceImpl(org.slf4j.Logger logger, Resource persistenceDescriptor, PersistenceUnitConfigurer packageNamePersistenceUnitConfigurer, java.util.Map<java.lang.String,PersistenceUnitConfigurer> configuration)`

Method Summary
`javax.persistence.EntityManager` | `create(java.lang.String persistenceUnitName)` Creates an `EntityManager` for the given persistence unit name.
`javax.persistence.EntityManagerFactory` | `getEntityManagerFactory(java.lang.String persistenceUnitName)` Gets the `EntityManagerFactory` for the given persistence unit name, creating it as necessary.
`java.util.List<javax.persistence.spi.PersistenceUnitInfo>` | `getPersistenceUnitInfos()` Get the list of PersistenceUnitInfo parsed from `persistence.xml`.``
`void` | `listenForShutdown(RegistryShutdownHub hub)`

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

Constructor Detail

### EntityManagerSourceImpl

    public EntityManagerSourceImpl(org.slf4j.Logger logger,
                                   @Symbol(value="tapestry.jpa.persistence-descriptor")
                                   Resource persistenceDescriptor,
                                   @Local
                                   PersistenceUnitConfigurer packageNamePersistenceUnitConfigurer,
                                   java.util.Map<java.lang.String,PersistenceUnitConfigurer> configuration)

Method Detail

### listenForShutdown

    @PostInjection
    public void listenForShutdown(RegistryShutdownHub hub)

### getEntityManagerFactory

    public javax.persistence.EntityManagerFactory getEntityManagerFactory(java.lang.String persistenceUnitName)

  Gets the `EntityManagerFactory` for the given persistence unit name, creating it as necessary.

  Specified by:
    `getEntityManagerFactory` in interface `EntityManagerSource`
  Parameters:
    `persistenceUnitName` - the name of a persistence unit as defined in `persistence.xml```
  Returns:
    EntityManagerFactory for the given persistence unit name

### create

    public javax.persistence.EntityManager create(java.lang.String persistenceUnitName)

  Description copied from interface: `EntityManagerSource`
  Creates an `EntityManager` for the given persistence unit name.

  Specified by:
    `create` in interface `EntityManagerSource`
  Parameters:
    `persistenceUnitName` - the name of a persistence unit as defined in `persistence.xml```
  Returns:
    EntityManager for the given persistence unit name

### getPersistenceUnitInfos

    public java.util.List<javax.persistence.spi.PersistenceUnitInfo> getPersistenceUnitInfos()

  Description copied from interface: `EntityManagerSource`
  Get the list of PersistenceUnitInfo parsed from `persistence.xml`.

  ``
  Specified by:
    `getPersistenceUnitInfos` in interface `EntityManagerSource`
  Returns:
    list of PersistenceUnitInfos

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 © 2003-2012 The Apache Software Foundation.