Class MybatisExtension

java.lang.Object
org.mybatis.cdi.MybatisExtension
All Implemented Interfaces:
jakarta.enterprise.inject.spi.Extension

public class MybatisExtension extends Object implements jakarta.enterprise.inject.spi.Extension
MyBatis CDI extension.
Author:
Frank D. Martinez [mnesarco]
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    afterBeanDiscovery(jakarta.enterprise.inject.spi.AfterBeanDiscovery abd)
    Register all mybatis injectable beans.
    protected <T> void
    processAnnotatedType(jakarta.enterprise.inject.spi.ProcessAnnotatedType<T> pat)
    Collect types of all mappers annotated with Mapper.
    protected <X> void
    processInjectionTarget(jakarta.enterprise.inject.spi.ProcessInjectionTarget<X> event)
    Collect all targets to match Mappers and Session providers dependency.
    protected <T, X> void
    processProducer(jakarta.enterprise.inject.spi.ProcessProducer<T,X> pp)
    Collect all SqlSessionFactory producers annotated with SessionFactoryProvider.

    Methods inherited from class java.lang.Object

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

    • MybatisExtension

      public MybatisExtension()
  • Method Details

    • processAnnotatedType

      protected <T> void processAnnotatedType(@Observes jakarta.enterprise.inject.spi.ProcessAnnotatedType<T> pat)
      Collect types of all mappers annotated with Mapper.
      Type Parameters:
      T - the generic type
      Parameters:
      pat - the pat
    • processProducer

      protected <T, X> void processProducer(@Observes jakarta.enterprise.inject.spi.ProcessProducer<T,X> pp)
      Collect all SqlSessionFactory producers annotated with SessionFactoryProvider.
      Type Parameters:
      T - the generic type
      X - the generic type
      Parameters:
      pp - the pp
    • processInjectionTarget

      protected <X> void processInjectionTarget(@Observes jakarta.enterprise.inject.spi.ProcessInjectionTarget<X> event)
      Collect all targets to match Mappers and Session providers dependency.
      Type Parameters:
      X - the generic type
      Parameters:
      event - the event
    • afterBeanDiscovery

      protected void afterBeanDiscovery(@Observes jakarta.enterprise.inject.spi.AfterBeanDiscovery abd)
      Register all mybatis injectable beans.
      Parameters:
      abd - the abd