Package cz.cvut.kbss.jopa.proxy.lazy
Class LazyLoadingProxyFactory
java.lang.Object
cz.cvut.kbss.jopa.proxy.lazy.LazyLoadingProxyFactory
Creates lazy-loading proxies for entity attributes.
Needs a UnitOfWork
to associate the proxies with, so that lazy loading can be executed when triggered.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Object
createProxy
(T entity, FieldSpecification<? super T, ?> fieldSpec) Creates a lazy loading proxy for the value of the specified attribute.
-
Constructor Details
-
LazyLoadingProxyFactory
-
-
Method Details
-
createProxy
Creates a lazy loading proxy for the value of the specified attribute.- Type Parameters:
T
- Entity type- Parameters:
entity
- Entity whose attribute will be proxiedfieldSpec
- Attribute to proxy- Returns:
- Lazy loading proxy associated with a persistence context
-