Class BaseMyBatisEndpoint

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
    Direct Known Subclasses:
    MyBatisBeanEndpoint, MyBatisEndpoint

    public abstract class BaseMyBatisEndpoint
    extends org.apache.camel.support.DefaultPollingEndpoint
    • Field Summary

      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MyBatisComponent getComponent()  
      org.apache.ibatis.session.ExecutorType getExecutorType()  
      String getInputHeader()  
      String getOutputHeader()  
      org.apache.ibatis.session.SqlSessionFactory getSqlSessionFactory()  
      void setExecutorType​(String executorType)  
      void setExecutorType​(org.apache.ibatis.session.ExecutorType executorType)
      The executor type to be used while executing statements.
      void setInputHeader​(String inputHeader)
      User the header value for input parameters instead of the message body.
      void setOutputHeader​(String outputHeader)
      Store the query result in a header instead of the message body.
      • Methods inherited from class org.apache.camel.support.DefaultPollingEndpoint

        createConsumer
      • Methods inherited from class org.apache.camel.support.ScheduledPollEndpoint

        configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
      • Methods inherited from class org.apache.camel.support.DefaultEndpoint

        configureExchange, configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.Endpoint

        createProducer, getEndpointBaseUri, isSingletonProducer
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Constructor Detail

      • BaseMyBatisEndpoint

        public BaseMyBatisEndpoint()
      • BaseMyBatisEndpoint

        public BaseMyBatisEndpoint​(String endpointUri,
                                   org.apache.camel.Component component)
    • Method Detail

      • getComponent

        public MyBatisComponent getComponent()
        Overrides:
        getComponent in class org.apache.camel.support.DefaultEndpoint
      • getSqlSessionFactory

        public org.apache.ibatis.session.SqlSessionFactory getSqlSessionFactory()
      • getExecutorType

        public org.apache.ibatis.session.ExecutorType getExecutorType()
      • setExecutorType

        public void setExecutorType​(org.apache.ibatis.session.ExecutorType executorType)
        The executor type to be used while executing statements.
        • simple - executor does nothing special.
        • reuse - executor reuses prepared statements.
        • batch - executor reuses statements and batches updates.
      • setExecutorType

        public void setExecutorType​(String executorType)
      • getInputHeader

        public String getInputHeader()
      • setInputHeader

        public void setInputHeader​(String inputHeader)
        User the header value for input parameters instead of the message body. By default, inputHeader == null and the input parameters are taken from the message body. If outputHeader is set, the value is used and query parameters will be taken from the header instead of the body.
      • getOutputHeader

        public String getOutputHeader()
      • setOutputHeader

        public void setOutputHeader​(String outputHeader)
        Store the query result in a header instead of the message body. By default, outputHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If outputHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. Setting outputHeader will also omit populating the default CamelMyBatisResult header since it would be the same as outputHeader all the time.