Class InternalJdbiBinder
- java.lang.Object
-
- org.jdbi.v3.guice.internal.InternalJdbiBinder
-
- All Implemented Interfaces:
JdbiBinder
public final class InternalJdbiBinder extends java.lang.Object implements JdbiBinder
Exposes binders for all aspects of JDBI objects.
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.inject.multibindings.MapBinder<java.lang.Class<?>,java.lang.String>arrayTypeBinderprivate com.google.inject.multibindings.MapBinder<QualifiedType<?>,Codec<?>>codecBinderprivate com.google.inject.multibindings.Multibinder<ColumnMapper<?>>columnMapperBinderprivate com.google.inject.multibindings.Multibinder<GuiceJdbiCustomizer>customizerBinderprivate com.google.inject.multibindings.Multibinder<JdbiPlugin>pluginBinderprivate com.google.inject.multibindings.MapBinder<QualifiedType<?>,ColumnMapper<?>>qualifiedColumnMapperBinderprivate com.google.inject.multibindings.MapBinder<java.lang.reflect.Type,RowMapper<?>>qualifiedRowMapperBinderprivate com.google.inject.multibindings.Multibinder<RowMapper<?>>rowMapperBinder
-
Constructor Summary
Constructors Modifier Constructor Description privateInternalJdbiBinder(com.google.inject.Binder binder)privateInternalJdbiBinder(com.google.inject.Binder binder, java.lang.Class<? extends java.lang.annotation.Annotation> a)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.inject.binder.LinkedBindingBuilder<java.lang.String>bindArrayType(java.lang.Class<?> arrayType)Creates a new binding for a SQL array type.com.google.inject.binder.LinkedBindingBuilder<Codec<?>>bindCodec(java.lang.reflect.Type type)Creates a new binding for aCodecusing aType.com.google.inject.binder.LinkedBindingBuilder<Codec<?>>bindCodec(GenericType<?> genericType)Creates a new binding for aCodecusing aGenericType.com.google.inject.binder.LinkedBindingBuilder<Codec<?>>bindCodec(QualifiedType<?> qualifiedType)Creates a new binding for aCodecusing aQualifiedType.com.google.inject.binder.LinkedBindingBuilder<ColumnMapper<?>>bindColumnMapper()Creates a new binding for aColumnMapper.com.google.inject.binder.LinkedBindingBuilder<ColumnMapper<?>>bindColumnMapper(java.lang.reflect.Type type)Creates a new binding for aColumnMapperusing aType.com.google.inject.binder.LinkedBindingBuilder<ColumnMapper<?>>bindColumnMapper(GenericType<?> genericType)Creates a new binding for aColumnMapperusing aGenericType.com.google.inject.binder.LinkedBindingBuilder<ColumnMapper<?>>bindColumnMapper(QualifiedType<?> qualifiedType)Creates a new binding for aColumnMapperusing aQualifiedType.com.google.inject.binder.LinkedBindingBuilder<GuiceJdbiCustomizer>bindCustomizer()Creates a new binding for aGuiceJdbiCustomizer.com.google.inject.binder.LinkedBindingBuilder<JdbiPlugin>bindPlugin()Creates a new binding for aJdbiPlugin.com.google.inject.binder.LinkedBindingBuilder<RowMapper<?>>bindRowMapper()Creates a new binding for aRowMapper.com.google.inject.binder.LinkedBindingBuilder<RowMapper<?>>bindRowMapper(java.lang.reflect.Type type)Creates a new binding for aRowMapperusing aType.com.google.inject.binder.LinkedBindingBuilder<RowMapper<?>>bindRowMapper(GenericType<?> genericType)Creates a new binding for aRowMapperusing aGenericType.static InternalJdbiBinderjdbiBinder(com.google.inject.Binder binder)Creates a new binder for Jdbi related elements.static InternalJdbiBinderjdbiBinder(com.google.inject.Binder binder, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jdbi.v3.guice.JdbiBinder
jdbiBinder
-
-
-
-
Field Detail
-
rowMapperBinder
private final com.google.inject.multibindings.Multibinder<RowMapper<?>> rowMapperBinder
-
qualifiedRowMapperBinder
private final com.google.inject.multibindings.MapBinder<java.lang.reflect.Type,RowMapper<?>> qualifiedRowMapperBinder
-
columnMapperBinder
private final com.google.inject.multibindings.Multibinder<ColumnMapper<?>> columnMapperBinder
-
qualifiedColumnMapperBinder
private final com.google.inject.multibindings.MapBinder<QualifiedType<?>,ColumnMapper<?>> qualifiedColumnMapperBinder
-
codecBinder
private final com.google.inject.multibindings.MapBinder<QualifiedType<?>,Codec<?>> codecBinder
-
arrayTypeBinder
private final com.google.inject.multibindings.MapBinder<java.lang.Class<?>,java.lang.String> arrayTypeBinder
-
pluginBinder
private final com.google.inject.multibindings.Multibinder<JdbiPlugin> pluginBinder
-
customizerBinder
private final com.google.inject.multibindings.Multibinder<GuiceJdbiCustomizer> customizerBinder
-
-
Method Detail
-
jdbiBinder
public static InternalJdbiBinder jdbiBinder(com.google.inject.Binder binder)
Creates a new binder for Jdbi related elements.
-
jdbiBinder
public static InternalJdbiBinder jdbiBinder(com.google.inject.Binder binder, java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
-
bindRowMapper
public com.google.inject.binder.LinkedBindingBuilder<RowMapper<?>> bindRowMapper()
Description copied from interface:JdbiBinderCreates a new binding for aRowMapper.jdbiBinder.bindRowMapper().to(FancyDataTypeMapper.class).in(Scopes.SINGLETON); jdbiBinder.bindRowMapper().toInstance(new BoringDataTypeMapper()).in(Scopes.SINGLETON);
Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindRowMapperin interfaceJdbiBinder
-
bindRowMapper
public com.google.inject.binder.LinkedBindingBuilder<RowMapper<?>> bindRowMapper(GenericType<?> genericType)
Description copied from interface:JdbiBinderCreates a new binding for aRowMapperusing aGenericType.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindRowMapperin interfaceJdbiBinder
-
bindRowMapper
public com.google.inject.binder.LinkedBindingBuilder<RowMapper<?>> bindRowMapper(java.lang.reflect.Type type)
Description copied from interface:JdbiBinderCreates a new binding for aRowMapperusing aType.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindRowMapperin interfaceJdbiBinder
-
bindColumnMapper
public com.google.inject.binder.LinkedBindingBuilder<ColumnMapper<?>> bindColumnMapper()
Description copied from interface:JdbiBinderCreates a new binding for aColumnMapper.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindColumnMapperin interfaceJdbiBinder
-
bindColumnMapper
public com.google.inject.binder.LinkedBindingBuilder<ColumnMapper<?>> bindColumnMapper(QualifiedType<?> qualifiedType)
Description copied from interface:JdbiBinderCreates a new binding for aColumnMapperusing aQualifiedType.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindColumnMapperin interfaceJdbiBinder
-
bindColumnMapper
public com.google.inject.binder.LinkedBindingBuilder<ColumnMapper<?>> bindColumnMapper(GenericType<?> genericType)
Description copied from interface:JdbiBinderCreates a new binding for aColumnMapperusing aGenericType.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindColumnMapperin interfaceJdbiBinder
-
bindColumnMapper
public com.google.inject.binder.LinkedBindingBuilder<ColumnMapper<?>> bindColumnMapper(java.lang.reflect.Type type)
Description copied from interface:JdbiBinderCreates a new binding for aColumnMapperusing aType.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindColumnMapperin interfaceJdbiBinder
-
bindArrayType
public com.google.inject.binder.LinkedBindingBuilder<java.lang.String> bindArrayType(java.lang.Class<?> arrayType)
Description copied from interface:JdbiBinderCreates a new binding for a SQL array type.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindArrayTypein interfaceJdbiBinder
-
bindCodec
public com.google.inject.binder.LinkedBindingBuilder<Codec<?>> bindCodec(QualifiedType<?> qualifiedType)
Description copied from interface:JdbiBinderCreates a new binding for aCodecusing aQualifiedType.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindCodecin interfaceJdbiBinder
-
bindCodec
public com.google.inject.binder.LinkedBindingBuilder<Codec<?>> bindCodec(GenericType<?> genericType)
Description copied from interface:JdbiBinderCreates a new binding for aCodecusing aGenericType.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindCodecin interfaceJdbiBinder
-
bindCodec
public com.google.inject.binder.LinkedBindingBuilder<Codec<?>> bindCodec(java.lang.reflect.Type type)
Description copied from interface:JdbiBinderCreates a new binding for aCodecusing aType.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindCodecin interfaceJdbiBinder
-
bindPlugin
public com.google.inject.binder.LinkedBindingBuilder<JdbiPlugin> bindPlugin()
Description copied from interface:JdbiBinderCreates a new binding for aJdbiPlugin.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindPluginin interfaceJdbiBinder
-
bindCustomizer
public com.google.inject.binder.LinkedBindingBuilder<GuiceJdbiCustomizer> bindCustomizer()
Description copied from interface:JdbiBinderCreates a new binding for aGuiceJdbiCustomizer. All registered customizers are called on a newly createdJdbiobject and allow further customization of all aspects of theJdbiobject.Only valid when called from
AbstractJdbiDefinitionModule.configureJdbi()orAbstractJdbiConfigurationModule.configureJdbi().- Specified by:
bindCustomizerin interfaceJdbiBinder
-
-