Class JpaBaseOutboundEndpointSpec<S extends JpaBaseOutboundEndpointSpec<S>>

Type Parameters:
S - the target JpaBaseOutboundEndpointSpec implementation type.
All Implemented Interfaces:
DisposableBean, FactoryBean<JpaOutboundGateway>, InitializingBean, Lifecycle, Phased, SmartLifecycle, ComponentsRegistration
Direct Known Subclasses:
JpaRetrievingOutboundGatewaySpec, JpaUpdatingOutboundEndpointSpec

public abstract class JpaBaseOutboundEndpointSpec<S extends JpaBaseOutboundEndpointSpec<S>> extends MessageHandlerSpec<S,JpaOutboundGateway> implements ComponentsRegistration
The base MessageHandlerSpec for JPA Outbound endpoints.
Since:
5.0
Author:
Artem Bilan
  • Field Details

    • jpaExecutor

      protected final JpaExecutor jpaExecutor
  • Constructor Details

    • JpaBaseOutboundEndpointSpec

      protected JpaBaseOutboundEndpointSpec(JpaExecutor jpaExecutor)
  • Method Details

    • entityClass

      public S entityClass(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(String jpaQuery)
      Specify a JPA query to perform persistent operation.
      Parameters:
      jpaQuery - the JPA query to use.
      Returns:
      the spec
    • nativeQuery

      public S nativeQuery(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(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(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(String name, 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(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(String name, 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(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 Map<Object,String> getComponentsToRegister()
      Specified by:
      getComponentsToRegister in interface ComponentsRegistration