Fabric3 JPA/Hibernate Extension

org.fabric3.jpa.runtime.emf
Interface EntityManagerFactoryCache

All Known Implementing Classes:
DefaultEntityManagerFactoryCache

public interface EntityManagerFactoryCache

A cache of EntityManagerFactory instances.

Version:
$Rev: 11083 $ $Date: 2012-06-21 10:38:50 +0000 (Thu, 21 Jun 2012) $

Method Summary
 javax.persistence.EntityManagerFactory get(String unitName)
          Returns the EntityManagerFactory for the given persistence unit name
 void put(URI uri, String unitName, javax.persistence.EntityManagerFactory factory)
          Caches an EntityManagerFactory.
 

Method Detail

get

javax.persistence.EntityManagerFactory get(String unitName)
Returns the EntityManagerFactory for the given persistence unit name

Parameters:
unitName - the persistence unit name
Returns:
the EntityManagerFactory or null if one has not been created

put

void put(URI uri,
         String unitName,
         javax.persistence.EntityManagerFactory factory)
         throws JpaResolutionException
Caches an EntityManagerFactory.

Parameters:
uri - the URI of the contribution the persistence unit is defined in
unitName - the persistence unit name
factory - the EntityManagerFactory to cache
Throws:
JpaResolutionException - if there is an error caching the EntityManagerFactory

Fabric3 JPA/Hibernate Extension

Copyright © 2007-2012 Metaform Systems.