Package org.jdbi.v3.sqlobject
Class SqlObjectFactory
- java.lang.Object
-
- org.jdbi.v3.sqlobject.SqlObjectFactory
-
- All Implemented Interfaces:
ExtensionFactory,OnDemandExtensions.Factory
public class SqlObjectFactory extends Object implements ExtensionFactory, OnDemandExtensions.Factory
Creates implementations for SqlObject interfaces.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(Class<?> extensionType)<E> Eattach(Class<E> extensionType, HandleSupplier handle)Create a sql object of the specified type bound to this handle.Optional<Object>onDemand(Jdbi db, Class<?> extensionType, Class<?>... extraTypes)
-
-
-
Method Detail
-
accepts
public boolean accepts(Class<?> extensionType)
- Specified by:
acceptsin interfaceExtensionFactory
-
attach
public <E> E attach(Class<E> extensionType, HandleSupplier handle)
Create a sql object of the specified type bound to this handle. Any state changes to the handle, or the sql object, such as transaction status, closing it, etc, will apply to both the object and the handle.- Specified by:
attachin interfaceExtensionFactory- Parameters:
extensionType- the type of sql object to createhandle- the Handle instance to attach ths sql object to- Returns:
- the new sql object bound to this handle
-
-