org.jboss.injection
Class PersistenceUnitHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
java.lang.Object
org.jboss.injection.PersistenceUnitHandler<X>
- All Implemented Interfaces:
- InjectionHandler<X>
public class PersistenceUnitHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
- extends Object
- implements InjectionHandler<X>
Searches bean class for all @Inject and create Injectors
- Version:
- $Revision: 82749 $
- Author:
- Bill Burke
Method Summary |
static void |
addPUDependency(String unitName,
InjectionContainer container)
|
static javax.persistence.EntityManagerFactory |
getEntityManagerFactory(javax.persistence.PersistenceUnit ref,
InjectionContainer container)
|
static javax.persistence.EntityManagerFactory |
getEntityManagerFactory(String unitName,
InjectionContainer container)
|
static Object |
getFactory(Class<?> type,
String unitName,
InjectionContainer container)
|
static org.jboss.jpa.deployment.ManagedEntityManagerFactory |
getManagedEntityManagerFactory(InjectionContainer container,
String unitName)
|
void |
handleClassAnnotations(Class<?> clazz,
InjectionContainer container)
|
void |
handleFieldAnnotations(Field field,
InjectionContainer container,
Map<AccessibleObject,Injector> injectors)
|
void |
handleMethodAnnotations(Method method,
InjectionContainer container,
Map<AccessibleObject,Injector> injectors)
|
void |
loadXml(X xml,
InjectionContainer container)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERROR_MESSAGE_FAILED_TO_RESOVLE_PU
public static final String ERROR_MESSAGE_FAILED_TO_RESOVLE_PU
- Contracted error message value, form may be checked from Integration Tests
- See Also:
- Constant Field Values
PersistenceUnitHandler
public PersistenceUnitHandler()
loadXml
public void loadXml(X xml,
InjectionContainer container)
- Specified by:
loadXml
in interface InjectionHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
handleClassAnnotations
public void handleClassAnnotations(Class<?> clazz,
InjectionContainer container)
- Specified by:
handleClassAnnotations
in interface InjectionHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
addPUDependency
public static void addPUDependency(String unitName,
InjectionContainer container)
throws NameNotFoundException
- Throws:
NameNotFoundException
getManagedEntityManagerFactory
public static org.jboss.jpa.deployment.ManagedEntityManagerFactory getManagedEntityManagerFactory(InjectionContainer container,
String unitName)
throws NameNotFoundException
- Throws:
NameNotFoundException
getEntityManagerFactory
public static javax.persistence.EntityManagerFactory getEntityManagerFactory(javax.persistence.PersistenceUnit ref,
InjectionContainer container)
throws NameNotFoundException
- Throws:
NameNotFoundException
getFactory
public static Object getFactory(Class<?> type,
String unitName,
InjectionContainer container)
throws NameNotFoundException
- Throws:
NameNotFoundException
getEntityManagerFactory
public static javax.persistence.EntityManagerFactory getEntityManagerFactory(String unitName,
InjectionContainer container)
throws NameNotFoundException
- Throws:
NameNotFoundException
handleMethodAnnotations
public void handleMethodAnnotations(Method method,
InjectionContainer container,
Map<AccessibleObject,Injector> injectors)
- Specified by:
handleMethodAnnotations
in interface InjectionHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
handleFieldAnnotations
public void handleFieldAnnotations(Field field,
InjectionContainer container,
Map<AccessibleObject,Injector> injectors)
- Specified by:
handleFieldAnnotations
in interface InjectionHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.