public class UnitOfWorkAwareProxyFactory extends Object
A created proxy will be aware of the UnitOfWork
annotation
on the original class methods and will open a Hibernate session with a transaction
around them.
Constructor and Description |
---|
UnitOfWorkAwareProxyFactory(HibernateBundle<?>... bundles) |
UnitOfWorkAwareProxyFactory(String name,
org.hibernate.SessionFactory sessionFactory) |
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.
|
UnitOfWorkAspect |
newAspect() |
UnitOfWorkAspect |
newAspect(Map<String,org.hibernate.SessionFactory> sessionFactories) |
public UnitOfWorkAwareProxyFactory(String name, org.hibernate.SessionFactory sessionFactory)
public UnitOfWorkAwareProxyFactory(HibernateBundle<?>... 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 constructorpublic UnitOfWorkAspect newAspect()
public UnitOfWorkAspect newAspect(Map<String,org.hibernate.SessionFactory> sessionFactories)
sessionFactories
- Copyright © 2019. All rights reserved.