Class JpaBaseOutboundEndpointSpec<S extends JpaBaseOutboundEndpointSpec<S>>

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,​H>
org.springframework.integration.dsl.MessageHandlerSpec<S,​JpaOutboundGateway>
org.springframework.integration.jpa.dsl.JpaBaseOutboundEndpointSpec<S>
Type Parameters:
S - the target JpaBaseOutboundEndpointSpec implementation type.
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<JpaOutboundGateway>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.integration.dsl.ComponentsRegistration
Direct Known Subclasses:
JpaRetrievingOutboundGatewaySpec, JpaUpdatingOutboundEndpointSpec

public abstract class JpaBaseOutboundEndpointSpec<S extends JpaBaseOutboundEndpointSpec<S>>
extends org.springframework.integration.dsl.MessageHandlerSpec<S,​JpaOutboundGateway>
implements org.springframework.integration.dsl.ComponentsRegistration
The base MessageHandlerSpec for JPA Outbound endpoints.
Since:
5.0
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected JpaExecutor jpaExecutor  

    Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    PARSER, target

    Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    logger

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected JpaBaseOutboundEndpointSpec​(JpaExecutor jpaExecutor)  
  • Method Summary

    Modifier and Type Method Description
    S entityClass​(java.lang.Class<?> entityClass)
    Specify the class type which is being used for retrieving entities from the database.
    java.util.Map<java.lang.Object,​java.lang.String> getComponentsToRegister()  
    S jpaQuery​(java.lang.String jpaQuery)
    Specify a JPA query to perform persistent operation.
    S namedQuery​(java.lang.String namedQuery)
    Specify a name a named JPQL based query or a native SQL query.
    S nativeQuery​(java.lang.String nativeQuery)
    Specify a native SQL query to perform persistent operation.
    S parameter​(java.lang.Object value)
    Add a value for indexed query parameter.
    S parameter​(java.lang.String name, java.lang.Object value)
    Add a value for named parameter in the query.
    S parameter​(JpaParameter jpaParameter)  
    S parameterExpression​(java.lang.String expression)
    Add a SpEL expression for indexed parameter in the query.
    S parameterExpression​(java.lang.String name, java.lang.String expression)
    Add a SpEL expression for named parameter in the query.
    S parameterSourceFactory​(ParameterSourceFactory parameterSourceFactory)
    Specify a ParameterSourceFactory to populate query parameters at runtime against request message.
    S usePayloadAsParameterSource​(java.lang.Boolean usePayloadAsParameterSource)
    Indicates that whether only the payload of the passed in Message will be used as a source of parameters.

    Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    _this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop

    Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • entityClass

      public S entityClass​(java.lang.Class<?> entityClass)
      Specify the class type which is being used for retrieving entities from the database.
      Parameters:
      entityClass - the entity Class to use
      Returns:
      the spec
    • jpaQuery

      public S jpaQuery​(java.lang.String jpaQuery)
      Specify a JPA query to perform persistent operation.
      Parameters:
      jpaQuery - the JPA query to use.
      Returns:
      the spec
    • nativeQuery

      public S nativeQuery​(java.lang.String nativeQuery)
      Specify a native SQL query to perform persistent operation.
      Parameters:
      nativeQuery - the native SQL query to use.
      Returns:
      the spec
    • namedQuery

      public S namedQuery​(java.lang.String namedQuery)
      Specify a name a named JPQL based query or a native SQL query.
      Parameters:
      namedQuery - the name of the pre-configured query.
      Returns:
      the spec
    • parameterSourceFactory

      public S parameterSourceFactory​(ParameterSourceFactory parameterSourceFactory)
      Specify a ParameterSourceFactory to populate query parameters at runtime against request message.
      Parameters:
      parameterSourceFactory - the ParameterSourceFactory to use.
      Returns:
      the spec
    • parameter

      public S parameter​(java.lang.Object value)
      Add a value for indexed query parameter.
      Parameters:
      value - the value for query parameter by index
      Returns:
      the spec
    • parameter

      public S parameter​(java.lang.String name, java.lang.Object value)
      Add a value for named parameter in the query.
      Parameters:
      name - the name of the query parameter
      value - the value for query parameter by name
      Returns:
      the spec
    • parameterExpression

      public S parameterExpression​(java.lang.String expression)
      Add a SpEL expression for indexed parameter in the query.
      Parameters:
      expression - the SpEL expression for query parameter by index
      Returns:
      the spec
    • parameterExpression

      public S parameterExpression​(java.lang.String name, java.lang.String expression)
      Add a SpEL expression for named parameter in the query.
      Parameters:
      name - the name of the query parameter
      expression - the SpEL expression for query parameter by name
      Returns:
      the spec
    • parameter

      public S parameter​(JpaParameter jpaParameter)
    • usePayloadAsParameterSource

      public S usePayloadAsParameterSource​(java.lang.Boolean usePayloadAsParameterSource)
      Indicates that whether only the payload of the passed in Message will be used as a source of parameters. The is 'true' by default because as a default a BeanPropertyParameterSourceFactory implementation is used for the sqlParameterSourceFactory property.
      Parameters:
      usePayloadAsParameterSource - the boolean flag to indicate if use payload as a source of parameter values or not.
      Returns:
      the spec
    • getComponentsToRegister

      public java.util.Map<java.lang.Object,​java.lang.String> getComponentsToRegister()
      Specified by:
      getComponentsToRegister in interface org.springframework.integration.dsl.ComponentsRegistration