Class JdbiModule

  • All Implemented Interfaces:
    com.google.inject.Module

    public class JdbiModule
    extends com.google.inject.AbstractModule
    Jdbi support guice module. Binds DBI for injection. Introduce unit of work concept for JDBI: thread-bound handle must be created in order to access db (work with db only inside unit of work). Assumed that repositories will be installed with RepositoryInstaller, which will customize instances to support unit of work. Also, customized instances support guice aop.

    It is assumed that in most cases unit of work will be defined together with transaction using transaction annotation (on or more). By default, only InTransaction annotation will be recognized.

    Since:
    05.12.2016
    • Constructor Summary

      Constructors 
      Constructor Description
      JdbiModule​(org.skife.jdbi.v2.DBI jdbi, java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> txAnnotations)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void configure()  
      • Methods inherited from class com.google.inject.AbstractModule

        addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JdbiModule

        public JdbiModule​(org.skife.jdbi.v2.DBI jdbi,
                          java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> txAnnotations)
    • Method Detail

      • configure

        protected void configure()
        Overrides:
        configure in class com.google.inject.AbstractModule