public class UnitOfWorkAwareProxyFactory extends Object
A created proxy will be aware of the UnitOfWork
annotation
on the original class methods. The proxy will ensure an EntityManager is made
available to the current thread of execution.
Constructor and Description |
---|
UnitOfWorkAwareProxyFactory(EntityManagerBundle<?>... bundles) |
UnitOfWorkAwareProxyFactory(String name,
javax.persistence.EntityManagerFactory entityManagerFactory) |
Modifier and Type | Method and Description |
---|---|
<T> T |
create(Class<T> clazz)
Creates a new @UnitOfWork aware proxy of a class with the default constructor.
|
<T> T |
create(Class<T> clazz,
Class<?>[] constructorParamTypes,
Object[] constructorArguments)
Creates a new @UnitOfWork aware proxy of a class with a complex constructor.
|
<T> T |
create(Class<T> clazz,
Class<?> constructorParamType,
Object constructorArguments)
Creates a new @UnitOfWork aware proxy of a class with an one-parameter constructor.
|
public UnitOfWorkAwareProxyFactory(String name, javax.persistence.EntityManagerFactory entityManagerFactory)
public UnitOfWorkAwareProxyFactory(EntityManagerBundle<?>... bundles)
public <T> T create(Class<T> clazz)
T
- the type of the classclazz
- the specified class definitionpublic <T> T create(Class<T> clazz, Class<?> constructorParamType, Object constructorArguments)
T
- the type of the classclazz
- the specified class definitionconstructorParamType
- the type of the constructor parameterconstructorArguments
- the argument passed to the constructorpublic <T> T create(Class<T> clazz, Class<?>[] constructorParamTypes, Object[] constructorArguments)
T
- the type of the classclazz
- the specified class definitionconstructorParamTypes
- the types of the constructor parametersconstructorArguments
- the arguments passed to the constructorCopyright © 2016. All rights reserved.