Class SqlObjectProvider<T>
java.lang.Object
ru.vyarus.guicey.jdbi3.installer.repository.sql.SqlObjectProvider<T>
- Type Parameters:
T- sql proxy type
- All Implemented Interfaces:
jakarta.inject.Provider<T>
Factory re-implements
Jdbi.onDemand(Class) in order to create proxy, using transactional handler
(jdbi on-demand objects supposed to open-close connection on each call).
Proxy is not created immediately because during proxy creation config is created for each method and so if some global row mapper will be registered after this moment, method config will not know about it. Provider is created just before injector creation and all mappers are registered just after injector creation, so without laziness nothing would work as planned.
- Since:
- 13.09.2018
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SqlObjectProvider
-
-
Method Details
-
get
- Specified by:
getin interfacejakarta.inject.Provider<T>
-
isInitialized
public boolean isInitialized()Method used only for testing.- Returns:
- true if jdbi proxy created, false if not
-