org.sca4j.host.jpa
Interface EmfBuilder


public interface EmfBuilder

Abstraction for building entity manager factory instances for the specified persistence unit names.

Version:
$Revision$ $Date$

Method Summary
 javax.persistence.EntityManagerFactory build(java.lang.String unitName, java.lang.ClassLoader classLoader)
          Builds the entity manager factory.
 java.lang.Object getDelegate(java.lang.String unitName)
          Gets the underlying implementation of the entity manager factory.
 

Method Detail

build

javax.persistence.EntityManagerFactory build(java.lang.String unitName,
                                             java.lang.ClassLoader classLoader)
Builds the entity manager factory.

Parameters:
unitName - Persistence unit name.
classLoader - Classloader to load the persistence XML.
Returns:
Entity manager factory.
Throws:
EmfBuilderException - if an error occurs building the EMF

getDelegate

java.lang.Object getDelegate(java.lang.String unitName)
Gets the underlying implementation of the entity manager factory.

Parameters:
unitName - Name of the persistence unit name.
Returns:
Underlying entity manager factory implementation.


Copyright © 2008-2011 Service Symphony. All Rights Reserved.